WO2020024458A1 - Service interface management method and apparatus, and storage medium and computer device - Google Patents

Service interface management method and apparatus, and storage medium and computer device Download PDF

Info

Publication number
WO2020024458A1
WO2020024458A1 PCT/CN2018/111708 CN2018111708W WO2020024458A1 WO 2020024458 A1 WO2020024458 A1 WO 2020024458A1 CN 2018111708 W CN2018111708 W CN 2018111708W WO 2020024458 A1 WO2020024458 A1 WO 2020024458A1
Authority
WO
WIPO (PCT)
Prior art keywords
service
service controller
configuration information
controller
processing request
Prior art date
Application number
PCT/CN2018/111708
Other languages
French (fr)
Chinese (zh)
Inventor
赖云辉
龙觉刚
孙成
叶俊锋
罗先贤
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2020024458A1 publication Critical patent/WO2020024458A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0806Configuration setting for initial configuration or provisioning, e.g. plug-and-play
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/0816Configuration setting characterised by the conditions triggering a change of settings the condition being an adaptation, e.g. in response to network events
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services

Definitions

  • the present application relates to the field of communication technologies, and in particular, to a method and an apparatus for managing a service interface, a storage medium, and a computer device.
  • this application provides a method and device for managing a service interface, a storage medium, and a computer device.
  • the main purpose is that the existing service interface has a large number of entity classes for parameter transmission due to different business requirements.
  • the business code of the APP interface is numerous and messy, and multiple requests need to be authorized separately.
  • a method for managing a service interface including:
  • the service controller When the service controller receives the service processing request sent by the APP interface, it extracts the configuration information to be initialized corresponding to the to-be-processed service requested by the service processing request in the configuration file, and different business logic is stored in the configuration file. Corresponding configuration information;
  • the service controller initializes the configuration information according to initialization parameters to be configured and service information in the service processing request;
  • the service controller sends initialized configuration information to the service class of the service controller
  • the service class of the service controller parses a service processing request type in the configuration information, and performs service processing according to the parsed type;
  • the service class of the service controller feeds back the processing result to the APP interface through the service controller.
  • a management device for a service interface including:
  • An extracting unit configured to: when the service controller receives a service processing request sent by the APP interface end, extract the configuration information to be initialized corresponding to the pending service requested by the service processing request in the configuration file, in the configuration file Stores configuration information corresponding to different business logic;
  • An initialization unit configured to initialize the configuration information by the service controller according to initialization parameters and service information to be configured in the service processing request;
  • a sending unit configured to send the initialized configuration information by the service controller to a service class of the service controller
  • a processing unit configured to analyze a service processing request type in the configuration information by a service class of the service controller, and perform business processing according to the parsed type;
  • the feedback unit is used by the service class of the service controller to feedback the processing result to the APP interface end through the service controller.
  • a non-volatile readable storage medium stores at least one computer-readable instruction, and the computer-readable instruction causes a processor Perform operations corresponding to the management methods of the service interface described above.
  • a computer device including: a processor, a memory, a communication interface, and a communication bus, and the processor, the memory, and the communication interface complete each other through the communication bus.
  • the memory is configured to store at least one computer-readable instruction, and the computer-readable instruction causes the processor to perform an operation corresponding to the management method of the service interface.
  • This application provides a method and device for managing a service interface, a storage medium, and a computer device.
  • a service controller receives a service processing request sent by an APP interface, the service controller first extracts a request from the service processing request described in the configuration file.
  • the configuration information corresponding to the processing to be initialized is processed, and the configuration information corresponding to different business logic is stored in the configuration file; the service controller initializes the configuration information according to the initialization parameters to be configured in the service processing request and the service information.
  • the service controller extracts the interface with the external APP interface. The configuration information of the sent business processing request, and initialize the configuration information according to the parameters and business information in the business processing request.
  • FIG. 1 shows a timing flowchart of a method for managing a service interface according to an embodiment of the present application
  • FIG. 2 shows a timing flowchart of another method for managing a service interface provided by an embodiment of the present application
  • FIG. 3 shows a timing flowchart of still another method for managing a service interface according to an embodiment of the present application
  • FIG. 4 shows a block diagram of a management device for a service interface according to an embodiment of the present application
  • FIG. 5 shows a block diagram of a management device for another service interface according to an embodiment of the present application
  • FIG. 6 is a schematic structural diagram of a computer device according to an embodiment of the present application.
  • An embodiment of the present application provides a method for managing a service interface. As shown in FIG. 1, the method includes:
  • the APP interface sends a service processing request to the service controller.
  • the service controller extracts configuration information to be initialized corresponding to the to-be-processed service requested by the service processing request in the configuration file.
  • the configuration file stores configuration information corresponding to different business logic.
  • the business logic is the business process that the system refers to when executing business requirements
  • the configuration information is the parameter information and business information that require the system to run when the business process is executed.
  • the parameters of the passing entity class are not specifically limited in the embodiments of the present application.
  • the configuration file in the embodiment of the present application is a file set in the service controller in advance, and configuration information corresponding to business logic that can be executed by all service interfaces is stored in this configuration file, so that the service control
  • the processor receives the service processing request sent by the APP interface, it directly extracts the configuration information in the configuration file and initializes the parameters.
  • the service processing request sent by the APP interface side is the service processing requested by the interface of the APP interface side.
  • the service processing request sent by the APP interface end received by the service controller is sent by the external APP interface end.
  • the service processing includes general services that can be performed by each service interface, such as receiving requests, returning information,
  • the calibration parameters and the like are not specifically limited in the embodiments of the present application.
  • the configuration information to be initialized in the embodiments of the present application is parameter information of resetting that needs to be performed by the business logic corresponding to the service processing request. Therefore, in order to meet the requirements of different business logic, the configuration information needs to be initialized so that Meet the parameter settings performed by business logic objects.
  • the service controller initializes the configuration information according to initialization parameters to be configured and service information in the service processing request.
  • the initialization parameter is a parameter configured according to the business logic to be processed in the service processing request, and the business information is the specific business logic or business process to be executed, such as deleting data of a user browsing a webpage within a certain period of time,
  • the specific business information that needs to be executed in this business logic may include the search time period, the data of the user browsing the website, and deletion.
  • the initialization parameters to be configured are the parameters specifically executed by the code in these business logics.
  • the configuration information is initialized according to the initialization parameters and the service information, so as to obtain the service processing process matching the service processing request.
  • the initialization process is to configure the parameters and business logic in the configuration information to match the parameters of the business process and
  • the business logic is not specifically limited in the embodiments of the present application.
  • the service controller sends initialization configuration information to a service class of the service controller.
  • the service class is a predefined InteractHouseRoService service class, which is used to uniformly manage all the services sent by the APP interface end, that is, the entire processing flow of receiving and managing external requests.
  • the service controller sends the initialized configuration information to the service class, and the service class performs processing according to the received configuration information.
  • the service class of the service controller parses a service processing request type in the configuration information, and performs service processing according to the parsed type.
  • the processing process is to parse the service processing request type in the configuration information.
  • the service processing request type includes SQL type and Service type.
  • Different types of business processing request types correspond to different processing methods. For example, when it is of SQL type, it is not necessary to call the business class in the business service layer to execute the corresponding business processing. It only needs to add, delete, and modify from the database in the data layer according to the detailed data in the configuration information. This application The examples are not specifically limited.
  • the service class of the service controller feeds back the processing result to the APP interface end through the service controller.
  • the processing result is returned to the service controller, and the processing result is fed back to the APP interface end through the service controller, thereby reducing the number of APP interface ends.
  • Branch judgment which regulates the process of interaction with each interface of the APP interface.
  • This application provides a method for managing a service interface. Due to the different business requirements, the existing service interface is designed with a large number of entity classes for parameter passing, which will result in a large number of messy business codes for the APP interface for the business.
  • the embodiment uses the service controller to extract the configuration information of the service processing request sent to the external APP interface, and initializes the configuration information according to the parameters and business information in the service processing request. The initialization configuration information is sent to the service class.
  • An embodiment of the present application provides another method for managing a service interface. As shown in FIG. 2, the method includes:
  • the service controller defines a service class configured in the service controller.
  • a service class is defined in advance, that is, the InteractHouseRoService service class.
  • the service class is The business logic of different interfaces is extracted from the interface service classes of different APP interface ends. Among them, this service class is defined and configured in the service controller. After the service controller obtains the configuration information that needs to be initialized from the configuration file, it sends the initialized configuration information to the service class.
  • the service class can be based on the business logic of different interfaces.
  • the processing service is not specifically limited in the embodiment of the present application.
  • the APP interface sends a service processing request to the service controller.
  • the service controller extracts configuration information to be initialized corresponding to the pending service requested by the service processing request described in the configuration file.
  • This step is the same as the method of step 101 shown in FIG. 1, and details are not described herein again.
  • the service controller judges whether the APP interface terminal is authorized to perform service processing according to user rights.
  • the service system configures a service permission for the APP interface end to perform business processing, it is necessary to determine whether the APP interface end is authorized to perform services according to user permissions. Processing, that is, judging whether the interface of the APP interface side is registered for permissions according to the user permissions.
  • the user authority may include identity verification, level verification, etc. of the APP interface end, which is not specifically limited in the embodiment of the present application.
  • the user authority verification process in step 203 is performed in the service controller, so that after the verification, the APP interface is authorized to perform business processing, and the service controller executes the steps in step 204b.
  • the process of judging user rights may backup the interface information with user rights to the authorized white list in the service controller for the external APP interface end in advance, and then receive the business processing sent by the APP interface end When requesting, it is judged according to the interface information carried whether it exists in the white list of rights and if it exists, it indicates the right.
  • the service controller sends a permissionless processing result to the APP interface.
  • the service controller in order to promptly notify the APP interface that the permission verification fails, when the APP interface is not authorized to perform business processing, the service controller sends the result of the unauthorized processing to the APP interface, so that the APP interface can perform the processing. Reset the interface.
  • step 204b parallel to step 204a, the service controller initializes the configuration information according to initialization parameters and service information to be configured in the service processing request.
  • step 102 is the same as the method of step 102 shown in FIG. 1, and details are not described herein again.
  • step 205 the service controller sends initialization configuration information to the service class of the service controller.
  • step 103 is the same as the method of step 103 shown in FIG. 1, and details are not described herein again.
  • the service class of the service controller queries the database for data corresponding to the configuration information, and processes the data. .
  • the service controller transmits the initialized configuration information to the service class Service.
  • the Service the specific information in the configuration information is parsed, and the type of the business processing request is determined to be SQL type. You need to call the business class in the business service layer to perform the corresponding business processing. You only need to add, delete, and modify from the database in the data layer according to the detailed data in the configuration information.
  • the service class of the service controller feeds back the processing result to the APP interface through the service controller.
  • step 104 is the same as the method of step 104 shown in FIG. 1, and details are not described herein again.
  • step 207 includes: the service class feeds back the processed business processing result to the service controller, and the service controller records the APP interface and the business processing Requesting a correspondence between the service processing results, and feeding back the service processing results to the APP interface.
  • the business process in order to facilitate receiving the same business processing request sent from the APP interface side again, the business process can be directly performed.
  • the service controller receives the result of the service class processing, the APP interface side, The business processing request and the business processing result are stored with a corresponding relationship, and the current business processing result is fed back to the APP interface.
  • the embodiment of the present application may further include:
  • the APP interface sends a service interface update request to the service controller.
  • the service controller updates parameters and service information in a configuration file in the service control according to an update content carried in the service interface update request.
  • the parameters and service information in the configuration file can be updated to implement each The business interface is updated, thereby reducing the design of the parameter passing entity class when the business interface makes a request, saving human resources for code changes.
  • This application provides another method for managing a business interface.
  • the service controller extracts configuration information of a service processing request sent from an external APP interface, and configures the configuration information according to parameters and service information in the service processing request.
  • Initialize by sending the initialized configuration information to the service class for business processing, it is easy to understand business logic, high maintainability of business logic code, reduce the coupling of multiple general business code segments, and avoid designing excessive business processing
  • the request name and too many parameter passing entity classes are designed to achieve clear code, low coupling, and strong management, thereby avoiding waste of human resources, reducing time consumption, and improving the management efficiency of business interfaces.
  • An embodiment of the present application provides another method for managing a service interface. As shown in FIG. 3, the method includes:
  • a service controller defines a service class configured in the service controller.
  • This step is the same as the method of step 201 shown in FIG. 2, and details are not described herein again.
  • the APP interface sends a service processing request to the service controller.
  • the service controller extracts configuration information to be initialized corresponding to the pending service requested by the service processing request in the configuration file.
  • This step is the same as the method of step 202 shown in FIG. 2, and details are not described herein again.
  • the service controller judges whether the APP interface terminal is authorized to perform service processing according to user rights.
  • the service controller sends a permissionless processing result to the APP interface.
  • step 204a This step is the same as the method of step 204a shown in FIG. 2, and details are not described herein again.
  • step 304b parallel to step 304a, the service controller initializes the configuration information according to initialization parameters to be configured in the service processing request and service information.
  • step 102 is the same as the method of step 102 shown in FIG. 1, and details are not described herein again.
  • step 305 after step 304b the service controller sends initialization configuration information to the service class of the service controller.
  • step 103 is the same as the method of step 103 shown in FIG. 1, and details are not described herein again.
  • the service class of the service controller reflects a call to a business service class corresponding to the configuration information, and performs the process through the business service class. Business processing.
  • the service controller transmits the initialized configuration information to the service class Service.
  • the specific information in the configuration information is parsed, and the type of the service processing request is determined to be the Service type.
  • the specific content in the configuration information calls the service class corresponding to the business logic. If it can be determined that the business logic is supplemental recording information based on the specific content in the configuration information, the supplemental recording service class is called for business processing.
  • the service class of the service controller feeds back the processing result to the APP interface end through the service controller.
  • This step is the same as the method of step 207 shown in FIG. 2, and details are not described herein again.
  • the embodiment of the present application may further include:
  • the service controller extracts a response corresponding to the APP interface end and the service processing request.
  • the service processing result is fed back to the APP interface.
  • the service controller instructs the service class to re-execute a processing process corresponding to the service processing request.
  • the service processing request result recorded in the service controller that matches the business processing request sent by the APP interface side may be fed back first. Go to the APP interface, and then the service controller instructs the service class to re-execute the business processing process corresponding to the business processing request.
  • a business request is divided into 2 paths for processing, 1 for direct feedback of business results, and 1 for execution. Processing speeds up the process of business processing.
  • a service processing abnormality alarm is sent to the APP interface side so that the APP interface side determines whether to re-execute the business processing request.
  • This application provides another method for managing a service interface.
  • the service controller extracts configuration information for a service processing request sent to an external APP interface, and configures the configuration information according to parameters and service information in the service processing request.
  • Initialize by sending the initialized configuration information to the service class for business processing, it is easy to understand business logic, high maintainability of business logic code, reduce the coupling of multiple general business code segments, and avoid designing excessive business processing
  • the request name and too many parameter passing entity classes are designed to achieve clear code, low coupling, and strong management, thereby avoiding waste of human resources, reducing time consumption, and improving the management efficiency of business interfaces.
  • an embodiment of the present application provides a device for managing a service interface.
  • the device includes an extraction unit 41, an initialization unit 42, a sending unit 43, Processing unit 44 and feedback unit 45.
  • the extracting unit 41 is configured to: when the service controller receives a service processing request sent by the APP interface end, extract the configuration information to be initialized corresponding to the to-be-processed service requested by the service processing request in the configuration file, the configuration file Stores configuration information corresponding to different business logic;
  • An initialization unit 42 is configured for the service controller to initialize the configuration information according to initialization parameters and service information to be configured in the service processing request;
  • the sending unit 43 is configured to send the initialized configuration information to the service class of the service controller by the service controller;
  • the processing unit 44 is configured for the service class of the service controller to parse a service processing request type in the configuration information, and perform service processing according to the parsed type;
  • the feedback unit 45 is configured for the service class of the service controller to feed back the processing result to the APP interface through the service controller.
  • the device further includes:
  • a definition unit 46 is configured for the service controller to define a service class configured in the service controller, and the service class is business logic of different interfaces extracted from interface service classes of different APP interface ends.
  • the device further includes: a judging unit 47,
  • the judging unit 47 is configured for the service controller to judge whether the APP interface terminal is authorized to perform service processing according to a user authority;
  • the sending unit 43 is further configured to: if the APP interface terminal is not authorized to perform service processing, the service controller sends a permissionless processing result to the APP interface terminal;
  • the initialization unit 42 is specifically configured to initialize the configuration information according to initialization parameters and service information to be configured in the service processing request if the APP interface end is authorized to perform service processing.
  • the type of the business processing request includes a SQL type and a Service type
  • the processing unit 44 includes:
  • a first processing module 4401 is used by the service controller to send the initialized configuration information to a service class.
  • the service class parses a business processing request type in the configuration information as a SQL type
  • the service control The service class of the server queries data corresponding to the configuration information from a database, and processes the data; or,
  • a second processing module 4402 is used by the service controller to send the initialized configuration information to a service class.
  • the service control The service class of the server invokes the business service class corresponding to the configuration information, and performs business processing through the business service class.
  • the feedback unit 45 is specifically configured for the service class to feed back the processed business processing result to the service controller, and the service controller records the APP interface end and the business processing request A correspondence relationship between the service processing results, and feedback the service processing results to the APP interface end.
  • the apparatus further includes:
  • the execution unit 48 is configured to, when the service controller receives the service processing request sent by the APP interface end is the same as the service processing request corresponding to the APP interface end recorded in the service controller, The APP interface and the service processing result corresponding to the service processing request are fed back to the APP interface and instruct the service class to re-execute the processing corresponding to the service processing request.
  • the apparatus further includes:
  • An update unit 49 is configured to: when the service controller receives a service interface update request sent by the APP interface, the service controller updates the service controller according to the update content carried in the business interface update request.
  • This application provides a service interface management device.
  • a service controller is used to extract configuration information of a service processing request sent to an external APP interface, and to perform configuration information according to parameters and service information in the service processing request.
  • Initialization By sending the initial configuration information to the service class for business processing, it is easy to understand the business logic, maintainability of the business logic code is high, reduce the coupling of multiple general business code segments, and avoid designing too many business processing requests. Name and design too many parameter passing entity classes to achieve clear code, low coupling, and strong management, thereby avoiding waste of human resources, reducing time consumption, and improving the management efficiency of business interfaces.
  • a non-volatile readable storage medium stores at least one computer-readable instruction, and the computer-readable instruction can execute any of the foregoing methods. Management method of the business interface in the example.
  • FIG. 6 shows a schematic structural diagram of a computer device according to an embodiment of the present application, which may specifically be a terminal.
  • the specific embodiment of the present application does not limit the specific implementation of the terminal.
  • the terminal may include a processor (processor) 502, a communications interface (504), a memory (506), and a communication bus (508).
  • processor processor
  • communications interface 504
  • memory 506
  • communication bus 508
  • the processor 502, the communication interface 504, and the memory 506 complete communication with each other through the communication bus 508.
  • the communication interface 504 is configured to communicate with a network element of another device, such as a client or another server.
  • the processor 502 is configured to execute computer-readable instructions 510, and may specifically perform related steps in the foregoing management method embodiment of a service interface.
  • the computer-readable instructions 510 may include computer-readable instruction codes, where the computer-readable instruction codes include computer-readable instructions.
  • the processor 502 may be a central processing unit CPU, or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.
  • the terminal includes one or more processors, which may be processors of the same type, such as one or more CPUs; or may be processors of different types, such as one or more CPUs and one or more ASICs.
  • the memory 506 is configured to store computer-readable instructions 510.
  • the memory 506 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), for example, at least one disk memory.
  • the computer-readable instructions 510 may be specifically configured to cause the processor 502 to perform the following operations:
  • the service controller When the service controller receives the service processing request sent by the APP interface, it extracts the configuration information to be initialized corresponding to the to-be-processed service requested by the service processing request in the configuration file, and different business logic is stored in the configuration file. Corresponding configuration information;
  • the service controller initializes the configuration information according to initialization parameters to be configured and service information in the service processing request;
  • the service controller sends initialized configuration information to the service class of the service controller
  • the service class of the service controller parses a service processing request type in the configuration information, and performs service processing according to the parsed type;
  • the service class of the service controller feeds back the processing result to the APP interface through the service controller.
  • modules or steps of the present application may be implemented by a general-purpose computing device, and they may be concentrated on a single computing device or distributed in a network composed of multiple computing devices.
  • they can be implemented with computer-readable instruction code executable by the computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, can be different from this
  • the steps shown or described are performed in sequence, either by making them into individual integrated circuit modules, or by making multiple modules or steps into a single integrated circuit module. As such, this application is not limited to any particular combination of hardware and software.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Stored Programmes (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

Disclosed is a service interface management method, relating to the technical field of communications, and mainly aiming to solve the problem that since an existing service interface has a large number of entity classes of transfer parameters designed for different service needs, service codes of an application interface for services are numerous and messy. The method comprises: when receiving a service processing request sent by an application interface terminal, a service controller extracting configuration information to be initialized corresponding to a service to be processed that is requested by the service processing request in a configuration file; the service controller initializing the configuration information according to initialization parameters to be configured and service information in the service processing request; the service controller sending the initialized configuration information to a service class of the service controller; the service class of the service controller parsing the type of the service processing request in the configuration information, and carrying out service processing according to the parsed type; and the service class of the service controller feeding a processing result back to the application interface terminal via the service controller.

Description

业务接口的管理方法及装置、存储介质、计算机设备Management method and device for business interface, storage medium, computer equipment
本申请要求与2018年8月1日提交中国专利局、申请号为2018108666875、申请名称为“业务接口的管理方法及装置、存储介质、终端”的中国专利申请的优先权,其全部内容通过引用结合在申请中。This application claims priority from the Chinese patent application filed on August 1, 2018 with the Chinese Patent Office, application number 2018108666875, and application name "Management Method and Device for Business Interfaces, Storage Medium, Terminal", the entire contents of which are incorporated by reference Incorporated in the application.
技术领域Technical field
本申请涉及一种通信技术领域,特别是涉及一种业务接口的管理方法及装置、存储介质、计算机设备。The present application relates to the field of communication technologies, and in particular, to a method and an apparatus for managing a service interface, a storage medium, and a computer device.
背景技术Background technique
在业务系统处理APP接口端发送的业务请求过程中,不同的业务需求需要通过不同的APP接口进行开发处理。这就需要根据不同的业务逻辑开发出多个传参的实体类,然后以实现响应各个请求。During the processing of the service request sent by the APP interface by the business system, different business requirements need to be developed and processed through different APP interfaces. This requires the development of multiple parameter passing entity classes according to different business logic, and then in response to each request.
目前,现有的业务接口由于针对不同业务需求,设计传参的实体类较多,会导致业务对于的APP接口的业务代码繁多且凌乱,并且需要对多个请求分别进行授权,在修改权限、代码等信息时,需要对所有的接口进行依次修改,浪费人力资源,耗时较长,效率低。At present, due to the different business needs of existing service interfaces, there are many entity classes that are designed to pass parameters, which will cause the business code of the APP interface to be numerous and messy, and require multiple requests to be authorized separately. When the code and other information are needed, all interfaces need to be modified in turn, which wastes human resources, takes a long time, and is inefficient.
发明内容Summary of the invention
有鉴于此,本申请提供一种业务接口的管理方法及装置、存储介质、计算机设备,主要目的在于现有业务接口由于针对不同业务需求,设计传参的实体类较多,会导致业务对于的APP接口的业务代码繁多且凌乱,并且需要对多个请求分别进行授权,在修改权限、代码等信息时,需要对所有的接口进行依次修改,浪费人力资源,耗时较长,效率低的问题。In view of this, this application provides a method and device for managing a service interface, a storage medium, and a computer device. The main purpose is that the existing service interface has a large number of entity classes for parameter transmission due to different business requirements. The business code of the APP interface is numerous and messy, and multiple requests need to be authorized separately. When modifying permissions, codes, and other information, all interfaces need to be modified sequentially, which wastes human resources, takes a long time, and is inefficient. .
依据本申请一个方面,提供了一种业务接口的管理方法,包括:According to one aspect of the present application, a method for managing a service interface is provided, including:
当服务控制器接收到APP接口端发送的业务处理请求时,提取配置文件中所述业务处理请求所请求的待处理业务对应的待进行初始化的配置信息,所述配置文件中存储有不同业务逻辑对应的配置信息;When the service controller receives the service processing request sent by the APP interface, it extracts the configuration information to be initialized corresponding to the to-be-processed service requested by the service processing request in the configuration file, and different business logic is stored in the configuration file. Corresponding configuration information;
所述服务控制器根据所述业务处理请求中的待进行配置的初始化参数以及业务信息初始化所述配置信息;The service controller initializes the configuration information according to initialization parameters to be configured and service information in the service processing request;
所述服务控制器向服务控制器的服务类发送初始化后的配置信息;The service controller sends initialized configuration information to the service class of the service controller;
所述服务控制器的服务类解析所述配置信息中业务处理请求类型,根据解析出的类型进行业务处理;The service class of the service controller parses a service processing request type in the configuration information, and performs service processing according to the parsed type;
所述服务控制器的服务类将所述处理结果通过所述服务控制器反馈至所述APP接口端。The service class of the service controller feeds back the processing result to the APP interface through the service controller.
依据本申请一个方面,提供了一种业务接口的管理装置,包括:According to one aspect of the present application, a management device for a service interface is provided, including:
提取单元,用于当服务控制器接收到APP接口端发送的业务处理请求时,提取配置文件中所述业务处理请求所请求的待处理业务对应的待进行初始化的配置信息,所述配置文件中存储有不同业务逻辑对应的配置信息;An extracting unit, configured to: when the service controller receives a service processing request sent by the APP interface end, extract the configuration information to be initialized corresponding to the pending service requested by the service processing request in the configuration file, in the configuration file Stores configuration information corresponding to different business logic;
初始化单元,用于所述服务控制器根据所述业务处理请求中的待进行配置的初始化参数以及业务信息初始化所述配置信息;An initialization unit, configured to initialize the configuration information by the service controller according to initialization parameters and service information to be configured in the service processing request;
发送单元,用于所述服务控制器向服务控制器的服务类发送初始化后的配置信息;A sending unit, configured to send the initialized configuration information by the service controller to a service class of the service controller;
处理单元,用于所述服务控制器的服务类解析所述配置信息中业务处理请求类型,根据解析出的类型进行业务处理;A processing unit, configured to analyze a service processing request type in the configuration information by a service class of the service controller, and perform business processing according to the parsed type;
反馈单元,用于所述服务控制器的服务类将所述处理结果通过所述服务控制器反馈至所述APP接口端。The feedback unit is used by the service class of the service controller to feedback the processing result to the APP interface end through the service controller.
根据本申请的又一方面,提供了一种非易失性可读存储介质,所述非易失性可读存储介质中存储有至少一计算机可读指令,所述计算机可读指令使处理器执行如上述业务接口的管理方法对应的操作。According to another aspect of the present application, a non-volatile readable storage medium is provided. The non-volatile readable storage medium stores at least one computer-readable instruction, and the computer-readable instruction causes a processor Perform operations corresponding to the management methods of the service interface described above.
根据本申请的再一方面,提供了一种计算机设备,包括:处理器、存储器、通信接口和通信总线,所述处理器、所述存储器和所述通信接口通过所述通信总线完成相互间的通信;According to still another aspect of the present application, a computer device is provided, including: a processor, a memory, a communication interface, and a communication bus, and the processor, the memory, and the communication interface complete each other through the communication bus. Communication
所述存储器用于存放至少一计算机可读指令,所述计算机可读指令使所述处理器执行上述业务接口的管理方法对应的操作。The memory is configured to store at least one computer-readable instruction, and the computer-readable instruction causes the processor to perform an operation corresponding to the management method of the service interface.
借由上述技术方案,本申请实施例提供的技术方案至少具有下列优点:With the above technical solutions, the technical solutions provided in the embodiments of the present application have at least the following advantages:
本申请提供了一种业务接口的管理方法及装置、存储介质、计算机设备,首先当服务控制器接收到APP接口端发送的业务处理请求时,提取配置文件中所述业务处理请求所请求的待处理业务对应的待进行初始化的配置信息,所述配置文件中存储有不同业务逻辑对应的配置信息;所述服务控制器根据所述业务处理请求中的待进行配置的初始化参数以及业务信息初始化所述配置信息;所述服务控制器向服务控制器的服务类发送初始化后的配置信息;所述服务控制器的服务类解析所述配置信息中业务处理请求类 型,根据解析出的类型进行业务处理;所述服务控制器的服务类将所述处理结果通过所述服务控制器反馈至所述APP接口端。与现有业务接口由于针对不同业务需求,设计传参的实体类较多,会导致业务对于的APP接口的业务代码繁多且凌乱相比,本申请实施例通过服务控制器提取与外部APP接口端发送的业务处理请求对于的配置信息,并根据业务处理请求中参数及业务信息对配置信息进行初始化,通过将初始化后的配置信息发送给服务类进行业务处理,方便理解业务逻辑,对业务逻辑代码的可维护性高,减少多个通用业务代码段的耦合,避免设计过多的业务处理请求名以及设计过多的传参实体类,实现代码清晰,耦合低,管理性强,从而避免人力资源浪费,减低耗时,提高业务接口的管理效率。This application provides a method and device for managing a service interface, a storage medium, and a computer device. When a service controller receives a service processing request sent by an APP interface, the service controller first extracts a request from the service processing request described in the configuration file. The configuration information corresponding to the processing to be initialized is processed, and the configuration information corresponding to different business logic is stored in the configuration file; the service controller initializes the configuration information according to the initialization parameters to be configured in the service processing request and the service information. The configuration information; the service controller sends the initialization configuration information to the service class of the service controller; the service class of the service controller parses the type of business processing request in the configuration information, and performs business processing according to the parsed type ; The service class of the service controller feedbacks the processing result to the APP interface end through the service controller. Compared with the existing service interface, which has many entity classes designed to pass parameters due to different business requirements, the service code of the APP interface for the business is numerous and messy. Compared with the embodiment of the present application, the service controller extracts the interface with the external APP interface. The configuration information of the sent business processing request, and initialize the configuration information according to the parameters and business information in the business processing request. By sending the initialized configuration information to the service class for business processing, it is easy to understand the business logic and the business logic code. High maintainability, reduce the coupling of multiple general business code segments, avoid designing too many business processing request names and designing too many parameter passing entity classes, to achieve clear code, low coupling, and strong management, thereby avoiding human resources Waste, reduce time consumption, and improve the management efficiency of business interfaces.
上述说明仅是本申请技术方案的概述,为了能够更清楚了解本申请的技术手段,而可依照说明书的内容予以实施,并且为了让本申请的上述和其它目的、特征和优点能够更明显易懂,以下特举本申请的具体实施方式。The above description is only an overview of the technical solution of this application. In order to understand the technical means of this application more clearly, it can be implemented in accordance with the content of the description, and in order to make the above and other purposes, features, and advantages of this application more obvious and understandable. The specific implementations of this application are listed below.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本申请的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the detailed description of the preferred embodiments below. The drawings are only for the purpose of illustrating preferred embodiments and are not to be considered as limiting the present application. Moreover, the same reference numerals are used throughout the drawings to refer to the same parts. In the drawings:
图1示出了本申请实施例提供的一种业务接口的管理方法时序流程图;FIG. 1 shows a timing flowchart of a method for managing a service interface according to an embodiment of the present application;
图2示出了本申请实施例提供的另一种业务接口的管理方法时序流程图;FIG. 2 shows a timing flowchart of another method for managing a service interface provided by an embodiment of the present application;
图3示出了本申请实施例提供的又一种业务接口的管理方法时序流程图;FIG. 3 shows a timing flowchart of still another method for managing a service interface according to an embodiment of the present application; FIG.
图4示出了本申请实施例提供的一种业务接口的管理装置框图;FIG. 4 shows a block diagram of a management device for a service interface according to an embodiment of the present application; FIG.
图5示出了本申请实施例提供的另一种业务接口的管理装置框图;FIG. 5 shows a block diagram of a management device for another service interface according to an embodiment of the present application; FIG.
图6示出了本申请实施例提供的一种计算机设备的结构示意图。FIG. 6 is a schematic structural diagram of a computer device according to an embodiment of the present application.
具体实施方式detailed description
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。Hereinafter, exemplary embodiments of the present disclosure will be described in more detail with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a thorough understanding of the present disclosure, and to fully convey the scope of the present disclosure to those skilled in the art.
本申请实施例提供了一种业务接口的管理方法,如图1所示,所述方法包括:An embodiment of the present application provides a method for managing a service interface. As shown in FIG. 1, the method includes:
100、APP接口端向服务控制器发送业务处理请求。100. The APP interface sends a service processing request to the service controller.
101、服务控制器提取配置文件中所述业务处理请求所请求的待处理业务对应的待进行初始化的配置信息。101. The service controller extracts configuration information to be initialized corresponding to the to-be-processed service requested by the service processing request in the configuration file.
其中,所述配置文件中存储有不同业务逻辑对应的配置信息,业务逻辑为系统执行业务需求时所参照的业务流程,配置信息则为在执行业务流程时需要系统运行的参数信息、业务信息等,如传参实体类等,本申请实施例不做具体限定。另外,本申请实施例中的配置文件为预先设置于所述服务控制器中的文件,并将所有业务接口可以执行的业务逻辑对应的配置信息存储于这个配置文件中,以便在所述服务控制器接收到APP接口端发送的业务处理请求时,直接提取配置文件中的配置信息进行初始化参数。APP接口端发送的业务处理请求即为APP接口端的接口请求的业务处理。The configuration file stores configuration information corresponding to different business logic. The business logic is the business process that the system refers to when executing business requirements, and the configuration information is the parameter information and business information that require the system to run when the business process is executed. For example, the parameters of the passing entity class are not specifically limited in the embodiments of the present application. In addition, the configuration file in the embodiment of the present application is a file set in the service controller in advance, and configuration information corresponding to business logic that can be executed by all service interfaces is stored in this configuration file, so that the service control When the processor receives the service processing request sent by the APP interface, it directly extracts the configuration information in the configuration file and initializes the parameters. The service processing request sent by the APP interface side is the service processing requested by the interface of the APP interface side.
需要说明的是,所述服务控制器接收到的APP接口端发送的业务处理请求是外部APP接口端发送来的,业务处理包括了各个业务接口可以执行的通用业务,如接收请求、返回信息、校验参数等,本申请实施例不做具体限定。另外,本申请实施例中待进行初始化的配置信息为业务处理请求对应的业务逻辑需要执行的重新设定的参数信息,因此,为了满足不同业务逻辑的需求,需要对这些配置信息进行初始化,以便满足业务逻辑对象执行的参数设置。It should be noted that the service processing request sent by the APP interface end received by the service controller is sent by the external APP interface end. The service processing includes general services that can be performed by each service interface, such as receiving requests, returning information, The calibration parameters and the like are not specifically limited in the embodiments of the present application. In addition, the configuration information to be initialized in the embodiments of the present application is parameter information of resetting that needs to be performed by the business logic corresponding to the service processing request. Therefore, in order to meet the requirements of different business logic, the configuration information needs to be initialized so that Meet the parameter settings performed by business logic objects.
102、所述服务控制器根据所述业务处理请求中的待进行配置的初始化参数以及业务信息初始化所述配置信息。102. The service controller initializes the configuration information according to initialization parameters to be configured and service information in the service processing request.
其中,所述初始化参数为业务处理请求中根据待进行处理的业务逻辑配置的参数,所述业务信息为待执行的具体业务逻辑或业务流程,如删除某时间段内的用户浏览网页的数据,这个业务逻辑中需要执行的具体业务信息可以包括查找时间段、用户浏览网站的数据、删除,其中,待进行配置的初始化参数则为这些业务逻辑中代码具体执行的参数。步骤102中即为根据初始化参数及业务信息对配置信息进行初始化,以便得到匹配业务处理请求的业务处理过程,初始化过程即为将配置信息中的参数、业务逻辑配置成与业务处理匹配的参数及业务逻辑,本申请实施例不做具体限定。The initialization parameter is a parameter configured according to the business logic to be processed in the service processing request, and the business information is the specific business logic or business process to be executed, such as deleting data of a user browsing a webpage within a certain period of time, The specific business information that needs to be executed in this business logic may include the search time period, the data of the user browsing the website, and deletion. Among them, the initialization parameters to be configured are the parameters specifically executed by the code in these business logics. In step 102, the configuration information is initialized according to the initialization parameters and the service information, so as to obtain the service processing process matching the service processing request. The initialization process is to configure the parameters and business logic in the configuration information to match the parameters of the business process and The business logic is not specifically limited in the embodiments of the present application.
103、所述服务控制器向服务控制器的服务类发送初始化后的配置信息。103. The service controller sends initialization configuration information to a service class of the service controller.
对于本申请实施例,所述服务类为预先定义的一个InteractHouseRoService服务类,用于统一管理所有APP接口端发送来的业务,即接收并管理外部请求的整个处理流程。所述服务控制器会将初始化后的配置信息发送至服务类中,服务类根据接收到的配置信息进行处理。For the embodiment of the present application, the service class is a predefined InteractHouseRoService service class, which is used to uniformly manage all the services sent by the APP interface end, that is, the entire processing flow of receiving and managing external requests. The service controller sends the initialized configuration information to the service class, and the service class performs processing according to the received configuration information.
104、所述服务控制器的服务类解析所述配置信息中业务处理请求类型,根据解析出的类型进行业务处理。104. The service class of the service controller parses a service processing request type in the configuration information, and performs service processing according to the parsed type.
本申请实施例中,处理过程即为解析配置信息中业务处理请求类型,业务处理请求类型包括SQL类型、Service类型,不同的业务处理请求类型对应的处理方式不同。例如,当为SQL类型时,不需要进行调用业务服务层中的业务类执行对应的业务处理,只需要根据配置信息中的详细数据从数据层中的数据库中进行增删查改即可,本申请实施例不做具体限定。In the embodiment of the present application, the processing process is to parse the service processing request type in the configuration information. The service processing request type includes SQL type and Service type. Different types of business processing request types correspond to different processing methods. For example, when it is of SQL type, it is not necessary to call the business class in the business service layer to execute the corresponding business processing. It only needs to add, delete, and modify from the database in the data layer according to the detailed data in the configuration information. This application The examples are not specifically limited.
105、所述服务控制器的服务类将所述处理结果通过所述服务控制器反馈至所述APP接口端。105. The service class of the service controller feeds back the processing result to the APP interface end through the service controller.
对于本申请实施例,当服务类根据类型进行业务处理后,会将处理的结果返回至所述服务控制器中,通过所述服务控制器向APP接口端反馈处理结果,从而减少各个APP接口端的分支判断,规范了与APP接口端各个接口交互的流程。For the embodiment of the present application, after the service class performs business processing according to the type, the processing result is returned to the service controller, and the processing result is fed back to the APP interface end through the service controller, thereby reducing the number of APP interface ends. Branch judgment, which regulates the process of interaction with each interface of the APP interface.
本申请提供了一种业务接口的管理方法,与现有业务接口由于针对不同业务需求,设计传参的实体类较多,会导致业务对于的APP接口的业务代码繁多且凌乱相比,本申请实施例通过服务控制器提取与外部APP接口端发送的业务处理请求对于的配置信息,并根据业务处理请求中参数及业务信息对配置信息进行初始化,通过将初始化后的配置信息发送给服务类进行业务处理,方便理解业务逻辑,对业务逻辑代码的可维护性高,减少多个通用业务代码段的耦合,避免设计过多的业务处理请求名以及设计过多的传参实体类,实现代码清晰,耦合低,管理性强,从而避免人力资源浪费,减低耗时,提高业务接口的管理效率。This application provides a method for managing a service interface. Due to the different business requirements, the existing service interface is designed with a large number of entity classes for parameter passing, which will result in a large number of messy business codes for the APP interface for the business. The embodiment uses the service controller to extract the configuration information of the service processing request sent to the external APP interface, and initializes the configuration information according to the parameters and business information in the service processing request. The initialization configuration information is sent to the service class. Business processing, easy to understand business logic, high maintainability of business logic code, reduce coupling of multiple general business code segments, avoid designing too many business processing request names and designing too many parameter passing entity classes, to achieve code clarity , Low coupling, strong management, thereby avoiding waste of human resources, reducing time consumption, and improving the management efficiency of business interfaces.
本申请实施例提供了另一种业务接口的管理方法,如图2所示,所述方法包括:An embodiment of the present application provides another method for managing a service interface. As shown in FIG. 2, the method includes:
201、服务控制器定义配置于服务控制器的服务类。201. The service controller defines a service class configured in the service controller.
对于本申请实施例,为了实现将所有通用业务抽离出业务逻辑关系,并可以根据不同的配置信息管理外部请求的业务处理过程,预先定义一个服务类,即InteractHouseRoService服务类,所述服务类为从不同APP接口端的接口服务类中抽取的不同接口的业务逻辑。其中,这个服务类定义且配置于服务控制器中,当服务控制器从配置文件中获取需要初始化的配置信息后,将初始化的配置信息发送给服务类,服务类则可以根据不同接口的业务逻辑进行处理业务,本申请实施例不做具体限定。For the embodiment of the present application, in order to realize the extraction of all common services from the business logic relationship and the management of externally requested business processing processes according to different configuration information, a service class is defined in advance, that is, the InteractHouseRoService service class. The service class is The business logic of different interfaces is extracted from the interface service classes of different APP interface ends. Among them, this service class is defined and configured in the service controller. After the service controller obtains the configuration information that needs to be initialized from the configuration file, it sends the initialized configuration information to the service class. The service class can be based on the business logic of different interfaces. The processing service is not specifically limited in the embodiment of the present application.
202a、APP接口端向服务控制器发送业务处理请求。202a: The APP interface sends a service processing request to the service controller.
202b、服务控制器提取配置文件中所述业务处理请求所请求的待处理业务对应的待进行初始化的配置信息。202b: The service controller extracts configuration information to be initialized corresponding to the pending service requested by the service processing request described in the configuration file.
本步骤与图1所示的步骤101方法相同,在此不再赘述。This step is the same as the method of step 101 shown in FIG. 1, and details are not described herein again.
203、所述服务控制器根据用户权限判断所述APP接口端是否有权进行业务处理。203: The service controller judges whether the APP interface terminal is authorized to perform service processing according to user rights.
需要说明的是,若所述APP接口端无权进行业务处理则执行S204a;若所述APP接口端有权进行业务处理,则执行S204b。It should be noted that if the APP interface is not authorized to perform business processing, S204a is executed; if the APP interface is authorized to perform business processing, S204b is executed.
对于本申请实施例,为了确保APP接口端在进行业务处理请求时,所述的业务系统为APP接口端配置了业务权限,以便进行业务处理,需要根据用户权限判断APP接口端是否有权进行业务处理,即可以根据用户权限判断APP接口端的接口是否进行了权限注册。所述用户权限可以包括APP接口端的身份验证、等级验证等,本申请实施例不做具体限定。另外,步骤203中的用户权限校验过程是在所述服务控制器中进行的,以便通过验证后,说明APP接口端有权进行业务处理,所述服务控制器执行步骤204b中的步骤。For the embodiment of the present application, in order to ensure that when the APP interface end makes a service processing request, the service system configures a service permission for the APP interface end to perform business processing, it is necessary to determine whether the APP interface end is authorized to perform services according to user permissions. Processing, that is, judging whether the interface of the APP interface side is registered for permissions according to the user permissions. The user authority may include identity verification, level verification, etc. of the APP interface end, which is not specifically limited in the embodiment of the present application. In addition, the user authority verification process in step 203 is performed in the service controller, so that after the verification, the APP interface is authorized to perform business processing, and the service controller executes the steps in step 204b.
需要说明的是,用户权限判断的过程可以为外部APP接口端预先将具有用户权限的接口信息备份至所述服务控制器中的有权白名单中,然后在接收到APP接口端发送的业务处理请求时,根据携带的接口信息进行判断是否存在与有权白名单中,若存在,则说明有权。It should be noted that the process of judging user rights may backup the interface information with user rights to the authorized white list in the service controller for the external APP interface end in advance, and then receive the business processing sent by the APP interface end When requesting, it is judged according to the interface information carried whether it exists in the white list of rights and if it exists, it indicates the right.
204a、所述服务控制器向所述APP接口端发送无权限处理结果。204a. The service controller sends a permissionless processing result to the APP interface.
对于本申请实施例,为了及时提示给APP接口端权限校验未通过,当APP接口端无权进行业务处理时,所述服务控制器向APP接口端发送无权处理结果,以便APP接口端进行接口的重新设定。For the embodiment of the present application, in order to promptly notify the APP interface that the permission verification fails, when the APP interface is not authorized to perform business processing, the service controller sends the result of the unauthorized processing to the APP interface, so that the APP interface can perform the processing. Reset the interface.
对于本申请实施例,与步骤204a并列的步骤204b、所述服务控制器根据所述业务处理请求中的待进行配置的初始化参数以及业务信息初始化所述配置信息。For the embodiment of the present application, in step 204b parallel to step 204a, the service controller initializes the configuration information according to initialization parameters and service information to be configured in the service processing request.
本步骤与图1所示的步骤102方法相同,在此不再赘述。This step is the same as the method of step 102 shown in FIG. 1, and details are not described herein again.
对于本申请实施例,步骤204b之后的步骤205、所述服务控制器向服务控制器的服务类发送初始化后的配置信息。For the embodiment of the present application, in step 205 after step 204b, the service controller sends initialization configuration information to the service class of the service controller.
本步骤与图1所示的步骤103方法相同,在此不再赘述。This step is the same as the method of step 103 shown in FIG. 1, and details are not described herein again.
206、当所述服务类解析所述配置信息中的业务处理请求类型为SQL类型时,所述服务控制器的服务类从数据库中查询与所述配置信息对应的数据,对所述数据进行处理。206. When the service class parses the type of the business processing request in the configuration information as an SQL type, the service class of the service controller queries the database for data corresponding to the configuration information, and processes the data. .
对于本申请实施例,所述服务控制器将初始化后的配置信息传给服务类Service中,在Service中,对配置信息中的具体信息进行解析,确定业务处理请求的类型为SQL类型,则不需要进行调用业务服务层中的业务类执行对应的业务处理,只需要根据配置信 息中的详细数据从数据层中的数据库中进行增删查改即可。For the embodiment of the present application, the service controller transmits the initialized configuration information to the service class Service. In the Service, the specific information in the configuration information is parsed, and the type of the business processing request is determined to be SQL type. You need to call the business class in the business service layer to perform the corresponding business processing. You only need to add, delete, and modify from the database in the data layer according to the detailed data in the configuration information.
207、所述服务控制器的服务类将所述处理结果通过所述服务控制器反馈至所述APP接口端。207. The service class of the service controller feeds back the processing result to the APP interface through the service controller.
本步骤与图1所示的步骤104方法相同,在此不再赘述。This step is the same as the method of step 104 shown in FIG. 1, and details are not described herein again.
对于本申请实施例,具体的,步骤207包括:所述服务类将进行处理后的业务处理结果反馈至所述服务控制器中,所述服务控制器记录所述APP接口端与所述业务处理请求、所述业务处理结果之间的对应关系,并将所述业务处理结果反馈至所述APP接口端。For the embodiment of the present application, specifically, step 207 includes: the service class feeds back the processed business processing result to the service controller, and the service controller records the APP interface and the business processing Requesting a correspondence between the service processing results, and feeding back the service processing results to the APP interface.
对于本申请实施例,为了便于再次接收到APP接口端发出的相同的业务处理请求时,可以直接进行业务处理,当服务控制器在接收到服务类处理后的结果时,可以将APP接口端、业务处理请求、业务处理结果进行具有对应关系的存储,并将本次的业务处理结果反馈给APP接口端。For the embodiment of the present application, in order to facilitate receiving the same business processing request sent from the APP interface side again, the business process can be directly performed. When the service controller receives the result of the service class processing, the APP interface side, The business processing request and the business processing result are stored with a corresponding relationship, and the current business processing result is fed back to the APP interface.
步骤207之后,本申请实施例还可以包括:After step 207, the embodiment of the present application may further include:
208、所述APP接口端向服务控制器发送业务接口更新请求。208. The APP interface sends a service interface update request to the service controller.
209、所述服务控制器根据所述业务接口更新请求中携带的更新内容对所述服务控制中的配置文件中的参数、业务信息进行更新。209. The service controller updates parameters and service information in a configuration file in the service control according to an update content carried in the service interface update request.
对于本申请实施例,为了避免当出现业务处理更换对应的业务接口时,对各个接口服务类的重新进行更改代码参数,本申请实施例中可以通过更新配置文件中的参数和业务信息,实现各个业务接口的更新,从而减少业务接口在进行请求时的传参实体类的设计,节约了代码更改的人力资源。For the embodiment of the present application, in order to avoid re-changing the code parameters of each interface service class when a business process changes the corresponding service interface, in the embodiment of the present application, the parameters and service information in the configuration file can be updated to implement each The business interface is updated, thereby reducing the design of the parameter passing entity class when the business interface makes a request, saving human resources for code changes.
本申请提供了另一种业务接口的管理方法,本申请实施例通过服务控制器提取与外部APP接口端发送的业务处理请求对于的配置信息,并根据业务处理请求中参数及业务信息对配置信息进行初始化,通过将初始化后的配置信息发送给服务类进行业务处理,方便理解业务逻辑,对业务逻辑代码的可维护性高,减少多个通用业务代码段的耦合,避免设计过多的业务处理请求名以及设计过多的传参实体类,实现代码清晰,耦合低,管理性强,从而避免人力资源浪费,减低耗时,提高业务接口的管理效率。This application provides another method for managing a business interface. In the embodiment of the present application, the service controller extracts configuration information of a service processing request sent from an external APP interface, and configures the configuration information according to parameters and service information in the service processing request. Initialize, by sending the initialized configuration information to the service class for business processing, it is easy to understand business logic, high maintainability of business logic code, reduce the coupling of multiple general business code segments, and avoid designing excessive business processing The request name and too many parameter passing entity classes are designed to achieve clear code, low coupling, and strong management, thereby avoiding waste of human resources, reducing time consumption, and improving the management efficiency of business interfaces.
本申请实施例提供了又一种业务接口的管理方法,如图3所示,所述方法包括:An embodiment of the present application provides another method for managing a service interface. As shown in FIG. 3, the method includes:
301、服务控制器定义配置于服务控制器的服务类。301. A service controller defines a service class configured in the service controller.
本步骤与图2所示的步骤201方法相同,在此不再赘述。This step is the same as the method of step 201 shown in FIG. 2, and details are not described herein again.
302a、APP接口端向服务控制器发送业务处理请求。302a: The APP interface sends a service processing request to the service controller.
302b、服务控制器提取配置文件中所述业务处理请求所请求的待处理业务对应的待 进行初始化的配置信息。302b. The service controller extracts configuration information to be initialized corresponding to the pending service requested by the service processing request in the configuration file.
本步骤与图2所示的步骤202方法相同,在此不再赘述。This step is the same as the method of step 202 shown in FIG. 2, and details are not described herein again.
303、所述服务控制器根据用户权限判断所述APP接口端是否有权进行业务处理。303: The service controller judges whether the APP interface terminal is authorized to perform service processing according to user rights.
需要说明的是,若所述APP接口端无权进行业务处理则执行S304a;若所述APP接口端有权进行业务处理,则执行S304b。It should be noted that if the APP interface is not authorized to perform business processing, S304a is executed; if the APP interface is authorized to perform business processing, S304b is executed.
304a、所述服务控制器向所述APP接口端发送无权限处理结果。304a. The service controller sends a permissionless processing result to the APP interface.
本步骤与图2所示的步骤204a方法相同,在此不再赘述。This step is the same as the method of step 204a shown in FIG. 2, and details are not described herein again.
对于本申请实施例,与步骤304a并列的步骤304b、所述服务控制器根据所述业务处理请求中的待进行配置的初始化参数以及业务信息初始化所述配置信息。For the embodiment of the present application, in step 304b parallel to step 304a, the service controller initializes the configuration information according to initialization parameters to be configured in the service processing request and service information.
本步骤与图1所示的步骤102方法相同,在此不再赘述。This step is the same as the method of step 102 shown in FIG. 1, and details are not described herein again.
对于本申请实施例,步骤304b之后的步骤305、所述服务控制器向服务控制器的服务类发送初始化后的配置信息。For the embodiment of the present application, in step 305 after step 304b, the service controller sends initialization configuration information to the service class of the service controller.
本步骤与图1所示的步骤103方法相同,在此不再赘述。This step is the same as the method of step 103 shown in FIG. 1, and details are not described herein again.
306、当所述服务类解析所述配置信息中的业务处理请求类型为Service类型时,所述服务控制器的服务类反射调用所述配置信息对应的业务服务类,通过所述业务服务类进行业务处理。306. When the service class parses a service processing request type in the configuration information as a service type, the service class of the service controller reflects a call to a business service class corresponding to the configuration information, and performs the process through the business service class. Business processing.
对于本申请实施例,所述服务控制器将初始化后的配置信息传给服务类Service中,在Service中,对配置信息中的具体信息进行解析,确定业务处理请求的类型为Service类型,则根据配置信息中的具体内容,调用与业务逻辑对应的服务类,如根据配置信息中的具体内容可确定业务逻辑为补录信息,则调用补录信息服务类进行业务处理。For the embodiment of the present application, the service controller transmits the initialized configuration information to the service class Service. In the Service, the specific information in the configuration information is parsed, and the type of the service processing request is determined to be the Service type. The specific content in the configuration information calls the service class corresponding to the business logic. If it can be determined that the business logic is supplemental recording information based on the specific content in the configuration information, the supplemental recording service class is called for business processing.
307、所述服务控制器的服务类将所述处理结果通过所述服务控制器反馈至所述APP接口端。307. The service class of the service controller feeds back the processing result to the APP interface end through the service controller.
本步骤与图2所示的步骤207方法相同,在此不再赘述。This step is the same as the method of step 207 shown in FIG. 2, and details are not described herein again.
步骤307之后,本申请实施例还可以包括:After step 307, the embodiment of the present application may further include:
308、所述APP接口端向服务控制器发送的业务处理请求。308: The service processing request sent by the APP interface end to the service controller.
309、当所述业务处理请求与记录在所述服务控制器中的所述APP接口端对应的业务处理请求相同时,所述服务控制器提取与所述APP接口端、所述业务处理请求对应的业务处理结果反馈至所述APP接口端。309. When the service processing request is the same as the service processing request corresponding to the APP interface end recorded in the service controller, the service controller extracts a response corresponding to the APP interface end and the service processing request. The service processing result is fed back to the APP interface.
310、所述服务控制器指示所述服务类重新执行所述业务处理请求对应的处理过程。310. The service controller instructs the service class to re-execute a processing process corresponding to the service processing request.
对于本申请实施例,为了简化业务处理过程,提高反馈至APP接口端的业务处理速度,可以先将记录在服务控制器中与本次APP接口端发送的业务处理请求相匹配的 业务处理请求结果反馈至APP接口端,然后服务控制器指示服务类重新执行业务处理请求对应的业务处理过程,这样实现一个业务请求分为2条路径进行处理,1条为直接反馈业务结果,1条为执行进行业务处理,增快了业务处理的过程。另外,若在执行业务处理过程中,反馈的业务处理结果与已经反馈的业务结果不同,则向APP接口端发送业务处理异常报警,以便APP接口端确定是否重新进行业务处理请求。For the embodiment of the present application, in order to simplify the business processing process and improve the speed of business processing feedback to the APP interface side, the service processing request result recorded in the service controller that matches the business processing request sent by the APP interface side may be fed back first. Go to the APP interface, and then the service controller instructs the service class to re-execute the business processing process corresponding to the business processing request. In this way, a business request is divided into 2 paths for processing, 1 for direct feedback of business results, and 1 for execution. Processing speeds up the process of business processing. In addition, if during the execution of the business processing process, the feedback result of the business processing is different from the business result that has been fed back, a service processing abnormality alarm is sent to the APP interface side so that the APP interface side determines whether to re-execute the business processing request.
本申请提供了又一种业务接口的管理方法,本申请实施例通过服务控制器提取与外部APP接口端发送的业务处理请求对于的配置信息,并根据业务处理请求中参数及业务信息对配置信息进行初始化,通过将初始化后的配置信息发送给服务类进行业务处理,方便理解业务逻辑,对业务逻辑代码的可维护性高,减少多个通用业务代码段的耦合,避免设计过多的业务处理请求名以及设计过多的传参实体类,实现代码清晰,耦合低,管理性强,从而避免人力资源浪费,减低耗时,提高业务接口的管理效率。This application provides another method for managing a service interface. In the embodiment of the present application, the service controller extracts configuration information for a service processing request sent to an external APP interface, and configures the configuration information according to parameters and service information in the service processing request. Initialize, by sending the initialized configuration information to the service class for business processing, it is easy to understand business logic, high maintainability of business logic code, reduce the coupling of multiple general business code segments, and avoid designing excessive business processing The request name and too many parameter passing entity classes are designed to achieve clear code, low coupling, and strong management, thereby avoiding waste of human resources, reducing time consumption, and improving the management efficiency of business interfaces.
进一步的,作为对上述图1所示方法的实现,本申请实施例提供了一种业务接口的管理装置,如图4所示,该装置包括:提取单元41、初始化单元42、发送单元43、处理单元44、反馈单元45。Further, as an implementation of the method shown in FIG. 1, an embodiment of the present application provides a device for managing a service interface. As shown in FIG. 4, the device includes an extraction unit 41, an initialization unit 42, a sending unit 43, Processing unit 44 and feedback unit 45.
提取单元41,用于当服务控制器接收到APP接口端发送的业务处理请求时,提取配置文件中所述业务处理请求所请求的待处理业务对应的待进行初始化的配置信息,所述配置文件中存储有不同业务逻辑对应的配置信息;The extracting unit 41 is configured to: when the service controller receives a service processing request sent by the APP interface end, extract the configuration information to be initialized corresponding to the to-be-processed service requested by the service processing request in the configuration file, the configuration file Stores configuration information corresponding to different business logic;
初始化单元42,用于所述服务控制器根据所述业务处理请求中的待进行配置的初始化参数以及业务信息初始化所述配置信息;An initialization unit 42 is configured for the service controller to initialize the configuration information according to initialization parameters and service information to be configured in the service processing request;
发送单元43,用于所述服务控制器向服务控制器的服务类发送初始化后的配置信息;The sending unit 43 is configured to send the initialized configuration information to the service class of the service controller by the service controller;
处理单元44,用于所述服务控制器的服务类解析所述配置信息中业务处理请求类型,根据解析出的类型进行业务处理;The processing unit 44 is configured for the service class of the service controller to parse a service processing request type in the configuration information, and perform service processing according to the parsed type;
反馈单元45,用于所述服务控制器的服务类将所述处理结果通过所述服务控制器反馈至所述APP接口端。The feedback unit 45 is configured for the service class of the service controller to feed back the processing result to the APP interface through the service controller.
进一步的,如图5所示,所述装置还包括:Further, as shown in FIG. 5, the device further includes:
定义单元46,用于所述服务控制器定义配置于服务控制器的服务类,所述服务类为从不同APP接口端的接口服务类中抽取的不同接口的业务逻辑。A definition unit 46 is configured for the service controller to define a service class configured in the service controller, and the service class is business logic of different interfaces extracted from interface service classes of different APP interface ends.
进一步地,所述装置还包括:判断单元47,Further, the device further includes: a judging unit 47,
所述判断单元47,用于所述服务控制器根据用户权限判断所述APP接口端是否有权进行业务处理;The judging unit 47 is configured for the service controller to judge whether the APP interface terminal is authorized to perform service processing according to a user authority;
所述发送单元43,还用于若所述APP接口端无权进行业务处理,则所述服务控制器向所述APP接口端发送无权限处理结果;The sending unit 43 is further configured to: if the APP interface terminal is not authorized to perform service processing, the service controller sends a permissionless processing result to the APP interface terminal;
所述初始化单元42,具体用于若所述APP接口端有权进行业务处理,则所述服务控制器根据所述业务处理请求中的待进行配置的初始化参数以及业务信息初始化所述配置信息。The initialization unit 42 is specifically configured to initialize the configuration information according to initialization parameters and service information to be configured in the service processing request if the APP interface end is authorized to perform service processing.
进一步地,所述业务处理请求的类型包括SQL类型、Service类型,所述处理单元44包括:Further, the type of the business processing request includes a SQL type and a Service type, and the processing unit 44 includes:
第一处理模块4401,用于所述服务控制器将初始化后的配置信息发送至服务类中,当所述服务类解析所述配置信息中的业务处理请求类型为SQL类型时,所述服务控制器的服务类从数据库中查询与所述配置信息对应的数据,对所述数据进行处理;或,A first processing module 4401 is used by the service controller to send the initialized configuration information to a service class. When the service class parses a business processing request type in the configuration information as a SQL type, the service control The service class of the server queries data corresponding to the configuration information from a database, and processes the data; or,
第二处理模块4402,用于所述服务控制器将初始化后的配置信息发送至服务类中,当所述服务类解析所述配置信息中的业务处理请求类型为Service类型时,所述服务控制器的服务类反射调用所述配置信息对应的业务服务类,通过所述业务服务类进行业务处理。A second processing module 4402 is used by the service controller to send the initialized configuration information to a service class. When the service class parses a service processing request type in the configuration information as a service type, the service control The service class of the server invokes the business service class corresponding to the configuration information, and performs business processing through the business service class.
进一步地,所述反馈单元45,具体用于所述服务类将进行处理后的业务处理结果反馈至所述服务控制器中,所述服务控制器记录所述APP接口端与所述业务处理请求、所述业务处理结果之间的对应关系,并将所述业务处理结果反馈至所述APP接口端。Further, the feedback unit 45 is specifically configured for the service class to feed back the processed business processing result to the service controller, and the service controller records the APP interface end and the business processing request A correspondence relationship between the service processing results, and feedback the service processing results to the APP interface end.
进一步地,所述装置还包括:Further, the apparatus further includes:
执行单元48,用于所述服务控制器当接收到所述APP接口端发送的业务处理请求与记录在所述服务控制器中的所述APP接口端对应的业务处理请求相同时,提取与所述APP接口端、所述业务处理请求对应的业务处理结果反馈至所述APP接口端,并指示所述服务类重新执行所述业务处理请求对应的处理过程。The execution unit 48 is configured to, when the service controller receives the service processing request sent by the APP interface end is the same as the service processing request corresponding to the APP interface end recorded in the service controller, The APP interface and the service processing result corresponding to the service processing request are fed back to the APP interface and instruct the service class to re-execute the processing corresponding to the service processing request.
进一步地,所述装置还包括:Further, the apparatus further includes:
更新单元49,用于当所述服务控制器接收到所述APP接口端发送的业务接口更新请求时,所述服务控制器根据所述业务接口更新请求中携带的更新内容对所述服务控制器中的配置文件中的参数、业务信息进行更新。An update unit 49 is configured to: when the service controller receives a service interface update request sent by the APP interface, the service controller updates the service controller according to the update content carried in the business interface update request. The parameters and business information in the configuration file in.
本申请提供了一种业务接口的管理装置,本申请实施例通过服务控制器提取与外部APP接口端发送的业务处理请求对于的配置信息,并根据业务处理请求中参数及业务信息对配置信息进行初始化,通过将初始化后的配置信息发送给服务类进行业务处理,方便理解业务逻辑,对业务逻辑代码的可维护性高,减少多个通用业务代码段的耦合,避免设计过多的业务处理请求名以及设计过多的传参实体类,实现代码清晰,耦合低,管 理性强,从而避免人力资源浪费,减低耗时,提高业务接口的管理效率。This application provides a service interface management device. In the embodiment of this application, a service controller is used to extract configuration information of a service processing request sent to an external APP interface, and to perform configuration information according to parameters and service information in the service processing request. Initialization. By sending the initial configuration information to the service class for business processing, it is easy to understand the business logic, maintainability of the business logic code is high, reduce the coupling of multiple general business code segments, and avoid designing too many business processing requests. Name and design too many parameter passing entity classes to achieve clear code, low coupling, and strong management, thereby avoiding waste of human resources, reducing time consumption, and improving the management efficiency of business interfaces.
根据本申请一个实施例提供了一种非易失性可读存储介质,所述非易失性可读存储介质存储有至少一计算机可读指令,该计算机计算机可读指令可执行上述任意方法实施例中的业务接口的管理方法。According to an embodiment of the present application, a non-volatile readable storage medium is provided. The non-volatile readable storage medium stores at least one computer-readable instruction, and the computer-readable instruction can execute any of the foregoing methods. Management method of the business interface in the example.
图6示出了根据本申请一个实施例提供的一种计算机设备的结构示意图,具体可以为一种终端,本申请具体实施例并不对终端的具体实现做限定。FIG. 6 shows a schematic structural diagram of a computer device according to an embodiment of the present application, which may specifically be a terminal. The specific embodiment of the present application does not limit the specific implementation of the terminal.
如图6所示,该终端可以包括:处理器(processor)502、通信接口(Communications Interface)504、存储器(memory)506、以及通信总线508。As shown in FIG. 6, the terminal may include a processor (processor) 502, a communications interface (504), a memory (506), and a communication bus (508).
其中:处理器502、通信接口504、以及存储器506通过通信总线508完成相互间的通信。The processor 502, the communication interface 504, and the memory 506 complete communication with each other through the communication bus 508.
通信接口504,用于与其它设备比如客户端或其它服务器等的网元通信。The communication interface 504 is configured to communicate with a network element of another device, such as a client or another server.
处理器502,用于执行计算机可读指令510,具体可以执行上述业务接口的管理方法实施例中的相关步骤。The processor 502 is configured to execute computer-readable instructions 510, and may specifically perform related steps in the foregoing management method embodiment of a service interface.
具体地,计算机可读指令510可以包括计算机可读指令代码,该计算机可读指令代码包括计算机可读指令。Specifically, the computer-readable instructions 510 may include computer-readable instruction codes, where the computer-readable instruction codes include computer-readable instructions.
处理器502可能是中央处理器CPU,或者是特定集成电路ASIC(Application Specific Integrated Circuit),或者是被配置成实施本申请实施例的一个或多个集成电路。终端包括的一个或多个处理器,可以是同一类型的处理器,如一个或多个CPU;也可以是不同类型的处理器,如一个或多个CPU以及一个或多个ASIC。The processor 502 may be a central processing unit CPU, or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application. The terminal includes one or more processors, which may be processors of the same type, such as one or more CPUs; or may be processors of different types, such as one or more CPUs and one or more ASICs.
存储器506,用于存放计算机可读指令510。存储器506可能包含高速RAM存储器,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。The memory 506 is configured to store computer-readable instructions 510. The memory 506 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), for example, at least one disk memory.
计算机可读指令510具体可以用于使得处理器502执行以下操作:The computer-readable instructions 510 may be specifically configured to cause the processor 502 to perform the following operations:
当服务控制器接收到APP接口端发送的业务处理请求时,提取配置文件中所述业务处理请求所请求的待处理业务对应的待进行初始化的配置信息,所述配置文件中存储有不同业务逻辑对应的配置信息;When the service controller receives the service processing request sent by the APP interface, it extracts the configuration information to be initialized corresponding to the to-be-processed service requested by the service processing request in the configuration file, and different business logic is stored in the configuration file. Corresponding configuration information;
所述服务控制器根据所述业务处理请求中的待进行配置的初始化参数以及业务信息初始化所述配置信息;The service controller initializes the configuration information according to initialization parameters to be configured and service information in the service processing request;
所述服务控制器向服务控制器的服务类发送初始化后的配置信息;The service controller sends initialized configuration information to the service class of the service controller;
所述服务控制器的服务类解析所述配置信息中业务处理请求类型,根据解析出的类 型进行业务处理;The service class of the service controller parses a service processing request type in the configuration information, and performs service processing according to the parsed type;
所述服务控制器的服务类将所述处理结果通过所述服务控制器反馈至所述APP接口端。The service class of the service controller feeds back the processing result to the APP interface through the service controller.
显然,本领域的技术人员应该明白,上述的本申请的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的计算机可读指令代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本申请不限制于任何特定的硬件和软件结合。Obviously, those skilled in the art should understand that the above-mentioned modules or steps of the present application may be implemented by a general-purpose computing device, and they may be concentrated on a single computing device or distributed in a network composed of multiple computing devices. Above, optionally, they can be implemented with computer-readable instruction code executable by the computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, can be different from this The steps shown or described are performed in sequence, either by making them into individual integrated circuit modules, or by making multiple modules or steps into a single integrated circuit module. As such, this application is not limited to any particular combination of hardware and software.
以上所述仅为本申请的优选实施例而已,并不用于限制本申请,对于本领域的技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包括在本申请的保护范围之内。The above description is only a preferred embodiment of the present application, and is not intended to limit the present application. For those skilled in the art, this application may have various modifications and changes. Any modification, equivalent replacement, or improvement made within the spirit and principle of this application shall be included in the protection scope of this application.

