Business data processing method and device
By using visual views in a diversified business framework to encapsulate business functions into standardized business views, the problems of inconsistent interface specifications and low development efficiency are solved, rapid call and reuse of business functions are achieved, and development efficiency and resources are improved shared.
Patent Information
- Application Number
- CN202411548169.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-02-07
AI Technical Summary
Under the diversified business framework, the interface specifications developed by various business teams are not unified, resulting in complex interface call logic, low development efficiency, and poor reusability of the same business functions, which increases project cycle and resource waste.
Through the visual view, the caller can realize the rapid call and execution of target services through the business view, reducing the need for interface protocols and data parsing.
It greatly simplifies development work, shortens R&D cycle, improves development efficiency, and enhances the scalability and flexibility of the business view, facilitates developers to find and reuse business functions, and promotes innovation and resource sharing.
Smart Images

Figure CN119396385A_ABST
Abstract
Description
Technical Field
[0001] One or more embodiments of the present specification relate to the field of data processing technology, and in particular, to a method and device for processing business data. Background Art
[0002] Under a diversified business framework, a complete service ecosystem often includes multiple business segments. Each business segment is developed and maintained by an independent business team, and provides a series of core service interfaces (ServiceInterface) to support upper-level applications.
[0003] However, this decentralized system model also leads to some problems. For example, the interface specifications developed by various business teams are not unified and the calling logic is complex and changeable. As the caller of the upper-level business application, detailed communication and consultation or a large amount of guidance materials are often required to correctly connect to the service interface, resulting in reduced development efficiency. Summary of the invention
[0004] In order to solve the problems of complex interface calls and low development efficiency between service modules, the embodiments of this specification provide a business data processing method, device, business processing system, storage medium and computer program product.
[0005] In a first aspect, an embodiment of the present specification provides a method for processing business data, including:
[0006] Displaying a view management page, wherein the view management page includes multiple business views;
[0007] In response to detecting a target business view selected by a user on the view management page, displaying a business parameter page corresponding to the target business view, the business parameter page including a business identifier, input parameters, and output parameters of a target business corresponding to the target business view;
[0008] Obtaining a service request configured by a user based on the service identifier, the input parameter, and the output parameter;
[0009] Based on the service request, a target script corresponding to the target service is called and executed from a pre-configured script library to obtain a processing result of the target service.
[0010] In some implementations, obtaining a service request configured by a user based on the service identifier, the input parameter, and the output parameter includes:
[0011] An input parameter request is obtained based on at least part of the field configuration included in the input parameter, and an output parameter request is obtained based on at least part of the field configuration included in the output parameter;
[0012] The service request is obtained based on the service identifier, the input parameter request and the output parameter request configuration.
[0013] In some implementations, calling and executing a target script corresponding to the target service from a preconfigured script library based on the service request to obtain a processing result of the target service includes:
[0014] Parsing the service request, and determining the target script from the script library according to the service identifier obtained by the parsing;
[0015] Configure the target script according to the fields carried by the input parameter request obtained by parsing and execute it to obtain initial result data;
[0016] According to the fields carried by the parameter request obtained by parsing, the corresponding field results are extracted from the initial result data to obtain the processing result of the target business.
[0017] In some implementations, configuring the target script according to the fields carried by the input parameter request obtained by parsing and executing it to obtain initial result data includes:
[0018] Determining a corresponding business parameter page from a pre-configured view library according to the business identifier;
[0019] Verify the input parameter request according to the input parameters of the business parameter page, and verify the output parameter request according to the output parameters of the business parameter page;
[0020] When both the input parameter request and the output parameter request are verified and passed, the target script is configured and executed according to the fields carried by the parsed input parameter request to obtain initial result data.
[0021] In some implementations, in response to detecting that a target business view selected by a user on the view management page is displayed a business parameter page corresponding to the target business view, including:
[0022] In response to detecting a target business view selected by a user on the view management page, a business parameter page corresponding to the target business view is determined from a pre-configured view database, and the business parameter page is displayed.
[0023] In some implementations, the business processing method of this specification also includes:
[0024] In response to detecting a new view operation triggered by a user on the view management page, displaying a new view interface and a script editing tool;
[0025] Generate a first script for executing a first service based on the script editing tool, configure a first service identifier for the first service, and store the first script and the first service identifier in the script library;
[0026] Based on the first service identifier input by the user in the new view interface, and the input parameters and output parameters corresponding to the first script, a first service view corresponding to the first service and a service parameter page of the first service view are generated, and the first service view and the service parameter page are stored in a view library;
[0027] The first business view is added to the view list of the view management page.
[0028] In some implementations, the target service includes calling at least one system service through at least one interface, and the method further includes:
[0029] In the process of executing the target script, the system service is called according to the interface and calling logic specified by the target script, and the access traffic of each interface is detected, and the access to a certain interface is restricted when the access traffic of the interface exceeds the traffic upper limit of the interface.
[0030] In a second aspect, an embodiment of the present specification provides a business data processing device, including:
[0031] a page display module configured to display a view management page, the view management page including multiple business views; in response to detecting a target business view selected by a user on the view management page, display a business parameter page corresponding to the target business view, the business parameter page including a business identifier, input parameters, and output parameters of a target business corresponding to the target business view;
[0032] The business processing module is configured to obtain a business request configured by a user based on the business identifier, the input parameters and the output parameters; based on the business request, call and execute a target script corresponding to the target business from a pre-configured script library to obtain a processing result of the target business.
[0033] In some implementations, the service processing module is configured to:
[0034] An input parameter request is obtained based on at least part of the field configuration included in the input parameter, and an output parameter request is obtained based on at least part of the field configuration included in the output parameter;
[0035] The service request is obtained based on the service identifier, the input parameter request and the output parameter request configuration.
[0036] In some implementations, the service processing module is configured to:
[0037] Parsing the service request, and determining the target script from the script library according to the service identifier obtained by the parsing;
[0038] Configure the target script according to the fields carried by the input parameter request obtained by parsing and execute it to obtain initial result data;
[0039] According to the fields carried by the parameter request obtained by parsing, the corresponding field results are extracted from the initial result data to obtain the processing result of the target business.
[0040] In some implementations, the service processing module is configured to:
[0041] Determining a corresponding business parameter page from a pre-configured view library according to the business identifier;
[0042] Verify the input parameter request according to the input parameters of the business parameter page, and verify the output parameter request according to the output parameters of the business parameter page;
[0043] When both the input parameter request and the output parameter request are verified and passed, the target script is configured and executed according to the fields carried by the parsed input parameter request to obtain initial result data.
[0044] In some implementations, the page display module is configured to:
[0045] In response to detecting a target business view selected by a user on the view management page, a business parameter page corresponding to the target business view is determined from a pre-configured view database, and the business parameter page is displayed.
[0046] In some implementations, the page display module is configured to:
[0047] In response to detecting a new view operation triggered by a user on the view management page, displaying a new view interface and a script editing tool;
[0048] Generate a first script for executing a first service based on the script editing tool, configure a first service identifier for the first service, and store the first script and the first service identifier in the script library;
[0049] Based on the first service identifier input by the user in the new view interface, and the input parameters and output parameters corresponding to the first script, a first service view corresponding to the first service and a service parameter page of the first service view are generated, and the first service view and the service parameter page are stored in a view library;
[0050] The first business view is added to the view list of the view management page.
[0051] In some implementations, the service processing module is configured to:
[0052] In the process of executing the target script, the system service is called according to the interface and calling logic specified by the target script, and the access traffic of each interface is detected, and the access to a certain interface is restricted when the access traffic of the interface exceeds the traffic upper limit of the interface.
[0053] In a third aspect, the embodiments of this specification provide a business processing system, including:
[0054] Service system, used to provide services required by the business;
[0055] The transfer node is used to execute the service processing method described in any of the above implementation modes.
[0056] In a fourth aspect, an embodiment of this specification provides a storage medium storing computer instructions, wherein the computer instructions are used to implement the business processing method described in any of the above embodiments.
[0057] In a fifth aspect, an embodiment of this specification provides a computer program product, which is used to implement the business processing method described in any of the above embodiments.
[0058] The business data processing method of the implementation mode of this specification includes displaying the corresponding business parameter page when detecting the target business view selected by the user on the view management page, and obtaining the business request configured by the user according to the business identifier, input parameters, and output parameters on the business parameter page, and calling and executing the target script based on the business request to obtain the processing result. From the above, it can be seen that in the implementation mode of this specification, various business functions are encapsulated as business views in a visual way, and standardized input parameters and output parameters are defined for the business views. The caller can use the business view to quickly call and execute the target business to obtain the business result without the need for complex and cumbersome interface consultation and data analysis, which greatly simplifies the development work, shortens the R&D cycle and improves efficiency. Moreover, the scalability and flexibility of the business view are stronger, which facilitates developers to find and reuse business functions, and promotes innovation and resource sharing. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 It is a structural block diagram of a business processing system in an exemplary embodiment of this specification.
[0060] Figure 2 It is a flowchart of a business processing method in an exemplary embodiment of this specification.
[0061] Figure 3It is a view management page in an exemplary embodiment of this specification.
[0062] Figures 4a to 4c This is a business parameter page in an exemplary embodiment of this specification.
[0063] Figure 5 It is a structural block diagram of a business processing system in an exemplary embodiment of this specification.
[0064] Figure 6 It is a flowchart of a business processing method in an exemplary embodiment of this specification.
[0065] Figure 7 It is a flowchart of a business processing method in an exemplary embodiment of this specification.
[0066] Figure 8 It is a flowchart of a business processing method in an exemplary embodiment of this specification.
[0067] Fig. 9 It is a structural block diagram of a business processing device in an exemplary embodiment of this specification.
[0068] Fig.10 It is a structural block diagram of a transfer node in an exemplary implementation of this specification. DETAILED DESCRIPTION
[0069] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this manual are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0070] Under a diversified business framework, a complete service ecosystem often includes multiple business segments. Each business segment is developed and maintained by an independent business team, and provides a series of core service interfaces (ServiceInterface) to support upper-level applications.
[0071] For example, taking a financial services system, the system may include multiple business segments such as fund file management, robust infrastructure construction, selected fund recommendations, investment research / consulting, asset management, etc. Each business segment is responsible for developing and maintaining a series of service interfaces by a professional business team. The upper-level business applications can call the underlying related services through the service interfaces.
[0072] However, this decentralized system model also leads to some problems, such as: the interface specifications developed by various business teams are not unified, and the calling logic is complex and changeable. As the caller of the upper-level business application, detailed communication and consultation or a large amount of guidance materials are often required to correctly connect to the service interface, resulting in reduced development efficiency. Especially for some interface calling businesses that require customized design, when a caller team successfully connects to the underlying service, if other teams need to call the same data or service, they still need to repeatedly consult the interface development team and customize the cumbersome process of developing interface calling code. Existing calling strategies cannot be reused, which increases the project cycle and limits the efficient collaboration of resources.
[0073] Based on this, the embodiments of this specification provide a business data processing method, device, business processing system, storage medium and computer program product, which aim to encapsulate specific businesses into business scripts with standardized input and output parameters through a visual view. When the calling developer implements the same business, he only needs to execute the corresponding business script according to the standardized input and output parameters specified in the view, so as to achieve rapid docking with the underlying service or data interface without the need for complex and tedious interface consultation and data analysis, which greatly simplifies the development work, shortens the R&D cycle and improves efficiency.
[0074] Figure 1 The architecture of the business processing system of this specification is shown below. Figure 1 The application scenarios of the implementation methods of this specification are described.
[0075] exist Figure 1 In the example, the system party refers to the platform party that provides the underlying services, and the caller refers to the developer who needs to call the underlying services to implement the upper-level business application functions. Combined with the above, it can be seen that for a diversified service system, it includes multiple different business segments, namely business segments 1 to n, where each business segment is responsible for the development and maintenance of various underlying services (such as Server 1 to m) by an independent team, and provides various service interfaces for the caller to call. The service interface can be, for example, an API (Application Programming Interface). The caller developer can connect to the underlying service servers through these API interfaces to achieve a specific business function.
[0076] In the implementation mode of this specification, a business refers to a specific application function defined by the caller developer. For example, taking a financial service App as an example, the business can be "balance inquiry", "asset analysis", "industry information", etc. The App can achieve the corresponding business function by executing a certain business. When developing a certain business, the caller developer often needs to call multiple underlying services in multiple business segments of the system. However, as mentioned above, different business segments are developed and maintained by different business teams. Therefore, the protocols and specifications of the API interfaces of different business segments are not unified. Developers need to understand or consult the interface protocols and specifications of each business segment, as well as how to correctly handle responses. This process is very cumbersome and inefficient. Moreover, the businesses of different caller teams cannot be associated, which makes it impossible to reuse the same business, resulting in a large amount of resource waste, further reducing development efficiency.
[0077] Therefore, in the implementation manner of this specification, multiple different businesses can be pre-packaged as platform assets and publicly available to all caller developers in the form of a visual view. Each business is packaged as standardized input and output parameters, as well as an automated script to execute the corresponding business.
[0078] When a developer needs to implement a business function, he only needs to find the corresponding business through the visual view management page, so as to obtain the standardized input and output parameters for implementing the business, and call the script according to the standardized input and output parameters to obtain the required processing results. Developers do not need to care about the specific underlying service call logic, nor do they need to consult the service teams of different business segments for interface protocols and specifications, which greatly shortens the development cycle.
[0079] That is to say, for a specific business function, the system party or caller only needs to develop it for the first time to deposit it into a public business asset, and display the standardized input and output parameters to other caller developers in the form of a visual view. When subsequent caller developers need to implement the same or similar business functions, they only need to call the business script according to the standardized input and output parameters, without being aware of the underlying business code and interface call logic.
[0080] In the implementation of this specification, the business assets corresponding to different businesses are presented in the form of business views, some of which can be provided by the system. For example, the system can encapsulate some frequently used business functions and form corresponding business views based on the underlying services it can provide. In addition, as different callers develop various business functions, the business functions developed by the callers can be encapsulated as business views. In this way, as the system is continuously used, the business views accumulated and precipitated by the platform will become more and more abundant.
[0081] In the implementation of this specification, each business view is associated with a corresponding script. The script refers to an executable program used to implement the corresponding business function. The script encapsulates the protocol and logic code for calling the required underlying service. The system can implement the corresponding business function by running the script program. In order for the system to run the script correctly, the developer needs to correctly configure the input parameter request and output parameter request of the script. The input parameter request refers to the input parameter field specified by the script, and the output parameter request is used to specify the output parameter field that needs to be parsed from the script result data.
[0082] Therefore, in the implementation of this specification, the input parameters and output parameters of the script are standardized through the business view, so that the caller developer can know the input parameters required to execute the script and the output parameters obtained after running the script through the business view. The caller can select the required fields to configure the input parameter request and the output parameter request according to its own needs. The system configures and executes the corresponding script according to the input parameter request and the output parameter request to obtain the business processing result. Figure 2 This process is described.
[0083] like Figure 2 As shown, in some implementations, the business data processing method exemplified in this specification includes:
[0084] S210, displaying the view management page.
[0085] In the implementation of this specification, the system will provide the caller developer with a front-end view management page. On the one hand, the view management page can provide the developer with a display of existing business views, and the developer can select the business view he needs in the view management page. On the other hand, the view management page can also provide the developer with an interactive window for adding new business views, and the developer can create new business views.
[0086] For example Figure 3 The view management page of an exemplary embodiment of this specification is shown. The view management page may include all currently existing business views and provide users with corresponding business index functions. Figure 3 On the left, the view management page can provide a multi-level index directory to classify existing business views according to functional relevance, so that users can index the required business views according to the category name.
[0087] When the user selects a business view category, Figure 3 On the right side of the view management page, you can see the corresponding view list. Each row in the view list is a business view, which is used to implement a specific business function. Figure 3 In this example, the business view displayed on the view management page may include the following information:
[0088] View name: used to describe the business function corresponding to the business view. For example, taking the view name "Average Holding Duration of User Funds" in the figure as an example, it means that the business corresponding to this business view is to query and display the average holding duration of funds purchased by users.
[0089] View code: used to indicate the business identifier of the business corresponding to the business view. The business identifier is unique and is used to uniquely indicate a certain business.
[0090] Status: used to indicate the production status of the business view, that is, to inform users whether the business view is available. It is understandable that the system needs to conduct a corresponding review of the business view developed by the caller to avoid risks. Only after the review is passed can it be provided to other developers for use. Therefore, a business view needs to go through multiple stages from development to use, such as "editing - pre-release - grayscale - production". Only after completing the "production" node, it means that the business view can be fully publicly used.
[0091] Operation: refers to the operations that developers can perform on the business view, such as "edit", "view", "offline", "delete", etc. Figure 3 This is only an exemplary description, and the operations that a developer can perform are not limited to the examples in the figure, and may be more or less than the examples in the figure.
[0092] Understandably, Figure 3 The view management page shown is only an example, and the view management page of the embodiment of this specification is not limited to Figure 3 For example, those skilled in the art can understand this, and this specification will not elaborate on it.
[0093] S220 . In response to detecting that a target business view is selected by a user on a view management page, display a business parameter page corresponding to the target business view.
[0094] As can be seen from the foregoing, the front-end view management page includes multiple business views of different business functions, so that developers (i.e., users) can select the business view they need on the view management page. In the implementation manner of this specification, the business view selected by the user on the view management page is defined as the target business view, the business corresponding to the target business view is the target business, and the script associated with the target business is the target script.
[0095] For example Figure 3 In the example, developers can click "View" in the "Operation" corresponding to the target business view to view a specific business view. When the system detects that the user clicks the "View" button of a business view, it can determine the business view as the target business view and display the business parameter page corresponding to the target business view to the user.
[0096] Combined with the above, it can be seen that in order to call and run the target script of the target business, it is necessary to find the target script in the system and correctly configure the input parameter request and output parameter request of the target script. Therefore, the business parameter page of the target business view is used to record the business identifier of the target business and the input parameters and output parameters of the target script.
[0097] For example, in one example, the business parameter page of the target business can be as follows: Figures 4a to 4c As shown, the service parameter page records at least a service identifier (code), input parameters and output parameters.
[0098] The business identification code is used to uniquely identify the target business, so that the system can find the target script associated with the target business from the pre-configured script library based on the business identification code. Input parameters refer to the relevant fields that need to be input to run the target script, and output parameters refer to the relevant fields output by the system after running the target script.
[0099] like Figure 4a In the example, developers can directly see the business identifier code as fund_base_info through the business parameter page, which means "fund basic information". Figure 4b From the input parameters shown, we can see that the input field required to run the target script is "productID", that is, "product pid", and this input field is a required field. Figure 4c From the output parameters shown, we can know that after running the target script, the fields that can be output include "product_l0", "fund_name", "fund_code", "product_l2" and many other fields.
[0100] From this example, we can see that the input parameters and output parameters of the business parameter page are standardized parameter definitions without complex code language. Through this standardized input and output parameter definition, developers can clearly and intuitively understand which input parameter fields are required to run the target business and which output parameter fields can be obtained. In other words, the role of the business parameter page is to display information. Developers can view the business identifier, input parameters, and output parameters required to run the target script of the target business through the business parameter page.
[0101] S230: Obtain a service request configured by the user based on the service identifier, input parameters, and output parameters.
[0102] In the implementation manner of this specification, for a target script, the input parameters required to run the script may include many fields, and similarly, the output parameters may also include many fields.
[0103] For example Figure 4b In the example, the input parameter field required to run the target script is "productID", and this field is a mandatory field, which means that if you want to run the target script correctly, the information of this field must be provided in the input parameter request. In other examples, the input parameters of the target script may also include other non-mandatory fields. Developers can select the required fields from these fields to configure the input parameter request according to their own business needs. Similarly, for example Figure 4c In the example, the output parameters of the target script also contain many fields, but not all of these fields are required by the developer. For example, the developer may only need one or several fields as the output result. Therefore, the developer can select the required fields from these fields to configure the parameter request.
[0104] From this, it can be understood that on the basis of displaying the input parameters and output parameters of the target script to developers on the business parameter page, developers can select some or all of the fields from these input parameters and output parameters to configure the corresponding business request according to their own business needs. The business request needs to include a business identifier, an input parameter request, and an output parameter request. Among them, the business identifier is used to uniquely identify the target business, and the system can find the target script corresponding to the target business from the script library based on the business identifier. The input parameter request is used to configure the input parameters of the target script so that the target script can be executed correctly. The output parameter request is used to extract the fields required by the user from the data results of the target script to obtain the final business processing result.
[0105] S240: Based on the service request, a target script corresponding to the target service is called from a pre-configured script library and executed to obtain a processing result of the target service.
[0106] In the implementation mode of this specification, the script library refers to a database for storing and managing scripts corresponding to each business view, wherein each script is associated with a business identifier of the business corresponding to it. Therefore, after the system obtains a business request configured by the user, the corresponding target script can be found from the script library according to the business identifier carried in the business request. The target script refers to an automated script program that implements the target business function, and its internal code specifies the interface call and logic rules for the underlying services of the system.
[0107] After determining the target script, you can configure the target script according to the input parameter request carried in the business request, and then the system runs the configured target script to obtain the corresponding data result. According to the above example, the data result output by the target script includes many fields, and then the system further extracts the fields specified by the parameter request from the data result according to the output parameter request carried in the business request to obtain the final business processing result.
[0108] From the above, we can see that for the caller developer, he only needs to view the business identifier and standardized parameters of the required business from the view management page, and then configure the business request based on these data. The system can automatically execute the script program to achieve end-to-end business result output. Developers do not need to care about the protocol specifications and call logic of the underlying service interface, nor do they need to understand the parsing method of the response results of the underlying service to achieve the required business functions, which greatly simplifies development operations, shortens the R&D cycle, and improves development efficiency.
[0109] For the system side, as dynamic business views accumulate, the platform can accumulate a large amount of business assets and increase market value. Moreover, by counting the usage frequency of business views, it can respond to market changes in a timely manner, understand the direction of business development, and dynamically adjust and optimize view management strategies according to the usage frequency of business views to improve flexibility and scalability.
[0110] From the above, it can be seen that in the implementation of this specification, various business functions are encapsulated as business views in a visual way, and standardized input and output parameters are defined for the business views. The caller can use the business view to quickly call and execute the target business and obtain business results without complex and cumbersome interface consultation and data analysis, which greatly simplifies the development work, shortens the R&D cycle and improves efficiency. In addition, the business view has stronger scalability and flexibility, which makes it easier for developers to find and reuse business functions, and promotes innovation and resource sharing.
[0111] In the implementation of this specification, it is necessary to pre-build the business views and scripts of each business, and then the caller can reuse the corresponding business functions according to the business view. Figure 5 The architecture of the business processing system shown further illustrates the business data processing method of this specification.
[0112] exist Figure 5 In this example, we will take the "first business" as an example to explain the specific process of caller 1 building the business view of the first business and caller 2 using the business view of the first business. Figure 5 As shown, the system architecture of the implementation method of this specification may mainly include a front end, a database, a transfer node, and a service system. The front end refers to the front end page for displaying the view management page. The database (DB) refers to a data storage device for storing business view related data. For example, in an example, the database may include a view library and a script library. The view library is used to store various business views and business parameter pages, and the script library is used to store scripts for various businesses. The service system refers to the aforementioned Figure 1A system platform used to provide various underlying services. A transfer node refers to a computing node used to execute the steps of the business data processing method of this specification. The transfer node can call various underlying services through the API interface provided by the service system.
[0113] exist Figure 5 As shown, Figure 6 As shown, in the business processing method in the implementation mode of this specification, the process of adding a new business view includes:
[0114] S610: In response to detecting a new view operation triggered by a user on a view management page, displaying a new view interface and a script editing tool.
[0115] S620: Generate a first script for executing the first service based on a script editing tool, configure a first service identifier for the first service, and store the first script and the first service identifier in a script library.
[0116] Combination Figure 3 As shown in the view management page, when caller 1 wants to add the first business view of the first business, the user of caller 1 can click the "Add" button on the view management page, so that the front-end system can detect the new view operation triggered by the user and display the new view interface and script editing tool to the user.
[0117] As can be seen from the foregoing, each business view needs to be associated with a script and a business parameter page. Therefore, in the implementation of this specification, when the caller 1 triggers the operation of adding a new first business view, the front-end system can display the new view interface and script editing tool respectively.
[0118] The script editing tool is used to write a code program for executing a first script of a first business. A user can use the script editing tool to write the relevant logic code of the first business. The logic code includes the underlying service to be called and its interface specification and calling logic. For example, in one example, the script editing tool can be a Groovy script editing tool, so that the Groovy script corresponding to the first business is written by using the tool, which is the first script defined in this specification.
[0119] Of course, those skilled in the art can understand that the scripts in this specification are not limited to Groovy scripts, but can also be scripts written in any other programming language, and this specification does not limit this. In addition, those skilled in the art can undoubtedly implement script programming in combination with computer knowledge, and this specification will not repeat the specific script programming process.
[0120] During the programming of the first script, the caller 1 can specify the input parameters and output parameters corresponding to the first script, such as which fields the input parameters include and which fields the output parameters include. At the same time, the caller 1 can manually assign a first service identifier to the first service, or the system can automatically assign a first service identifier to the first service, and the first service identifier is used to uniquely indicate the first service.
[0121] Combination Figure 5 As shown, after the user edits the first script on the front end, the first script program can be stored in the database DB. When storing the first script, the database DB will establish an association relationship between the first script and the first script identifier, so that the data corresponding to the first script can be uniquely indexed according to the first script identifier.
[0122] In some implementations, the database DB may include a script library, which is used to store scripts for various services, so that the first script may be stored in the script library of the database DB. Figure 5 In the example, the database DB can further move the first script and the first script identifier to the transfer node. A script library can also be constructed in the transfer node, and the association relationship between the first script and the first script identifier can be stored in the library.
[0123] S630. Based on the first business identifier input by the user in the new view interface, and the input parameters and output parameters corresponding to the first script, generate a first business view corresponding to the first business, and a business parameter page of the first business view, and store the first business view and the business parameter page in the view library.
[0124] S640: Add a first business view to the view list on the view management page.
[0125] The above S610 to S620 illustrate the process of creating the first script of the first service. Meanwhile, a service view of the first service also needs to be created. Figures 4a to 4c As shown, the new view interface can be used with Figures 4a to 4c Similarly, since the caller 1 fills in the interface content according to the first service identifier of the first service and the input / output parameters of the first script, for example, the first service identifier and name are filled in as follows Figure 4a In the text box shown, fill in the input parameters of the first script as follows Figure 4b In the text box shown, fill in the output parameters of the first script as follows Figure 4c in the text box shown.
[0126] Of course, those skilled in the art will appreciate that the caller 1 can edit and modify the newly added view interface according to specific circumstances. Figures 4a to 4c This is just an example and does not need to be followed completely. Figures 4a to 4cAs shown, as long as the standardized definitions of input parameters and outputs are met.
[0127] After the caller 1 completes editing the newly added view interface through the above process, the user of the caller 1 can click the Save or Finish button, and the system can generate the first business view and business parameter page corresponding to the first business. The first business view can be Figure 3 As shown in the Figures 4a to 4c shown.
[0128] Reference Figure 5 As shown, the database DB may include a view library, which is used to store the business views and business parameter pages of each business. The database DB may establish an association relationship between the first business identifier and the first business view and the business parameter page, and then store them in the library. At the same time, the view management page may be stored in, for example, Figure 3 In the view list shown, a business view corresponding to the first business is newly added. Of course, those skilled in the art can understand that the view management page can classify and display the first business view according to the view classification filled in by the caller 1, and this disclosure will not go into details.
[0129] Through the above process, the developer user of caller 1 realizes the addition of the first business, the view library of the database DB stores the first business view and business parameter view of the first business, and the script library of the transit node stores the first script of the first business.
[0130] The following will take the first service as the target service as an example to illustrate the specific process of the caller 2 multiplexing the first service to obtain the service result.
[0131] like Figure 7 As shown, in some implementations, the business data processing method of this specification includes:
[0132] S710: Display a view management page, and when detecting a target business view selected by a user, display a business parameter page corresponding to the target business view.
[0133] Combination Figure 5 As shown, for caller 2, when it wants to use the existing first business view, the system can first display the view management page to caller 2 through the front end. The view management page is shown in Example 3, so that the user of caller 2 can select the first business view he wants to use through the view management page, and then click the "View" button. The system can detect that the target business view selected by the user is the first business view. Next, the system can find the corresponding business parameter page from the view library of the database DB according to the business identification code included in the target business view, and display the business parameter page on the front end. The business parameter page is shown in Example 3. Figures 4a to 4cAs shown, it at least includes the service identification code, input parameters and output parameters of the target service.
[0134] S720. Obtain an input parameter request based on at least part of the field configuration included in the input parameters, and obtain an output parameter request based on at least part of the field configuration included in the output parameters, and obtain a business request based on the business identifier, the input parameter request, and the output parameter request configuration.
[0135] Combination Figures 4a to 4c as well as Figure 5 As shown, for the caller 2 user, he can see the business identification code, input parameters and output parameters of the target business through the business parameter page displayed on the front end.
[0136] Combined with the above, it can be understood that although the input parameters and output parameters of the target business include many fields, the business function required by caller 2 may not require all the fields. Therefore, caller 2 can select some or all fields from the input parameters to configure the input parameter request, select some or all fields from the output parameters to configure the output parameter request according to its own needs, and obtain the business request of the target business in combination with the business identifier, see Figure 5 As shown, caller 2 can send the service request to the transit node.
[0137] S730, parse the business request, and determine the target script according to the parsed business identifier, configure the target script according to the fields carried by the parsed input request and execute it to obtain initial result data.
[0138] S740. According to the fields carried in the parameter request obtained by parsing, the corresponding field results are extracted from the initial result data to obtain the processing result of the target business.
[0139] See also Figure 5 As shown, after receiving the business request, the transit node obtains the business identifier, input parameter request and output parameter request by parsing the business request. First, find the corresponding script, that is, the target script, from the script library according to the business identifier. Secondly, in order to correctly run the target script, configure the target script according to the field information carried in the input parameter request, and the target script can be executed after the configuration is completed. It is worth noting that in the process of executing the target script, the system can access the service system interface according to the API interface and calling logic specified by the script by executing the script program code, thereby realizing the call of the underlying services and data.
[0140] By executing the target script, the response result of the service system, that is, the initial result data, can be obtained. As mentioned above, the initial result data may include many irrelevant fields, so the system extracts the field results of the relevant fields from the initial result data according to the fields carried in the parameter request, and obtains the business processing result of the target business, and outputs the processing result to the caller 2 user.
[0141] From the above process, we can see that when using the target business view, caller 2 only needs to configure a small number of input and output parameters as business requests to implement end-to-end business processing functions and obtain processing results. There is no need to worry about the underlying complex interface calls and result parsing. Moreover, for the same business functions, all developers can avoid repeated development by reusing business views, which greatly avoids resource waste, improves development efficiency, and promotes innovation and resource sharing.
[0142] In addition, it is worth noting that in the business processing of related technologies, the caller host generally directly calls the service interfaces of the service platform. In the implementation of this specification, a transfer node is used to implement data interaction processing between the caller host and the service system and database DB. The centralized transfer node design facilitates unified monitoring and flow control of business views and scripts, for example Figure 5 As shown, when the target script is executed, the transit node needs to call the underlying service by accessing the API interface of the service system. In a high-concurrency scenario, frequent calls to a service may cause system overload. Therefore, when the target script is running, access traffic monitoring can be implemented on the transit node side. When the access traffic exceeds the traffic upper limit of the interface, the access of the business application to the interface can be limited by limiting the flow, thereby preventing system overload and ensuring system stability.
[0143] At the same time, the design of the transfer node can also provide great convenience for the management and maintenance of subsequent views and scripts. As the caller user, he does not need to understand or adjust to readapt to the newly added views or script assets, simplifying the development process. Figure 5 As shown, when caller 1 adds or modifies a business view, the transit node completes the modification and update of the business view or script, and caller 2 can use the newly added or modified business view to implement the corresponding business processing operations without being aware of it, which facilitates the management and maintenance of the business view.
[0144] In some implementations, considering that the service request for executing the target script is manually configured by the caller 2 user, if the service request configuration is wrong, for example, the caller 2 user configures an incorrect field in the input parameter request, the transit node may cause a program error when running the target script according to the incorrect service request. Therefore, before executing the target script, the transit node can verify the service request and only run the target script if the verification passes. Figure 8 Provide explanation.
[0145] like Figure 8 As shown, in some implementations, the business processing method exemplified in this specification, before configuring and executing the target script according to the input parameter request, further includes:
[0146] S731. Determine a corresponding business parameter page from a pre-configured view library according to the business identifier.
[0147] S732. Verify the input parameter request according to the input parameters of the business parameter page, and verify the output parameter request according to the output parameters of the business parameter page.
[0148] S733. When all verifications are passed, configure the target script and execute it to obtain initial result data.
[0149] In combination with the above S730, after obtaining the service request, the transfer node obtains the service identifier, input parameter request and output parameter request by parsing the service request. Then, the transfer node can access the view library through the database DB, and the view library finds the corresponding service parameter page according to the service identifier and returns it to the transfer node.
[0150] It can be understood that the business parameter page records the input parameters and output parameters corresponding to the target business. Under normal circumstances, the fields carried in the input parameter request of the business request should belong to the fields in the input parameters. Similarly, the fields carried in the output parameter request should belong to the fields in the output parameter. Based on this, the transit node can match the fields carried in the input parameter request with the fields in the input parameters. If the match is successful, it is determined that the input parameter request has passed the verification. At the same time, the fields carried in the output parameter request can be matched with the fields in the output parameters. If the match is successful, it is determined that the output parameter request has passed the verification.
[0151] If both the input parameter request and the output parameter request are verified, it means that the business request is verified and the target script can be executed correctly, so that the aforementioned S730 process can be executed to configure and run the target script to obtain the initial result data. On the contrary, if either the input parameter request or the output parameter request fails to be verified, it means that the business request fails to be verified and the target script cannot be run correctly. At this time, the target script is not executed, but an error message is returned to the user to prompt the user to modify the business request.
[0152] It can be seen from the above that in the implementation mode of this specification, the stable and reliable operation of the system is ensured by verifying the service request through the transit node.
[0153] In addition, according to the above, when the target script is executed, the transit node needs to call the underlying service by accessing the API interface of the service system. In a high-concurrency scenario, frequent calls to a certain service may cause system overload. Therefore, in some embodiments, when the target script is running, the transit node and / or the service system can monitor the access traffic of each interface in real time. When the access traffic exceeds the upper limit of the interface traffic, the access of the business application to the interface can be limited by current limiting, thereby preventing system overload and ensuring system stability.
[0154] In some implementations, this specification provides a business data processing device, such as Fig. 9 As shown, the device comprises:
[0155] The page display module 10 is configured to display a view management page, the view management page including multiple business views; in response to detecting a target business view selected by a user on the view management page, display a business parameter page corresponding to the target business view, the business parameter page including a business identifier, input parameters, and output parameters of a target business corresponding to the target business view;
[0156] The business processing module 20 is configured to obtain a business request configured by a user based on the business identifier, the input parameters and the output parameters; based on the business request, call and execute a target script corresponding to the target business from a pre-configured script library to obtain a processing result of the target business.
[0157] In some implementations, the service processing module 20 is configured to:
[0158] An input parameter request is obtained based on at least part of the field configuration included in the input parameter, and an output parameter request is obtained based on at least part of the field configuration included in the output parameter;
[0159] The service request is obtained based on the service identifier, the input parameter request and the output parameter request configuration.
[0160] In some implementations, the service processing module 20 is configured to:
[0161] Parsing the service request, and determining the target script from the script library according to the service identifier obtained by the parsing;
[0162] Configure the target script according to the fields carried by the input parameter request obtained by parsing and execute it to obtain initial result data;
[0163] According to the fields carried by the parameter request obtained by parsing, the corresponding field results are extracted from the initial result data to obtain the processing result of the target business.
[0164] In some implementations, the service processing module 20 is configured to:
[0165] Determining a corresponding business parameter page from a pre-configured view library according to the business identifier;
[0166] Verify the input parameter request according to the input parameters of the business parameter page, and verify the output parameter request according to the output parameters of the business parameter page;
[0167] When both the input parameter request and the output parameter request are verified and passed, the target script is configured and executed according to the fields carried by the parsed input parameter request to obtain initial result data.
[0168] In some implementations, the page display module 10 is configured to:
[0169] In response to detecting a target business view selected by a user on the view management page, a business parameter page corresponding to the target business view is determined from a pre-configured view database, and the business parameter page is displayed.
[0170] In some implementations, the page display module 10 is configured to:
[0171] In response to detecting a new view operation triggered by a user on the view management page, displaying a new view interface and a script editing tool;
[0172] Generate a first script for executing a first service based on the script editing tool, configure a first service identifier for the first service, and store the first script and the first service identifier in the script library;
[0173] Based on the first service identifier input by the user in the new view interface, and the input parameters and output parameters corresponding to the first script, a first service view corresponding to the first service and a service parameter page of the first service view are generated, and the first service view and the service parameter page are stored in a view library;
[0174] The first business view is added to the view list of the view management page.
[0175] In some implementations, the service processing module 20 is configured to:
[0176] In the process of executing the target script, the system service is called according to the interface and calling logic specified by the target script, and the access traffic of each interface is detected, and the access to a certain interface is restricted when the access traffic of the interface exceeds the traffic upper limit of the interface.
[0177] In some embodiments, this specification provides a business processing system, see Figure 5 As shown, the system includes:
[0178] Service system, used to provide services required by the business;
[0179] The transfer node is used to execute the service processing method described in any of the above implementation modes.
[0180] exist Figure 5 In the example, the business processing system also includes a database, a front end, etc., which will not be described in detail in this specification.
[0181] In some implementations, this specification provides a storage medium storing computer instructions, wherein the computer instructions are used to implement the business processing method described in any of the above implementations.
[0182] In some implementations, this specification provides a computer program product, which is used to implement the business processing method described in any of the above implementations.
[0183] Fig.10 is a schematic structural diagram of a transfer node provided by an exemplary embodiment. Figure 7 At the hardware level, the transit node includes a processor 702, an internal bus 704, a network interface 706, a memory 708, and a non-volatile memory 710, and may also include hardware required for other functions. One or more embodiments of this specification may be implemented based on software, such as the processor 702 reading the corresponding computer program from the non-volatile memory 710 into the memory 708 and then running it. Of course, in addition to the software implementation, one or more embodiments of this specification do not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but may also be hardware or logic devices.
Claims
1. A business data processing method, characterized in that: include: Displaying a view management page, wherein the view management page includes multiple business views; In response to detecting a target business view selected by a user on the view management page, displaying a business parameter page corresponding to the target business view, the business parameter page including a business identifier, input parameters, and output parameters of a target business corresponding to the target business view; Obtaining a service request configured by a user based on the service identifier, the input parameter, and the output parameter; Based on the service request, a target script corresponding to the target service is called and executed from a pre-configured script library to obtain a processing result of the target service.
2. The method according to claim 1, characterized in that The obtaining of the service request of the user configured based on the service identifier, the input parameter and the output parameter includes: An input parameter request is obtained based on at least part of the field configuration included in the input parameter, and an output parameter request is obtained based on at least part of the field configuration included in the output parameter; The service request is obtained based on the service identifier, the input parameter request and the output parameter request configuration.
3. The method according to claim 2, characterized in that The calling and executing the target script corresponding to the target service from the pre-configured script library based on the service request to obtain the processing result of the target service includes: Parsing the service request, and determining the target script from the script library according to the service identifier obtained by the parsing; Configure the target script according to the fields carried by the input parameter request obtained by parsing and execute it to obtain initial result data; According to the fields carried by the parameter request obtained by parsing, the corresponding field results are extracted from the initial result data to obtain the processing result of the target business.
4. The method according to claim 3, characterized in that The target script is configured and executed according to the fields carried by the input parameter request obtained by parsing to obtain initial result data, including: Determining a corresponding business parameter page from a pre-configured view library according to the business identifier; Verify the input parameter request according to the input parameters of the business parameter page, and verify the output parameter request according to the output parameters of the business parameter page; When both the input parameter request and the output parameter request are verified and passed, the target script is configured and executed according to the fields carried by the parsed input parameter request to obtain initial result data.
5. The method according to claim 1, characterized in that: In response to detecting a target business view selected by a user on the view management page, displaying a business parameter page corresponding to the target business view includes: In response to detecting a target business view selected by a user on the view management page, a business parameter page corresponding to the target business view is determined from a pre-configured view database, and the business parameter page is displayed.
6. The method according to any one of claims 1 to 5, characterized in that: Also includes: In response to detecting a new view operation triggered by a user on the view management page, displaying a new view interface and a script editing tool; Generate a first script for executing a first service based on the script editing tool, configure a first service identifier for the first service, and store the first script and the first service identifier in the script library; Based on the first service identifier input by the user in the new view interface, and the input parameters and output parameters corresponding to the first script, a first service view corresponding to the first service and a service parameter page of the first service view are generated, and the first service view and the service parameter page are stored in a view library; The first business view is added to the view list of the view management page.
7. The method according to any one of claims 1 to 5, characterized in that: The target business includes calling at least one system service through at least one interface, and the method further includes: In the process of executing the target script, the system service is called according to the interface and calling logic specified by the target script, and the access traffic of each interface is detected, and the access to a certain interface is restricted when the access traffic of the interface exceeds the traffic upper limit of the interface.
8. A business data processing device, characterized in that: include: A page display module, configured to display a view management page, wherein the view management page includes multiple business views; In response to detecting a target business view selected by a user on the view management page, displaying a business parameter page corresponding to the target business view, the business parameter page including a business identifier, input parameters, and output parameters of a target business corresponding to the target business view; A service processing module, configured to obtain a service request configured by a user based on the service identifier, the input parameter and the output parameter; Based on the service request, a target script corresponding to the target service is called and executed from a pre-configured script library to obtain a processing result of the target service.
9. A business processing system, characterized in that: include: Service system, used to provide services required by the business; A transfer node, used to execute the business data processing method according to any one of claims 1 to 7.
10. A storage medium, characterized in that: Computer instructions are stored, and the computer instructions are used to implement the business data processing method according to any one of claims 1 to 7.
11. A computer program product, characterized in that The computer program product is used to implement the business data processing method according to any one of claims 1 to 7.