Access service generation method, apparatus, electronic device and storage medium

By generating business interface call logic and protocol parsing logic, a single business processing logic was made compatible with two business service architectures during the canary release period. This solved the problems of high maintenance costs and low business development efficiency, and achieved efficient business development and functional consistency.

CN116257367BActive Publication Date: 2026-05-26TENCENT TECHNOLOGY (SHENZHEN) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2021-12-10
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

During the gray-scale control period, existing technologies require maintaining two sets of business processing logic for API access service modules separately, resulting in high maintenance costs and difficulty in ensuring consistency of business functions between the old and new systems, leading to low business development efficiency.

Method used

By obtaining the message format information from the interface data structure description information and the business processing logic of the original access service, the business interface call logic and protocol parsing logic are generated, and the corresponding multi-partition business service cluster partition access service is generated, so as to realize that one set of business processing logic is compatible with two sets of business service architectures.

Benefits of technology

It greatly reduces maintenance costs, eliminates the risk of inconsistencies between the business functions of the old and new systems, and improves business development efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116257367B_ABST
    Figure CN116257367B_ABST
Patent Text Reader

Abstract

This invention discloses an access service generation method, apparatus, electronic device, and storage medium. The method includes: acquiring interface data structure description information and extracting message format information from the interface data structure description information; acquiring preset basic logic and business processing logic in the original access service; generating business interface call logic based on the message format information and the business processing logic, and generating protocol parsing logic based on the message format information and the preset basic logic; and generating a partitioned access service corresponding to a multi-partition business service cluster based on the business interface call logic and the protocol parsing logic. This invention enables a single set of business processing logic to be compatible with two sets of business service architectures during gray-scale control, greatly reducing maintenance costs, eliminating the risk of inconsistencies in business functions between the old and new systems, and improving business development efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to an access service generation method, apparatus, electronic device, and storage medium. Background Technology

[0002] As the complexity of backend business increases, in order to better provide backend services, backend services are generally broken down into multiple services with relatively cohesive and loosely coupled responsibilities. Among them, the access service is responsible for receiving external requests, performing basic logic such as contract verification, permission verification, and frequency restriction on external requests, and then forwarding the external requests to specific business modules for business processing.

[0003] Considering the limited service capabilities of a single business service cluster, to provide better service, it is often necessary to transform the business service architecture from providing services through a single cluster to providing services through multiple clusters. These multiple clusters are independently deployed, do not affect each other, and each cluster possesses complete business service capabilities. This transition period can also be called the canary release period. It is clear that during the canary release period, two sets of business service architectures will be involved, such as... Figure 1 As shown, the architecture includes the old business cluster (i.e., the original business service cluster that provides business services) and the multi-partition business cluster (i.e., multiple business service clusters that can each provide business services independently). Therefore, during the canary control period, two sets of APIs (Application Programming Interfaces) are required to access the service module.

[0004] In related technologies, it is necessary to maintain two sets of business processing logic code for the API access service modules separately, which leads to high maintenance costs, difficulty in ensuring the consistency of business functions between the old and new systems, and low business development efficiency. Summary of the Invention

[0005] To address the problems of existing technologies, embodiments of the present invention provide an access service generation method, apparatus, electronic device, and storage medium. The technical solution is as follows:

[0006] On the one hand, an access service generation method is provided, the method comprising:

[0007] Obtain the interface data structure description information and extract the message format information from the interface data structure description information;

[0008] Obtain the pre-set basic logic and the business processing logic in the original access service; the original access service refers to the access service corresponding to the original business service cluster.

[0009] The business interface call logic is generated based on the message format information and the business processing logic, and the protocol parsing logic is generated based on the message format information and the preset basic logic.

[0010] Based on the business interface call logic and the protocol parsing logic, a partition access service corresponding to the multi-partition business service cluster is generated; the business services provided by each partition business service cluster in the multi-partition business service cluster are the same as those provided by the original business service cluster.

[0011] On the other hand, an access service generation apparatus is provided, the apparatus comprising:

[0012] The interface data structure description acquisition module is used to acquire interface data structure description information and extract message format information from the interface data structure description information.