Claims (20)

  1. 一种业务接口的管理方法,其特征在于,包括:A method for managing a service interface, which is characterized by:
    当服务控制器接收到APP接口端发送的业务处理请求时,提取配置文件中所述业务处理请求所请求的待处理业务对应的待进行初始化的配置信息,所述配置文件中存储有不同业务逻辑对应的配置信息;When the service controller receives the service processing request sent by the APP interface, it extracts the configuration information to be initialized corresponding to the to-be-processed service requested by the service processing request in the configuration file, and different business logic is stored in the configuration file. Corresponding configuration information;
    所述服务控制器根据所述业务处理请求中的待进行配置的初始化参数以及业务信息初始化所述配置信息;The service controller initializes the configuration information according to initialization parameters to be configured and service information in the service processing request;
    所述服务控制器向服务控制器的服务类发送初始化后的配置信息;The service controller sends initialized configuration information to the service class of the service controller;
    所述服务控制器的服务类解析所述配置信息中业务处理请求类型,根据解析出的类型进行业务处理;The service class of the service controller parses a service processing request type in the configuration information, and performs service processing according to the parsed type;
    所述服务控制器的服务类将所述处理结果通过所述服务控制器反馈至所述APP接口端。The service class of the service controller feeds back the processing result to the APP interface through the service controller.
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, further comprising:
    所述服务控制器定义配置于服务控制器的服务类,所述服务类为从不同APP接口端的接口服务类中抽取的不同接口的业务逻辑。The service controller defines a service class configured in the service controller, and the service class is business logic of different interfaces extracted from interface service classes of different APP interface ends.
  3. 根据权利要求1所述的方法,其特征在于,所述服务控制器根据所述业务处理请求中的待进行配置的初始化参数以及业务信息初始化所述配置信息之前,所述方法还包括:The method according to claim 1, wherein before the service controller initializes the configuration information according to initialization parameters and service information to be configured in the service processing request, the method further comprises:
    所述服务控制器根据用户权限判断所述APP接口端是否有权进行业务处理;Determining, by the service controller, whether the APP interface terminal is authorized to perform business processing according to user permissions;
    若所述APP接口端无权进行业务处理,则所述服务控制器向所述APP接口端发送无权限处理结果;If the APP interface end does not have the right to perform business processing, the service controller sends a permissionless processing result to the APP interface end;
    所述服务控制器根据所述业务处理请求中的待进行配置的初始化参数以及业务信息初始化所述配置信息包括:Initializing the configuration information by the service controller according to initialization parameters and service information to be configured in the service processing request includes:
    若所述APP接口端有权进行业务处理,则所述服务控制器根据所述业务处理请求中的待进行配置的初始化参数以及业务信息初始化所述配置信息。If the APP interface is authorized to perform service processing, the service controller initializes the configuration information according to initialization parameters and service information to be configured in the service processing request.
  4. 根据权利要求1所述的方法,其特征在于,所述业务处理请求的类型包括SQL类型、Service类型,所述服务控制器的服务类解析所述配置信息中业务处理请求类型,根据解析出的类型进行业务处理包括:The method according to claim 1, wherein the type of the business processing request includes a SQL type and a Service type, and the service class of the service controller parses the type of the business processing request in the configuration information, according to the parsed out Types of business processing include:
    当所述服务类解析所述配置信息中的业务处理请求类型为SQL类型时,所述服务控制器的服务类从数据库中查询与所述配置信息对应的数据,对所述数据进行处理;或,When the service class parses the type of the business processing request in the configuration information as an SQL type, the service class of the service controller queries data corresponding to the configuration information from a database and processes the data; or ,
    当所述服务类解析所述配置信息中的业务处理请求类型为Service类型时,所述服务控制器的服务类反射调用所述配置信息对应的业务服务类,通过所述业务服务类进行业务处理。When the service class parses the service processing request type in the configuration information as a service type, the service class of the service controller reflects the business service class corresponding to the configuration information, and performs business processing through the business service class. .
  5. 根据权利要求1所述的方法,其特征在于,所述服务控制器的服务类将所述处理结果通过所述服务控制器反馈至所述APP接口端包括:The method according to claim 1, wherein the service class of the service controller feedbacks the processing result to the APP interface through the service controller comprises:
    所述服务类将进行处理后的业务处理结果反馈至所述服务控制器中;The service class feeds back the processed business processing result to the service controller;
    所述服务控制器记录所述APP接口端与所述业务处理请求、所述业务处理结果之间的对应关系,并将所述业务处理结果反馈至所述APP接口端。The service controller records the correspondence between the APP interface end and the business processing request and the business processing result, and feeds back the business processing result to the APP interface end.
  6. 根据权利要求5所述的方法,其特征在于,所述服务控制器的服务类将所述处理结果通过所述服务控制器反馈至所述APP接口端之后,所述方法还包括:The method according to claim 5, wherein after the service class of the service controller feeds back the processing result to the APP interface through the service controller, the method further comprises:
    所述服务控制器当接收到所述APP接口端发送的业务处理请求与记录在所述服务控制器中的所述APP接口端对应的业务处理请求相同时,提取与所述APP接口端、所述业务处理请求对应的业务处理结果反馈至所述APP接口端,并指示所述服务类重新执行所述业务处理请求对应的处理过程。When the service controller receives that the service processing request sent by the APP interface end is the same as the service processing request corresponding to the APP interface end recorded in the service controller, extracting the service processing request The service processing result corresponding to the service processing request is fed back to the APP interface and instructs the service class to re-execute the processing process corresponding to the service processing request.
  7. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, further comprising:
    当所述服务控制器接收到所述APP接口端发送的业务接口更新请求时,所述服务控制器根据所述业务接口更新请求中携带的更新内容对所述服务控制器中的配置文件中的参数、业务信息进行更新。When the service controller receives a business interface update request sent by the APP interface end, the service controller checks the information in the configuration file in the service controller according to the update content carried in the business interface update request. Parameters and business information are updated.
  8. 一种业务接口的管理装置,其特征在于,包括:A management device for a service interface, comprising:
    提取单元,用于当服务控制器接收到APP接口端发送的业务处理请求时,提取配置文件中所述业务处理请求所请求的待处理业务对应的待进行初始化的配置信息,所述配置文件中存储有不同业务逻辑对应的配置信息;An extracting unit, configured to: when the service controller receives a service processing request sent by the APP interface end, extract the configuration information to be initialized corresponding to the pending service requested by the service processing request in the configuration file, in the configuration file Stores configuration information corresponding to different business logic;
    初始化单元,用于所述服务控制器根据所述业务处理请求中的待进行配置的初始化参数以及业务信息初始化所述配置信息;An initialization unit, configured to initialize the configuration information by the service controller according to initialization parameters and service information to be configured in the service processing request;
    发送单元,用于所述服务控制器向服务控制器的服务类发送初始化后的配置信息;A sending unit, configured to send the initialized configuration information by the service controller to a service class of the service controller;
    处理单元,用于所述服务控制器的服务类解析所述配置信息中业务处理请求类型,根据解析出的类型进行业务处理;A processing unit, configured to analyze a service processing request type in the configuration information by a service class of the service controller, and perform business processing according to the parsed type;
    反馈单元,用于所述服务控制器的服务类将所述处理结果通过所述服务控制器反馈至所述APP接口端。The feedback unit is used by the service class of the service controller to feedback the processing result to the APP interface end through the service controller.
  9. 根据权利要求8所述的装置,其特征在于,所述装置还包括:The apparatus according to claim 8, further comprising:
    定义单元,用于所述服务控制器定义配置于服务控制器的服务类,所述服务类为 从不同APP接口端的接口服务类中抽取的不同接口的业务逻辑。A definition unit is used for the service controller to define a service class configured in the service controller, and the service class is business logic of different interfaces extracted from interface service classes of different APP interface ends.
  10. 根据权利要求8所述的装置,其特征在于,所述装置还包括:判断单元,The device according to claim 8, further comprising: a judging unit,
    所述判断单元,用于所述服务控制器根据用户权限判断所述APP接口端是否有权进行业务处理;The judging unit is configured to determine, by the service controller, whether the APP interface terminal is authorized to perform service processing according to a user authority;
    所述发送单元,还用于若所述APP接口端无权进行业务处理,则所述服务控制器向所述APP接口端发送无权限处理结果;The sending unit is further configured to: if the APP interface end is not authorized to perform business processing, the service controller sends a permissionless processing result to the APP interface end;
    所述初始化单元,具体用于若所述APP接口端有权进行业务处理,则所述服务控制器根据所述业务处理请求中的待进行配置的初始化参数以及业务信息初始化所述配置信息。The initialization unit is specifically configured to initialize the configuration information by the service controller according to initialization parameters and service information to be configured in the service processing request if the APP interface terminal is authorized to perform service processing.
  11. 根据权利要求8所述的装置,其特征在于,所述业务处理请求的类型包括SQL类型、Service类型,所述处理单元包括:The device according to claim 8, wherein the type of the business processing request includes a SQL type and a Service type, and the processing unit includes:
    第一处理模块,用于所述服务控制器将初始化后的配置信息发送至服务类中,当所述服务类解析所述配置信息中的业务处理请求类型为SQL类型时,所述服务控制器的服务类从数据库中查询与所述配置信息对应的数据,对所述数据进行处理;或,A first processing module, configured to send the initialized configuration information to a service class by the service controller, and when the service class parses a business processing request type in the configuration information as a SQL type, the service controller The service class queries data corresponding to the configuration information from a database, and processes the data; or
    第二处理模块,用于所述服务控制器将初始化后的配置信息发送至服务类中,当所述服务类解析所述配置信息中的业务处理请求类型为Service类型时,所述服务控制器的服务类反射调用所述配置信息对应的业务服务类,通过所述业务服务类进行业务处理。A second processing module, configured to send the initialized configuration information to a service class by the service controller, and when the service class parses a service processing request type in the configuration information as a service type, the service controller The service class reflects the business service class corresponding to the configuration information, and performs business processing through the business service class.
  12. 根据权利要求8所述的装置,其特征在于,所述反馈单元,具体用于所述服务类将进行处理后的业务处理结果反馈至所述服务控制器中,所述服务控制器记录所述APP接口端与所述业务处理请求、所述业务处理结果之间的对应关系,并将所述业务处理结果反馈至所述APP接口端。The device according to claim 8, wherein the feedback unit is specifically configured for the service class to feed back the processed business processing result to the service controller, and the service controller records the The correspondence relationship between the APP interface end and the service processing request and the service processing result, and feeding back the service processing result to the APP interface end.
  13. 根据权利要求12所述的装置,其特征在于,所述装置还包括:The device according to claim 12, further comprising:
    执行单元,用于所述服务控制器当接收到所述APP接口端发送的业务处理请求与记录在所述服务控制器中的所述APP接口端对应的业务处理请求相同时,提取与所述APP接口端、所述业务处理请求对应的业务处理结果反馈至所述APP接口端,并指示所述服务类重新执行所述业务处理请求对应的处理过程。An execution unit, configured to, when the service controller receives the service processing request sent by the APP interface end is the same as the service processing request corresponding to the APP interface end recorded in the service controller, extract the information The APP interface and the service processing result corresponding to the service processing request are fed back to the APP interface and instruct the service class to re-execute the processing process corresponding to the service processing request.
  14. 根据权利要求8所述的装置,其特征在于,所述装置还包括:The apparatus according to claim 8, further comprising:
    更新单元,用于当所述服务控制器接收到所述APP接口端发送的业务接口更新请求时,所述服务控制器根据所述业务接口更新请求中携带的更新内容对所述服务控制器中的配置文件中的参数、业务信息进行更新。An update unit, configured to, when the service controller receives a service interface update request sent by the APP interface end, the service controller updates the service controller according to the update content carried in the business interface update request The parameters and business information in the configuration file are updated.
  15. 一种非易失性可读存储介质,所述非易失性可读存储介质中存储有至少一计算机可读指令,所述计算机可读指令使处理器执行业务接口的管理方法,包括:A non-volatile readable storage medium storing at least one computer-readable instruction in the non-volatile readable storage medium, where the computer-readable instruction causes a processor to execute a management method of a service interface, including:
    当服务控制器接收到APP接口端发送的业务处理请求时,提取配置文件中所述业务处理请求所请求的待处理业务对应的待进行初始化的配置信息,所述配置文件中存储有不同业务逻辑对应的配置信息;When the service controller receives the service processing request sent by the APP interface, it extracts the configuration information to be initialized corresponding to the to-be-processed service requested by the service processing request in the configuration file, and different business logic is stored in the configuration file. Corresponding configuration information;
    所述服务控制器根据所述业务处理请求中的待进行配置的初始化参数以及业务信息初始化所述配置信息;The service controller initializes the configuration information according to initialization parameters to be configured and service information in the service processing request;
    所述服务控制器向服务控制器的服务类发送初始化后的配置信息;The service controller sends initialized configuration information to the service class of the service controller;
    所述服务控制器的服务类解析所述配置信息中业务处理请求类型,根据解析出的类型进行业务处理;The service class of the service controller parses a service processing request type in the configuration information, and performs service processing according to the parsed type;
    所述服务控制器的服务类将所述处理结果通过所述服务控制器反馈至所述APP接口端。The service class of the service controller feeds back the processing result to the APP interface through the service controller.
  16. 根据权利要求15所述的非易失性可读存储介质,其特征在于,所述计算机可读指令使处理器执行所述方法还包括:The non-volatile readable storage medium according to claim 15, wherein the computer-readable instructions cause a processor to execute the method further comprising:
    所述服务控制器定义配置于服务控制器的服务类,所述服务类为从不同APP接口端的接口服务类中抽取的不同接口的业务逻辑。The service controller defines a service class configured in the service controller, and the service class is business logic of different interfaces extracted from interface service classes of different APP interface ends.
  17. 根据权利要求15所述的非易失性可读存储介质,其特征在于,所述计算机可读指令使处理器执行所述服务控制器根据所述业务处理请求中的待进行配置的初始化参数以及业务信息初始化所述配置信息之前,所述方法还包括:The non-volatile readable storage medium according to claim 15, wherein the computer-readable instructions cause the processor to execute initialization parameters for the service controller to be configured according to the business processing request and Before the service information initializes the configuration information, the method further includes:
    所述服务控制器根据用户权限判断所述APP接口端是否有权进行业务处理;Determining, by the service controller, whether the APP interface terminal is authorized to perform business processing according to user permissions;
    若所述APP接口端无权进行业务处理,则所述服务控制器向所述APP接口端发送无权限处理结果;If the APP interface end does not have the right to perform business processing, the service controller sends a permissionless processing result to the APP interface end;
    所述服务控制器根据所述业务处理请求中的待进行配置的初始化参数以及业务信息初始化所述配置信息包括:Initializing the configuration information by the service controller according to initialization parameters and service information to be configured in the service processing request includes:
    若所述APP接口端有权进行业务处理,则所述服务控制器根据所述业务处理请求中的待进行配置的初始化参数以及业务信息初始化所述配置信息。If the APP interface is authorized to perform service processing, the service controller initializes the configuration information according to initialization parameters and service information to be configured in the service processing request.
  18. 一种计算机设备,包括:处理器、存储器、通信接口和通信总线,所述处理器、所述存储器和所述通信接口通过所述通信总线完成相互间的通信;A computer device includes a processor, a memory, a communication interface, and a communication bus, and the processor, the memory, and the communication interface complete communication with each other through the communication bus;
    所述存储器用于存放至少一计算机可读指令,所述计算机可读指令使所述处理器执行业务接口的管理方法,包括:The memory is configured to store at least one computer-readable instruction, and the computer-readable instruction causes the processor to execute a management method of a service interface, including:
    当服务控制器接收到APP接口端发送的业务处理请求时,提取配置文件中所述业 务处理请求所请求的待处理业务对应的待进行初始化的配置信息,所述配置文件中存储有不同业务逻辑对应的配置信息;When the service controller receives the service processing request sent by the APP interface, it extracts the configuration information to be initialized corresponding to the to-be-processed service requested by the service processing request in the configuration file, and different business logic is stored in the configuration file. Corresponding configuration information;
    所述服务控制器根据所述业务处理请求中的待进行配置的初始化参数以及业务信息初始化所述配置信息;The service controller initializes the configuration information according to initialization parameters to be configured and service information in the service processing request;
    所述服务控制器向服务控制器的服务类发送初始化后的配置信息;The service controller sends initialized configuration information to the service class of the service controller;
    所述服务控制器的服务类解析所述配置信息中业务处理请求类型,根据解析出的类型进行业务处理;The service class of the service controller parses a service processing request type in the configuration information, and performs service processing according to the parsed type;
    所述服务控制器的服务类将所述处理结果通过所述服务控制器反馈至所述APP接口端。The service class of the service controller feeds back the processing result to the APP interface through the service controller.
  19. 根据权利要求18所述的计算机设备,其特征在于,所述计算机可读指令使所述处理器执行所述方法还包括:The computer device of claim 18, wherein the computer-readable instructions cause the processor to perform the method further comprising:
    所述服务控制器定义配置于服务控制器的服务类,所述服务类为从不同APP接口端的接口服务类中抽取的不同接口的业务逻辑。The service controller defines a service class configured in the service controller, and the service class is business logic of different interfaces extracted from interface service classes of different APP interface ends.
  20. 根据权利要求18所述的计算机设备,其特征在于,所述计算机可读指令使所述处理器执行所述服务控制器根据所述业务处理请求中的待进行配置的初始化参数以及业务信息初始化所述配置信息之前,所述方法还包括:The computer device according to claim 18, wherein the computer-readable instructions cause the processor to execute the service controller to initialize the service controller according to initialization parameters to be configured in the service processing request and service information. Before the configuration information is described, the method further includes:
    所述服务控制器根据用户权限判断所述APP接口端是否有权进行业务处理;Determining, by the service controller, whether the APP interface terminal is authorized to perform business processing according to user permissions;
    若所述APP接口端无权进行业务处理,则所述服务控制器向所述APP接口端发送无权限处理结果;If the APP interface end does not have the right to perform business processing, the service controller sends a permissionless processing result to the APP interface end;
    所述服务控制器根据所述业务处理请求中的待进行配置的初始化参数以及业务信息初始化所述配置信息包括:Initializing the configuration information by the service controller according to initialization parameters and service information to be configured in the service processing request includes:
    若所述APP接口端有权进行业务处理,则所述服务控制器根据所述业务处理请求中的待进行配置的初始化参数以及业务信息初始化所述配置信息。If the APP interface is authorized to perform service processing, the service controller initializes the configuration information according to initialization parameters and service information to be configured in the service processing request.