[0013] The logic acquisition module is used to acquire the preset basic logic and the business processing logic in the original access service; the original access service refers to the access service corresponding to the original business service cluster.

[0014] The logic generation module is used to generate business interface call logic based on the message format information and the business processing logic, and to generate protocol parsing logic based on the message format information and the preset basic logic.

[0015] The partition access service generation module is used to generate partition access services for corresponding multi-partition business service clusters based on the business interface call logic and the protocol parsing logic; the business services provided by each partition business service cluster in the multi-partition business service cluster are the same as those provided by the original business service cluster.

[0016] In one exemplary implementation, the logic acquisition module includes:

[0017] The active plugin display module is used to display at least one active basic interceptor plugin; each active basic interceptor plugin corresponds to different preset basic logic;

[0018] An effective plugin determination module is used to determine the selected target effective basic interceptor plugin in response to a selection instruction for the at least one effective basic interceptor plugin.

[0019] The pre-set basic logic determination module is used to obtain the pre-set basic logic based on the target effective basic interceptor plugin.

[0020] In one exemplary embodiment, the apparatus further includes:

[0021] A facet interceptor logic generation module is used to obtain preset basic logic and generate basic facet interceptor logic based on the preset basic logic.

[0022] The effective plugin generation module is used to generate effective basic interceptor plugins corresponding to the basic aspect interceptor logic.

[0023] In one exemplary embodiment, the apparatus further includes:

[0024] The field content acquisition module is used to respond to the interface data structure description information generation instruction triggered based on the target page, and to acquire the preset field content corresponding to each field according to the attribute information of each field in the target page;

[0025] The message format information generation module is used to generate the message format information based on the attribute information of each field and the preset field content;

[0026] The interface data structure description information generation module is used to generate the interface data structure description information based on the message format information.

[0027] In one exemplary embodiment, the apparatus further includes:

[0028] The module for determining attribute information to be updated is used to determine the attribute information to be updated corresponding to the field to be updated in response to the field update instruction for the target page.

[0029] The field update module is used to update the fields in the target page according to the field information to be updated.

[0030] In one exemplary embodiment, the apparatus further includes:

[0031] The connection establishment module is used to establish the connection relationship between the partition access service and the partition routing server; the partition routing server is used to determine the target partition service cluster in the multi-partition service cluster according to the parsing result of the protocol parsing logic, and the target partition service cluster is used to receive the call of the service interface call logic to provide the corresponding service.

[0032] On the other hand, an electronic device is provided, including a processor and a memory, wherein the memory stores at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by the processor to implement the above-described access service generation method.

[0033] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction or at least one program is stored therein, the at least one instruction or the at least one program being loaded and executed by a processor to implement the access service generation method as described above.

[0034] On the other hand, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the access service generation method provided above.

[0035] This invention extracts message format information from the interface data structure description information to obtain the pre-set basic logic and the business processing logic in the original access service. Based on the message format information and the business processing logic, it generates business interface call logic and protocol parsing logic. Then, based on the business interface call logic and protocol parsing logic, it generates the corresponding multi-partition business service cluster partition access service. This enables a single business processing logic to be compatible with two business service architectures during the gray-scale control period, greatly reducing maintenance costs, eliminating the risk of inconsistencies between the business functions of the old and new systems, and improving business development efficiency. Attached Figure Description

[0036] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0037] Figure 1 This is a schematic diagram of the system architecture during grayscale control provided in an embodiment of the present invention;

[0038] Figure 2 This is a schematic diagram of the access service architecture during grayscale control provided in an embodiment of the present invention;

[0039] Figure 3a This is a flowchart illustrating an access service generation method provided in an embodiment of the present invention;

[0040] Figure 3b This is an example of a partitioned access service provided in an embodiment of the present invention;

[0041] Figure 4 This is a flowchart illustrating another access service generation method provided in an embodiment of the present invention;

[0042] Figure 5 This is an example of a partial target page provided in an embodiment of the present invention for generating interface data structure description information;

[0043] Figure 6 This is an example of selecting at least one active basic interceptor plugin provided in an embodiment of the present invention;

[0044] Figure 7 This is a partial schematic diagram of the service framework supporting aspect-oriented plugin mode and HTTP protocol provided in an embodiment of the present invention;

[0045] Figure 8 This is a structural block diagram of an access service generation device provided in an embodiment of the present invention;

[0046] Figure 9 This is a hardware structure block diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0047] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0048] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or server that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.

[0049] It is understood that in the specific embodiments of this application, data such as user information are involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0050] The relevant terms involved in the embodiments of the present invention will be explained below.

[0051] Multi-partition architecture: To improve the availability of the core business logic of an application, this logic is split into multiple independently deployed partitions that do not affect each other, with each partition possessing complete business service capabilities. For example, the application may include social applications, video applications, etc.; the core business corresponds to the application, and different applications may have different core businesses. For instance, the core business could be resource transfer within a social application.

[0052] Business Object API: A contractual interface between the business object system and the application's core business system, transmitted via HTTP protocol in a pre-agreed standard XML or JSON format. The business object is the object requesting business services from the application's core business system. For example, when the core business is resource transfer in a social application, the business object could be an entity service provider (such as a merchant).

[0053] Access Service: When the complexity of backend business reaches a certain level, in order to better manage services, the backend service is generally divided into multiple services with relatively cohesive and loosely coupled responsibilities. Among them, the access service is the module responsible for receiving external requests. It is mainly responsible for performing basic logic such as contract verification, permission verification, and frequency restriction on external requests, and then forwarding the external requests to specific business service modules.

[0054] XCGI (Common Gateway Interface): A general gateway interface that supports HTTP protocol service framework. It encapsulates a large number of basic functions in HTTP services, separates protocol field descriptions from basic function code, and supports aspect-oriented plugin mode for easy expansion.

[0055] Interceptor plugins: These are plugin-based interceptors used to filter requested resources. They can be attached to one or more servlets or JSP pages to inspect request information and process response information. In AOP (Aspect-Oriented Programming), interceptors are used to intercept access to a method or field before it is accessed, and then add certain operations before or after that.

[0056] Please see Figure 2 The diagram shown is a schematic of the access service architecture during grayscale control provided in an embodiment of the present invention. Figure 2As shown, during the canary release period, there are two business service architectures: the original business service cluster and the multi-partition business service cluster. During the canary release period, there will be a relatively long canary release process. The original business service cluster and the multi-partition business service cluster will simultaneously receive the client's business processing requests. The original business service cluster receives the received business processing requests through the original access service (i.e., the original API access module), processes the received business processing requests through the basic logic in the original access service (such as contract verification, permission verification, frequency restriction, etc.), and then forwards the business processing requests to the specific business module for business processing.