PCT/CN2018/111708 2018-08-01 2018-10-24 Service interface management method and apparatus, and storage medium and computer device WO2020024458A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810866687.5A CN109327499B (en) 2018-08-01 2018-08-01 Service interface management method and device, storage medium and terminal
CN201810866687.5 2018-08-01

Publications (1)

Publication Number Publication Date
WO2020024458A1 true WO2020024458A1 (en) 2020-02-06

Family

ID=65264201

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/111708 WO2020024458A1 (en) 2018-08-01 2018-10-24 Service interface management method and apparatus, and storage medium and computer device

Country Status (2)

Country Link
CN (1) CN109327499B (en)
WO (1) WO2020024458A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111552464A (en) * 2020-04-27 2020-08-18 上海鸿翼软件技术股份有限公司 SDK generation method, device, equipment and medium
CN115396492A (en) * 2022-08-03 2022-11-25 深圳前海环融联易信息科技服务有限公司 Service request method, service request device, computer equipment and program product
CN111552464B (en) * 2020-04-27 2024-05-31 上海鸿翼软件技术股份有限公司 SDK generation method, device, equipment and medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110971664B (en) * 2019-10-31 2023-04-18 北京浪潮数据技术有限公司 Interface service management system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060126602A1 (en) * 2004-11-11 2006-06-15 Clemens Heinrich Method and arrangement for providing services between data processing devices
CN106453519A (en) * 2016-09-21 2017-02-22 合网络技术(北京)有限公司 Interface call method and device
CN106453536A (en) * 2016-09-29 2017-02-22 车智互联(北京)科技有限公司 Network request processing method and system and server
CN106790501A (en) * 2016-12-15 2017-05-31 咪咕音乐有限公司 A kind of method for processing business and device redirected based on interface

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103425793B (en) * 2013-08-28 2017-03-01 五八同城信息技术有限公司 Method for utilizing database purchase layer to access data base in instant communicating system
CN108021710B (en) * 2017-12-28 2020-03-24 蜂助手股份有限公司 Dynamic interface conversion method, device, terminal equipment and storage medium
CN108196879A (en) * 2018-01-09 2018-06-22 平安科技(深圳)有限公司 Method for processing business, device, equipment and computer readable storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060126602A1 (en) * 2004-11-11 2006-06-15 Clemens Heinrich Method and arrangement for providing services between data processing devices
CN106453519A (en) * 2016-09-21 2017-02-22 合网络技术(北京)有限公司 Interface call method and device
CN106453536A (en) * 2016-09-29 2017-02-22 车智互联(北京)科技有限公司 Network request processing method and system and server
CN106790501A (en) * 2016-12-15 2017-05-31 咪咕音乐有限公司 A kind of method for processing business and device redirected based on interface

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111552464A (en) * 2020-04-27 2020-08-18 上海鸿翼软件技术股份有限公司 SDK generation method, device, equipment and medium
CN111552464B (en) * 2020-04-27 2024-05-31 上海鸿翼软件技术股份有限公司 SDK generation method, device, equipment and medium
CN115396492A (en) * 2022-08-03 2022-11-25 深圳前海环融联易信息科技服务有限公司 Service request method, service request device, computer equipment and program product
CN115396492B (en) * 2022-08-03 2023-11-17 深圳前海环融联易信息科技服务有限公司 Service request method, device, computer equipment and program product