[0057] Multi-partition service clusters access services through reconstructed partitions (i.e. Figure 2 The partition API access module receives the put-in business processing requests. In order to distribute the put-in business processing requests to each partition business service cluster, a new partition routing layer that interacts with the partition API access module has been added. This partition routing layer can be a partition routing server that implements partition routing function. At the same time, the partition API access module has added the "1. Upper half protocol parsing" function. In addition, the "2. Lower half business API logic call" function of the partition API access module reuses the business processing logic in the original access service. That is, the partition API access module and the original API access module share the business processing logic.

[0058] It should be noted that the server in this embodiment of the invention can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The client can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, in-vehicle terminal, smart TV, etc., but is not limited to these.

[0059] In one application scenario, the business services provided by each business service cluster in this embodiment of the invention can be related business services for implementing resource transfer, wherein the API access service can be the access service of the business object that requests the resource transfer service.

[0060] Based on this, please refer to Figure 3a The diagram shown is a flowchart of an access service generation method provided by an embodiment of the present invention. This method can be used for efficient generation of access services by electronic devices. Figure 2 The partition access service in the system enables a single business processing logic to be compatible with two architectures, greatly reducing maintenance costs, eliminating the risk of inconsistencies in business functions between the old and new systems, and improving business development efficiency.

[0061] It should be noted that this specification provides the operational steps of the methods described in the embodiments or flowcharts, but based on conventional or non-inventive labor, more or fewer operational steps may be included. The order of steps listed in the embodiments is merely one possible execution order among many and does not represent the only execution order. In actual system or product execution, the methods shown in the embodiments or drawings can be executed sequentially or in parallel (e.g., in a parallel processor or multi-threaded processing environment). Specifically, as shown in the embodiments or drawings... Figure 3a As shown, the method may include:

[0062] S301, Obtain the interface data structure description information and extract the message format information from the interface data structure description information.

[0063] The interface data structure description information is a pre-configured description of the partition access service interface (i.e., Figure 2 The data structure description information of the partition API access module includes the data structure description information corresponding to the request message and the data structure description information corresponding to the return packet message.

[0064] For example, the interface data structure description information can be a standard Proto file. The message format information in the interface data structure description information refers to the field content corresponding to the Message field in the Proto file, including Message Request{} for request messages and Message Request{} for return packet messages.

[0065] In one exemplary embodiment, the method may further include a step of generating interface data structure description information, that is, before step S301 above, such as... Figure 4 As shown, the method may further include:

[0066] S401, in response to the interface data structure description information generation instruction triggered based on the target page, obtain the preset field content corresponding to each field according to the attribute information of each field in the target page.

[0067] S403, Generate the message format information based on the attribute information of each field and the preset field content.

[0068] S405, Generate the interface data structure description information according to the message format information.

[0069] The target page can be an interface provided by a visual protocol management platform (which may be provided by XCGI) for managing interface data structure description information. It can include page areas corresponding to request messages and page areas corresponding to return packet messages. The fields in the target page correspond to the fields in the message format information to be generated. Field attribute information includes field type, identifier (such as name), and multiplicity. Multiplicity indicates whether the corresponding field is a required field in the message format information. It is understood that the field attribute information can also be set with other business-related information as needed.

[0070] The preset field content corresponding to each field is pre-edited protocol content. To simplify the management of protocol content, the preset field content can be protocol content that supports regular expressions. The pre-edited preset field content for each field can be stored in a specified storage space and identified as the corresponding field. For example, the field identifier (such as name) can be used as the identifier of its corresponding preset field content. Thus, when generating message format information, the preset field content corresponding to the field can be quickly matched through the field identifier in the field's attribute information on the target page, improving the generation speed of interface data structure description information.

[0071] Please see Figure 5 The image shows an example of a partial target page for generating interface data structure description information, provided by an embodiment of the present invention. The fields in this partial target page correspond to the message format information of the request message in the Proto file to be generated. Each row in this partial target page is considered a field, and the elements of each row serve as the attribute information of the field, including multiplicity, type / format, name, etc. Each field is associated with corresponding preset field content. This target page can automatically generate a standard Proto file in response to the interface data structure description information generation instruction and can support regular expressions. The following is based on... Figure 5 The following is an example of the message format information automatically generated in the Proto file of the target page:

[0072]

[0073]

[0074] In the above message format information, " / / merchant ID required string mch_code=1 [...]" corresponds to Figure 5 The first line of the target page shown, " / / merchant appid required string appid=2[]" corresponds to... Figure 5 The second line of the target page shown, and so on, the message format information may also include corresponding... Figure 5The fields in other rows of the target page shown. Taking " / / merchant number required string mch_code=1[……]" as an example, "required" comes from the "multiplicity" in the attribute information shown in the first row, "string" comes from the "type / format" in the attribute information shown in the first row, "mch_code" comes from the "name" in the attribute information shown in the first row, " / / merchant number" comes from the "document title" in the attribute information shown in the first row, and the specific content in "[……]" comes from the corresponding preset field content in the first row.

[0075] As is understandable, the generation of message format information corresponding to the returned packet message in the Proto file is similar to the generation process of message format information corresponding to the request message shown above, and will not be illustrated here.

[0076] The interface data structure description information generation method in the above embodiments enables the fields and corresponding field contents in the message format information to be generated to be expressed more clearly, thereby improving the maintainability and flexibility of the interface data structure description information.

[0077] Continue reading Figure 4 In one exemplary implementation, after generating the interface data structure description information, the method may further include:

[0078] S407, in response to the field update instruction for the target page, determine the attribute information to be updated corresponding to the field to be updated.

[0079] S409, Update the fields in the target page according to the field information to be updated.

[0080] Specifically, the field update instruction can specify the update type, which may include deleting a field, adding a field, or updating the attribute information of an existing field. Correspondingly, when the update type is deleting a field, the field to be updated is the field to be deleted on the target page, and the attribute information to be updated is the attribute information of the deleted field. When the update type is adding a field, the field to be updated is the field to be added to the target page, and the attribute information to be updated is the attribute information corresponding to the added field. When the update type is updating an existing field on the target page, the field to be updated is the existing field to be updated, and the attribute information to be updated is the target attribute information. This embodiment greatly improves the maintainability of the interface protocol. By updating the fields on the target page, the interface data structure description information can be automatically updated, thereby improving the generation efficiency and flexibility of the access service.

[0081] S303, obtain the pre-set basic logic and the business processing logic in the original access service.

[0082] The original access service refers to the access service corresponding to the original business service cluster. This original access service includes the original basic logic and business processing logic. The basic logic refers to logic that can be implemented without calling relevant business interfaces, such as signature verification, authorization, and frequency control. The business processing logic refers to logic that requires calling relevant business interfaces to perform specific business processing.

[0083] The pre-configured basic logic is pre-configured basic logic that can be configured based on the actual needs of the partition access service. It can be the same as or different from the original basic logic in the original access service. In an exemplary implementation, to meet the flexible requirements for the pre-configured basic logic and improve the flexibility of the partition access service, obtaining the pre-configured basic logic in step S303 above may include:

[0084] Demonstrate at least one active basic interceptor plugin; each active basic interceptor plugin corresponds to a different preset basic logic;

[0085] In response to a selection instruction for the at least one active base interceptor plugin, the selected target active base interceptor plugin is determined.

[0086] Based on the target effective basic interceptor plugin, the preset basic logic is obtained.

[0087] Among them, the effective basic interceptor plugin is a plugin pre-generated based on basic aspect logic that can execute certain basic logic. For example, at least one effective basic interceptor plugin may include, for example, Figure 6 The selected components are APIv2 signature verification, shared merchant information coroutine variable manager (session_context), frequency limiting (frequency_limit), and authentication (pay_auth_verify).

[0088] When there are multiple target generation base interceptor plugins, the pre-defined base logic can be generated based on the order of the selected target effective base interceptor plugins and the effective base interceptor plugins for each target.

[0089] In the above embodiments, the selected target effective basic interceptor plugin is determined in response to the selection instruction for at least one effective basic interceptor plugin, and then the preset basic logic is obtained according to the target effective basic interceptor plugin. Thus, when generating partition access services, only simple configuration is required to quickly and flexibly obtain the required basic capabilities, thereby improving the generation efficiency and flexibility of partition access services.

[0090] In one exemplary implementation, the method may further include a step of generating an effective basic interceptor plugin, specifically generating the effective basic interceptor plugin may include:

[0091] Obtain preset basic logic, and generate basic aspect interceptor logic based on the preset basic logic;

[0092] Generate the effective basic interceptor plugin corresponding to the basic aspect interceptor logic.

[0093] The preset basic logic can be any basic logic, such as signature verification, frequency control, etc.

[0094] In practical implementation, a basic interceptor plugin can be generated based on an XCGI service framework that supports aspect-oriented programming and the HTTP protocol, such as... Figure 7 This document provides a partial diagram of a service framework supporting aspect-oriented programming (AOP) and the HTTP protocol. This framework encapsulates the interaction between the bottom two layers and the Svrkit framework. Svrkit is a high-performance RPC (Remote Procedure Call) framework. The Svrkit Summer layer handles low-level network services such as network requests, worker threads, and fast rejection. SvrkitWebframe handles initial HTTP protocol parsing, URL (Uniform Resource Locator) routing, and simple response packet assembly. The upper layers of this service framework allow for the injection of aspect logic via plugins, such as... Figure 7 The topmost layer shows multiple basic aspect logic plugins.

[0095] S305, generate business interface call logic based on the message format information and the business processing logic, and generate protocol parsing logic based on the message format information and the preset basic logic.

[0096] Specifically, the message format information extracted from the interface data structure description information can be used as the common part of the business interface call logic and the protocol parsing logic. Then, based on the business processing logic and this common part, combined with the corresponding RPC function, the business interface call logic is generated, and based on the preset basic logic and this common part, combined with the corresponding RPC function, the protocol parsing logic is generated.

[0097] S307, Based on the business interface call logic and the protocol parsing logic, generate the partition access service corresponding to the multi-partition business service cluster.

[0098] In this context, each partition service cluster in the multi-partition service cluster provides the same service as the original service cluster.

[0099] Specifically, the business interface call logic and protocol parsing logic can be integrated into the application programming interface to obtain a partitioned access service that has the function of performing protocol parsing based on the above protocol parsing logic and the function of performing business interface calls based on the above business interface call logic. For example Figure 3b The example shown is a partition access service provided by an embodiment of the present invention, including upper half protocol parsing and lower half business processing (i.e. business interface call logic), wherein interceptor 1 is the effective basic interceptor plugin in the embodiment of the present invention, and interceptor 2 is the interceptor involved in the business processing logic.

[0100] In an exemplary embodiment, after generating the partition access service corresponding to the multi-partition business service cluster in step S307, the method may further include: establishing a connection between the partition access service and the partition routing server, wherein the partition routing server is used to determine the target partition business service cluster in the multi-partition business service cluster based on the parsing result of the protocol parsing logic in the partition access service, and the target business service cluster is used to receive the call of the business interface call logic in the partition access service and provide the corresponding business service.

[0101] Specifically, the partition routing server sends the business processing request to the partition access server that provides the partition access service. The partition access server parses the business processing request according to the protocol parsing logic in the partition access service and returns the parsing result to the partition routing server. The partition routing server extracts the partition routing factor from the parsing result, determines the partition business processing cluster to process the business processing request based on the partition routing factor, generates a routing result corresponding to the business processing request, and sends the routing result to the partition access server. The partition access server calls the partition business service cluster to process the business processing request to provide the corresponding business service according to the routing result and the business interface call logic in the partition access service.

[0102] As can be seen from the above technical solutions of the embodiments of the present invention, the embodiments of the present invention extract message format information from the interface data structure description information to obtain the pre-set basic logic and the business processing logic in the original access service, and generate business interface call logic based on the message format information and the business processing logic, generate protocol parsing logic based on the message format information and the pre-set basic logic, and then generate the corresponding multi-partition business service cluster partition access service based on the business interface call logic and the protocol parsing logic. This achieves the compatibility of one set of business processing logic with two sets of business service architectures during the gray-scale period, greatly reducing maintenance costs, eliminating the risk of inconsistency between the business functions of the new and old systems, and the protocol content definition is completely independent of the business processing logic code, so that there is no need to pay too much attention to the basic logic during business development, thus improving business development efficiency.

[0103] Corresponding to the access service generation methods provided in the above embodiments, this embodiment of the invention also provides an access service generation device. Since the access service generation device provided in this embodiment corresponds to the access service generation methods provided in the above embodiments, the implementation methods of the aforementioned access service generation methods are also applicable to the access service generation device provided in this embodiment, and will not be described in detail in this embodiment.

[0104] Please see Figure 8 The diagram shows a schematic representation of an access service generation device according to an embodiment of the present invention. This device has the function of implementing the access service generation method described in the above method embodiments. This function can be implemented in hardware or by hardware executing corresponding software. Figure 8 As shown, the access service generation device 800 may include:

[0105] The interface data structure description acquisition module 810 is used to acquire interface data structure description information and extract message format information from the interface data structure description information.

[0106] The logic acquisition module 820 is used to acquire the preset basic logic and the business processing logic in the original access service; the original access service refers to the access service corresponding to the original business service cluster.

[0107] The logic generation module 830 is used to generate business interface call logic based on the message format information and the business processing logic, and to generate protocol parsing logic based on the message format information and the preset basic logic.

[0108] The partition access service generation module 840 is used to generate partition access services corresponding to the multi-partition business service clusters according to the business interface call logic and the protocol parsing logic; the business services provided by each partition business service cluster in the multi-partition business service cluster are the same as the business services provided by the original business service cluster.

[0109] In one exemplary embodiment, the logic acquisition module 820 includes:

[0110] The active plugin display module is used to display at least one active basic interceptor plugin; each active basic interceptor plugin corresponds to different preset basic logic;

[0111] An effective plugin determination module is used to determine the selected target effective basic interceptor plugin in response to a selection instruction for the at least one effective basic interceptor plugin.

[0112] The pre-set basic logic determination module is used to obtain the pre-set basic logic based on the target effective basic interceptor plugin.

[0113] In one exemplary embodiment, the apparatus further includes:

[0114] A facet interceptor logic generation module is used to obtain preset basic logic and generate basic facet interceptor logic based on the preset basic logic.

[0115] The effective plugin generation module is used to generate effective basic interceptor plugins corresponding to the basic aspect interceptor logic.

[0116] In one exemplary embodiment, the apparatus further includes:

[0117] The field content acquisition module is used to respond to the interface data structure description information generation instruction triggered based on the target page, and to acquire the preset field content corresponding to each field according to the attribute information of each field in the target page;

[0118] The message format information generation module is used to generate the message format information based on the attribute information of each field and the preset field content;

[0119] The interface data structure description information generation module is used to generate the interface data structure description information based on the message format information.

[0120] In one exemplary embodiment, the apparatus further includes:

[0121] The module for determining attribute information to be updated is used to determine the attribute information to be updated corresponding to the field to be updated in response to the field update instruction for the target page.

[0122] The field update module is used to update the fields in the target page according to the field information to be updated.

[0123] In one exemplary embodiment, the apparatus further includes:

[0124] The connection establishment module is used to establish the connection relationship between the partition access service and the partition routing server; the partition routing server is used to determine the target partition service cluster in the multi-partition service cluster according to the parsing result of the protocol parsing logic, and the target partition service cluster is used to receive the call of the service interface call logic to provide the corresponding service.

[0125] It should be noted that the apparatus provided in the above embodiments is only illustrated by the division of the above functional modules when implementing its functions. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.

[0126] This invention provides an electronic device including a processor and a memory. The memory stores at least one instruction or at least one program segment, which is loaded and executed by the processor to implement the access service generation method provided in the above method embodiments.

[0127] Memory can be used to store software programs and modules. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory. Memory can primarily include a program storage area and a data storage area. The program storage area can store the operating system, application programs required for the functions, etc.; the data storage area can store data created based on the use of the device, etc. Furthermore, memory can include high-speed random access memory, and can also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, memory can also include a memory controller to provide the processor with access to the memory.

[0128] Figure 9 This is a hardware structure block diagram of an electronic device running an access service generation method provided in an embodiment of the present invention, such as... Figure 9 As shown, the internal structure of this electronic device may include, but is not limited to, a processor, a network interface, and a memory. The processor, network interface, and memory within the electronic device can be connected via a bus or other means, as illustrated in the embodiments of this specification. Figure 9 Taking the example of a connection between China and Israel via a bus.

[0129] The processor (or CPU, Central Processing Unit) is the computing and control core of the computer device. The network interface may optionally include a standard wired interface or a wireless interface (such as Wi-Fi, mobile communication interface, etc.). Memory is the storage device in the computer device used to store programs and data. It is understood that the memory here can be a high-speed RAM storage device, or a non-volatile storage device, such as at least one disk storage device; optionally, it can also be at least one storage device located remotely from the aforementioned processor. The memory provides storage space, which stores the operating system of the electronic device, including but not limited to: Windows (an operating system), Linux (an operating system), Android (a mobile operating system), iOS (a mobile operating system), etc., which are not limited in this invention; and the storage space also stores one or more instructions suitable for being loaded and executed by the processor, which can be one or more computer programs (including program code). In the embodiments of this specification, the processor loads and executes one or more instructions stored in the memory to implement the access service generation method provided in the above method embodiments.

[0130] Embodiments of the present invention also provide a computer-readable storage medium, which can be disposed in an electronic device to store at least one instruction or at least one program related to implementing an access service generation method, wherein the at least one instruction or the at least one program is loaded and executed by the processor to implement the access service generation method provided in the above-described method embodiments.

[0131] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0132] It should be noted that the order of the above embodiments of the present invention is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Furthermore, specific embodiments have been described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims can be performed in a different order than that shown in the embodiments and still achieve the desired result. Additionally, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0133] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the apparatus embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0134] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0135] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for generating access services, characterized in that, The method includes: Obtain the interface data structure description information and extract the message format information from the interface data structure description information; Obtain the pre-set basic logic and the business processing logic in the original access service; the original access service refers to the access service corresponding to the original business service cluster. The business interface call logic is generated based on the message format information and the business processing logic, and the protocol parsing logic is generated based on the message format information and the preset basic logic. Based on the business interface call logic and the protocol parsing logic, a partition access service corresponding to the multi-partition business service cluster is generated; the business services provided by each partition business service cluster in the multi-partition business service cluster are the same as those provided by the original business service cluster. Establish a connection between the partition access service and the partition routing server; the partition routing server is used to determine the target partition service cluster in the multi-partition service cluster according to the parsing result of the protocol parsing logic, and the target partition service cluster is used to receive the call of the service interface call logic to provide the corresponding service.

2. The access service generation method according to claim 1, characterized in that, The acquisition of preset basic logic includes: Demonstrate at least one active basic interceptor plugin; each active basic interceptor plugin corresponds to a different preset basic logic; In response to a selection instruction for the at least one active base interceptor plugin, the selected target active base interceptor plugin is determined. Based on the target effective basic interceptor plugin, the preset basic logic is obtained.

3. The access service generation method according to claim 2, characterized in that, The method further includes: Obtain preset basic logic, and generate basic aspect interceptor logic based on the preset basic logic; Generate the effective basic interceptor plugin corresponding to the basic aspect interceptor logic.

4. The access service generation method according to claim 1, characterized in that, The method further includes: In response to an interface data structure description information generation instruction triggered based on a target page, the preset field content corresponding to each field is obtained according to the attribute information of each field in the target page; The message format information is generated based on the attribute information of each field and the preset field content; Based on the message format information, generate the interface data structure description information.

5. The access service generation method according to claim 4, characterized in that, The method further includes: In response to a field update instruction for the target page, determine the attribute information to be updated corresponding to the field to be updated; The fields in the target page are updated based on the field information to be updated.

6. An access service generation device, characterized in that, The device includes: The interface data structure description acquisition module is used to acquire interface data structure description information and extract message format information from the interface data structure description information. The logic acquisition module is used to acquire the preset basic logic and the business processing logic in the original access service; the original access service refers to the access service corresponding to the original business service cluster. The logic generation module is used to generate business interface call logic based on the message format information and the business processing logic, and to generate protocol parsing logic based on the message format information and the preset basic logic. The partition access service generation module is used to generate partition access services corresponding to the multi-partition business service cluster based on the business interface call logic and the protocol parsing logic; the business services provided by each partition business service cluster in the multi-partition business service cluster are the same as those provided by the original business service cluster. The connection establishment module is used to establish the connection relationship between the partition access service and the partition routing server; the partition routing server is used to determine the target partition service cluster in the multi-partition service cluster according to the parsing result of the protocol parsing logic, and the target partition service cluster is used to receive the call of the service interface call logic to provide the corresponding service.

7. An electronic device, characterized in that, It includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by the processor to implement the access service generation method as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The storage medium stores at least one instruction or at least one program segment, which is loaded and executed by a processor to implement the access service generation method as described in any one of claims 1 to 5.

9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the access service generation method according to any one of claims 1 to 5.