Also Published As

Publication number Publication date
CN109327499B (en) 2022-01-28
CN109327499A (en) 2019-02-12

Similar Documents

Publication Publication Date Title
US10757106B2 (en) Resource access control method and device
US10749990B1 (en) Automatic discovery of API information
WO2019184164A1 (en) Method for automatically deploying kubernetes worker node, device, terminal apparatus, and readable storage medium
US11405458B2 (en) Sending and receiving data using multiple objects with a single storage request
US10908970B1 (en) Data interface for secure analytic data system integration
WO2019196239A1 (en) Method for managing thread interfaces, and terminal device and computer-readable storage medium
US20220413937A1 (en) Node management method, device and apparatus, storage medium, and system
CN111258627A (en) Interface document generation method and device
US20160196188A1 (en) Failure recovery of a task state in batch-based stream processing
CN109918191B (en) Method and device for preventing frequency of service request
WO2022247316A1 (en) Storage object processing system, request processing method, gateway, and storage medium
CN111177776A (en) Multi-tenant data isolation method and system
WO2020024458A1 (en) Service interface management method and apparatus, and storage medium and computer device
US9942267B1 (en) Endpoint segregation to prevent scripting attacks
WO2019201248A1 (en) Re-bootstrap method and device in lightweight machine to machine system
CN113111666A (en) System and method for realizing multi-language translation of application program
US11431795B2 (en) Method, apparatus and storage medium for resource configuration
US10855563B2 (en) Supplementing log messages with metadata
US20230171224A1 (en) System and method for managing network connected devices
CN113821333A (en) Android application program migration method and device
CN109005465B (en) Bullet screen message distribution method, device, equipment and storage medium
CN116244682A (en) Database access method, device, equipment and storage medium
WO2022121492A1 (en) File transmission method and apparatus, computer device, and storage medium
CN115277187A (en) Method, device, storage medium and equipment for prompting request data verification result
CN107273047A (en) A kind of buffer memory management method, cache manager and storage management software

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18928360

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18928360

Country of ref document: EP

Kind code of ref document: A1