Freight rate search request processing method, freight rate search interface system and electronic equipment

By determining the target service interface from multiple business interfaces and obtaining target configuration information, the freight search request is transmitted to the target service cluster, which solves the problem of not being able to provide safe and reliable interface services quickly and achieves fast and secure interface service provision.

CN119829820APending Publication Date: 2025-04-15TRAVELSKY TECHNOLOGY LIMITED
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411873590.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

When the original interface remains unchanged, it is impossible to quickly provide safe and reliable interface services.

Method used

In response to receiving the freight search request sent by the client, the target service interface corresponding to the freight search request is determined from the multiple service interfaces, and the target configuration information corresponding to the target service interface is obtained. The freight search request is transmitted to the target service cluster based on the target configuration information.

Benefits of technology

It realizes the ability to provide safe and reliable interface services quickly, avoiding delays or errors caused by improper interface selection or inadequate configuration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119829820A_ABST
    Figure CN119829820A_ABST
Patent Text Reader

Abstract

The invention discloses a freight rate search request processing method, a freight rate search interface system and electronic equipment. The method relates to the field of data search, and comprises the following steps: in response to a received freight rate search request sent by a client, determining a target service interface corresponding to the freight rate search request from a plurality of service interfaces; obtaining target configuration information corresponding to the target service interface, the target configuration information at least comprises white list information of the target service interface, access traffic information of the target service interface, address information of a target service cluster connected with the target service interface, a target implementation class corresponding to the target service interface, a target message format corresponding to the target service interface and effective time of the target service interface; and transmitting the freight rate search request to the target service cluster based on the target configuration information. According to the method and the device, the technical problem that safe and reliable interface service cannot be quickly provided under the condition that the original interface is not changed in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data search, and in particular to a method for processing a freight rate search request, a freight rate search interface system and an electronic device. Background Art

[0002] Under the requirements of national information innovation and localized software, the vigorous development of the global civil aviation industry and the continuous expansion of economic globalization have prompted most countries in the world to have one or more airlines and countless airports, which also means more routes and their corresponding freight rate data, as well as more internal interface services of the aviation information system, which has led to more freight rate search interfaces that need to provide external services. However, the current technical solution has the problem that it cannot quickly provide safe and reliable interface services without changing the original interface.

[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0004] The embodiments of the present invention provide a method for processing a freight rate search request, a freight rate search interface system and an electronic device, so as to at least solve the technical problem in the related art that a safe and reliable interface service cannot be quickly provided when the original interface remains unchanged.

[0005] According to one aspect of an embodiment of the present invention, a method for processing a freight rate search request is provided, comprising: in response to receiving a freight rate search request sent by a client, determining a target business interface corresponding to the freight rate search request from multiple business interfaces; obtaining target configuration information corresponding to the target business interface, wherein the target configuration information at least includes: whitelist information of the target business interface, access traffic information of the target business interface, address information of a target business cluster connected to the target business interface, a target implementation class corresponding to the target business interface, a target message format corresponding to the target business interface, and an effective time of the target business interface; and transparently transmitting the freight rate search request to the target business cluster based on the target configuration information.

[0006] Further, determining a target business interface corresponding to the freight rate search request from a plurality of business interfaces includes: parsing the freight rate search request to obtain header information of the freight rate search request; and determining the target business interface based on the header information.

[0007] Further, based on the target configuration information, the freight search request is transparently transmitted to the target business cluster, including: based on the whitelist information, determining whether the freight search request is allowed to be transparently transmitted; based on the effective time, determining whether the target business interface is in an effective state; in response to allowing the freight search request to be transparently transmitted and the target business interface being in an effective state, assembling the freight search request according to the target message format through the target implementation class to obtain a target message; based on the address information of the target business cluster, transparently transmitting the target message to the target business cluster.

[0008] Furthermore, in response to an exception occurring during the processing of the freight rate search request, the method further includes: loading an exception handling class corresponding to the target business interface; and performing exception handling through the exception handling class.

[0009] Furthermore, in response to not determining the target business interface from the multiple business interfaces, the method also includes: creating a new business interface corresponding to the freight rate search request, and a new implementation class corresponding to the new business interface; configuring the new business interface, and generating new configuration information corresponding to the new business interface.

[0010] Furthermore, the method also includes: storing the new implementation class in a preset path; and reflectively loading the code stored in the preset path.

[0011] According to another aspect of an embodiment of the present invention, a freight rate search interface system is also provided, including: a freight rate search interface service component, which is used to load implementation classes of different business interfaces, determine a target business interface from different business interfaces in response to receiving a freight rate search request sent by a client, and transparently transmit the freight rate search request to a target business cluster connected to the target business interface based on target configuration information corresponding to the target business interface, wherein the target configuration information at least includes: whitelist information of the target business interface, access traffic information of the target business interface, address information of the target business cluster, target implementation class corresponding to the target business interface, target message format corresponding to the target business interface, and effective time of the target business interface; a parameter configuration center component, which is used to configure different business interfaces and obtain configuration information corresponding to different business interfaces; and a service parameter storage component, which is used to store configuration information corresponding to different business interfaces.

[0012] According to another aspect of an embodiment of the present invention, there is further provided an electronic device, comprising: a memory storing an executable program; and a processor for running the program, wherein the method in each embodiment of the present invention is executed when the program is running.

[0013] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium includes a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the methods in various embodiments of the present invention.

[0014] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the method in each embodiment of the present invention is implemented.

[0015] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method in each embodiment of the present invention is implemented.

[0016] According to another aspect of the embodiments of the present invention, a computer program is further provided. When the computer program is executed by a processor, the methods in the embodiments of the present invention are implemented.

[0017] In an embodiment of the present invention, in response to receiving a freight search request sent by a client, a target business interface corresponding to the freight search request is determined from multiple business interfaces; the target configuration information corresponding to the target business interface is obtained, wherein the target configuration information at least includes: whitelist information of the target business interface, access flow information of the target business interface, address information of the target business cluster connected to the target business interface, target implementation class corresponding to the target business interface, target message format corresponding to the target business interface, and effective time of the target business interface; the freight search request is transparently transmitted to the target business cluster based on the target configuration information. It is easy to notice that through the target configuration information, the freight search interface system can quickly respond to the freight search request of the client, and can flexibly select the most suitable interface from multiple business interfaces for data processing. This avoids delays or errors caused by improper interface selection or untimely configuration, and achieves the purpose of being able to quickly provide safe and reliable interface services, thereby achieving the technical effect of being able to quickly provide safe and reliable interface services based on the original interface, thereby solving the technical problem in the related technology that safe and reliable interface services cannot be quickly provided when the original interface remains unchanged. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0019] Figure 1 is a flow chart of a method for processing a freight rate search request according to an embodiment of the present invention;

[0020] Figure 2 is a flow chart of an optional method for configuring dynamic interface relations according to an embodiment of the present invention;

[0021] Figure 3 is a schematic diagram of an optional overall flow data according to an embodiment of the present invention;

[0022] Figure 4 is a flow chart of an optional freight rate search interface service method according to an embodiment of the present invention;

[0023] Figure 5 is a schematic diagram of a freight rate search interface system according to an embodiment of the present invention. DETAILED DESCRIPTION

[0024] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0026] According to an embodiment of the present invention, an embodiment of a method for processing a freight rate search request is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0027] Figure 1 is a flow chart of a method for processing a freight rate search request according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:

[0028] Step S102: in response to receiving a freight rate search request sent by a client, determining a target service interface corresponding to the freight rate search request from a plurality of service interfaces.

[0029] The above-mentioned fare search request can be input by the user in the search interface of the client, and is used to query the flight fares and available seats from the departure point to the destination within a specific date or date range. Among them, the fare search request at least includes: departure information, destination information, passenger information, departure time, arrival time, and airline information. The above-mentioned business interface can be the interface responsible for specific business logic processing in the software system within the airline. They are the core components of the system functions and are used to define the rules and processes of different business operations, as well as the specifications for communication between internal components of the system and between the system and external systems. The above-mentioned target business interface can be the target business interface corresponding to the fare search request.

[0030] In an optional embodiment, in order to solve the problem in the prior art that a safe and reliable interface service cannot be quickly provided when the original interface remains unchanged, an embodiment of the present invention provides a method for processing a freight search request. First, when a freight search request (hereinafter referred to as a request) sent by a client is received, a target business interface corresponding to the freight search request can be determined from multiple business interfaces. For example, the freight search request can be first parsed to obtain the header information of the freight search request, and then the target business interface can be determined based on the header information.

[0031] Step S104, obtain the target configuration information corresponding to the target business interface, wherein the target configuration information includes at least: whitelist information of the target business interface, access traffic information of the target business interface, address information of the target business cluster connected to the target business interface, target implementation class corresponding to the target business interface, target message format corresponding to the target business interface, and effective time of the target business interface.

[0032] The above configuration information can be set in advance by the technician to ensure that the freight search request can be processed correctly, safely and efficiently. Among them, the whitelist is used to control access rights. Only clients in the whitelist can access specific business interfaces, which helps to ensure system security and prevent unauthorized access. It also allows system administrators to finely control clients that access the interface. Access traffic information is used to implement traffic control strategies, such as limiting the number of requests within a certain period of time to prevent the interface from affecting performance or service availability due to overload. Cluster address information can ensure that the freight search request can be routed to the business cluster that actually provides the service, rather than running idle or mistakenly sent to an invalid address. The target implementation class contains the specific logic for processing specific business interface requests. By obtaining the target implementation class through configuration information, the system can dynamically select and load the correct business processing code, which can avoid hard coding and make the processing logic of adding new interfaces or updating existing interfaces more flexible and simple. The target message format information is used to guide the system on how to correctly parse and generate messages to ensure the accuracy and consistency of data transmission. The effective time defines when a certain configuration or business interface takes effect and when it stops serving. This is very important during system maintenance, upgrades or business adjustments to avoid affecting the normal operation of services at inappropriate times.

[0033] In an optional embodiment, when the target business interface is determined, the system can first query the configuration center for the configuration information of the target business interface based on the target business interface. When querying, the relevant information will be obtained through the Application Programming Interface (API) or query language provided by the configuration center according to the identifier. The configuration information obtained from the configuration center may be a structured data object. The system needs to parse this data object to extract the whitelist information, access traffic information, business cluster address information, implementation class information, message format information, and effective time of the target business interface. Verify whether the obtained configuration information is complete and valid, such as checking whether it contains all necessary fields, and whether the message format, effective time, etc. meet expectations. According to the extracted and verified configuration information, the system will perform corresponding business logic processing. For example, use whitelist information for access control, use traffic information for current limiting, use business cluster address information and implementation class information for backend interface calls and business processing, and use message format information for data serialization and deserialization.

[0034] Figure 2 is a flow chart of an optional method for configuring dynamic interface relationships according to an embodiment of the present invention. Figure 2 As shown, the method includes:

[0035] Step S21, configuring the relationship between the service interface and the precompiled code;

[0036] Step S22, configuring the whitelist and current limiting information of the interface;

[0037] Step S23, configuring the backend interface access address;

[0038] Step S24, whether the configuration is effective;

[0039] Step S25, configuring the precompiled code path.

[0040] It should be noted that the implementation method of multi-interface service business is as follows: SSA only provides one external business interface (SSA provides different business interfaces internally, each interface has its own request parameters and request format, and these interfaces do not provide services externally). This only external interface implements the backend data interface configuration and integration. The system background pre-provides a series of pre-compiled business implementation classes and default implementation classes through high-level programming language (Java) code, and all business implementation classes and default implementation classes are pre-loaded when the project starts. At this time, the pre-loaded classes are not effective. When there is a need to open external business functions, the interface is dynamically configured through the parameter configuration center to realize pluggable business functions according to the interface and heterogeneous business code functions. The following four functions are configured through the parameter configuration center: 1. Configure the association between the request header parameters and the pre-compiled implementation class to make the pre-loaded code in SSA effective; 2. Configure the whitelist of accessible interfaces, the accessible traffic of the front-end interface (traffic accessing this external address), the accessible traffic of the back-end interface (traffic accessing the specific business interface address by SSA), and configure the security control of this new interface; 3. Configure the access address of the back-end business; 4. Configure whether the interface is effective and the effective time.

[0041] Among them, the Shop Service API (SSA) is a service architecture or interface type designed for specific business scenarios, and is mainly used in the fare search service of the civil aviation industry. The role of SSA is to provide a unified and standardized interface, so that front-end applications can query flight fares, seat availability and other information through this interface without directly interacting with multiple underlying business systems or data sources.

[0042] Step S106: transparently transmit the freight rate search request to the target business cluster based on the target configuration information.

[0043] In an optional embodiment, when the target configuration information is obtained, the information configured by the parameter configuration center is saved in the storage. After the configuration takes effect, SSA does not need to restart the project. The transparent transmission function (dynamic plug-in) of the new interface service is implemented through the precompiled implementation class, and it is directly put online through simple testing. If the precompiled implementation class and the precompiled default class cannot meet the business functions of the new interface, you only need to create a new interface implementation class (java) under the specified path. SSA automatically completes the loading of the new interface implementation class (heterogeneous business class) through java reflection, and configures the association relationship of the above 4 items in the parameter configuration center to complete the implementation of the new business interface function.

[0044] The data processing flow is as follows: based on the business request header information and SSA parameter information, obtain whether the interface is in the transparent transmission whitelist; obtain whether the interface is current limited and obtain the interface data format; obtain the interface target cluster address; obtain the association between the interface and the precompiled Java business class, and based on access control, obtain the precompiled implementation business class through Java reflection (obtain the entry business implementation class and the exit business implementation class according to the interface type) to realize the transparent transmission function of the business function.

[0045] In an embodiment of the present invention, in response to receiving a freight search request sent by a client, a target business interface corresponding to the freight search request is determined from multiple business interfaces; the target configuration information corresponding to the target business interface is obtained, wherein the target configuration information at least includes: whitelist information of the target business interface, access flow information of the target business interface, address information of the target business cluster connected to the target business interface, target implementation class corresponding to the target business interface, target message format corresponding to the target business interface, and effective time of the target business interface; the freight search request is transparently transmitted to the target business cluster based on the target configuration information. It is easy to notice that through the target configuration information, the system can quickly respond to the freight search request of the client, and can flexibly select the most suitable interface from multiple business interfaces for data processing. This avoids delays or errors caused by improper interface selection or untimely configuration, and achieves the purpose of being able to quickly provide safe and reliable interface services, thereby achieving the technical effect of being able to quickly provide safe and reliable interface services based on the original interface, thereby solving the technical problem in the related technology that safe and reliable interface services cannot be quickly provided when the original interface remains unchanged.

[0046] Optionally, determining a target business interface corresponding to the freight rate search request from a plurality of business interfaces includes: parsing the freight rate search request to obtain header information of the freight rate search request; and determining the target business interface based on the header information.

[0047] In an optional embodiment, Java can be used to parse the header information of the request. The request header information contains important metadata about the request, such as the request type, the accepted format, the client information, etc., which is crucial for determining the business interface. Extract a specific business identifier (such as a business code or business type) from the request header. In the fare search service of the civil aviation industry, this may be a specific string or enumeration value used to identify which business type the request should be processed as. Use the extracted business identifier to query the business interface configuration information corresponding to the identifier from the configuration center. This includes the whitelist information, access traffic information, business cluster address information, implementation class information, message format information, and effective time of the target business interface. According to the queried implementation class information, determine the specific implementation class corresponding to the target business interface. In Java, this is usually done through a reflection mechanism, that is, dynamically creating and instantiating objects through a class name string. Verify whether the queried configuration information is within the validity period, whether it complies with the whitelist rules, whether the access traffic is within the allowed range, etc. If the verification fails, the system may reject the request or return an error message. If the configuration information is verified, it can be determined that the business interface corresponding to the configuration information is the target business interface. At this time, the system will use the determined target implementation class to call the backend business cluster and execute the specific freight rate search business logic. This may involve converting request parameters into a specific format, calling the backend service, receiving and processing the response data, etc.

[0048] Optionally, transparently transmitting the freight search request to the target business cluster based on the target configuration information includes: determining whether transparent transmission of the freight search request is allowed based on the whitelist information; determining whether the target business interface is in an effective state based on the effective time; in response to allowing transparent transmission of the freight search request and the target business interface being in an effective state, assembling the freight search request according to the target message format through the target implementation class to obtain a target message; based on the address information of the target business cluster, transparently transmitting the target message to the target business cluster.

[0049] In an optional embodiment, the system may first determine whether transparent transmission of the freight search request is allowed based on the whitelist information, and determine whether the target business interface is in an effective state based on the effective time. When it is determined that transparent transmission of the freight search request is allowed and the target business interface is in an effective state, the system may assemble the freight search request according to the target message format through the target implementation class to obtain the target message, and finally, based on the address information of the target business cluster, transparently transmit the target message to the target business cluster.

[0050] Optionally, in response to an exception occurring during the processing of the freight rate search request, the method further includes: loading an exception handling class corresponding to the target business interface; and performing exception handling through the exception handling class.

[0051] In an optional embodiment, when an exception occurs in the system's processing of the freight rate search request, the system may also load an exception handling class corresponding to the target business interface and perform exception handling through the exception handling class.

[0052] Optionally, in response to not determining the target business interface from the multiple business interfaces, the method further includes: creating a new business interface corresponding to the freight rate search request, and a new implementation class corresponding to the new business interface; configuring the new business interface, and generating new configuration information corresponding to the new business interface.

[0053] In an optional embodiment, when the system does not determine the target business from multiple business interfaces, the system can also create a new business interface corresponding to the freight rate search request, and a new implementation class corresponding to the new business interface, and then the system can configure the new business interface to generate new configuration information corresponding to the new business interface. In other words, if the precompiled implementation class and the precompiled default class cannot meet the business functions of the new interface, you only need to create a new interface implementation class (java) under the specified path, SSA automatically completes the loading of the new interface implementation class (heterogeneous business class) through java reflection, and configures the association relationship of the above 4 items in the parameter configuration center to complete the implementation of the new business interface function.

[0054] Optionally, the method further includes: storing the new implementation class in a preset path; and reflectively loading the code stored in the preset path.

[0055] In an optional embodiment, the system can also store the new implementation class in a preset path, and reflectively load the code stored in the preset path. That is, when the precompiled Java processing class cannot meet the existing new business, by developing new business processing, put it into the path of the reserved unimplemented class, load the Java code in the path of the reserved unimplemented class through Java reflection, and at the same time, by configuring the parameters of step one, realize the transparent transmission function of the new business interface.

[0056] Figure 3 is a schematic diagram of an optional overall flow data according to an embodiment of the present invention, such as Figure 3 As shown, the parameter configuration center and the pluggable data storage location are connected by configuring the pluggable interface relationship communication, the freight rate search interface service implementation and the pluggable data storage location are connected by communication, and the freight rate search interface service implementation can obtain the pluggable parameters from the pluggable data storage location.

[0057] Figure 4 FIG. 1 is a flow chart of an optional freight rate search interface service method according to an embodiment of the present invention. Figure 4 As shown, the method comprises the following steps:

[0058] Step S41, obtaining a service request;

[0059] Step S42, determine whether the parameter relationship is configured, if so, proceed to step S43, if not, proceed to step S45;

[0060] Step S43, when the project starts, load a series of precompiled codes (interface class, implementation class, exception handling class, response class), and determine whether there is a preset compiled code, if so, go to step S44, if not, go to step S47;

[0061] Step S44, determine whether to perform flow control, if yes, proceed to step S45, if no, proceed to step S46;

[0062] Step S45, transparent transmission of heterogeneous services;

[0063] Step S46, heterogeneous response processing;

[0064] Step S47, reload the code in the specified path or the default path, and return to step S44;

[0065] Step S48, end.

[0066] The present invention discloses a method for quickly implementing multiple interfaces in an air traffic information system according to parameters during a freight rate search process, and introduces a method for obtaining different target business interfaces and interface-related parameters through different business request header information, and realizing a method for dynamically configuring interfaces and quickly transparently transmitting business according to precompiled business functions.

[0067] Why can't a default implementation class be used to complete the transparent transmission of the impossible business interface: 1. The request message may be in XML format and JSON format, and the interface response result may also be in XML format and JSON format, resulting in differences in the processing process. 2. There are differences in the message results of the interface response results. There is no impact by default. When SSA calls the background interface, there may be network and other reasons, resulting in the response to the customer being generated by SSA. Different business implementation classes of SSA need to implement impossible response message bodies based on different business interfaces. 3. The background interface may have different requirements for the message header and message body when requesting. Different business implementation classes are designed to handle these different requirements.

[0068] The system design components described in the present invention include: a freight rate search interface service component (SSA service component), a parameter configuration center, and a service parameter storage location (distributed coordination (zookeeper) service or database (Database, DB) or memory database redis). Freight rate search interface service component (SSA service component): implemented through java code, responsible for loading the implementation of business code, obtaining the association relationship between the business interface and the business, analyzing whether each business request is in the whitelist, whether the business type of the request message is correct, whether the business request can be called through the network service, processing the response message format and message information of the abnormal business, processing the message response of normal business, and processing the log storage according to the business interface. Service parameter storage (zookeeper service): responsible for the configuration management of parameters in the freight rate search interface sub-service component (SSA service component), including whitelist information, interface relationship information, background interface address, and background interface parameters, to ensure the real-time and consistency of parameters in the cluster environment. Parameter configuration center component: implemented through Java code, responsible for configuring the parameters used by the freight rate search interface service component, configuring whether the Java precompiled code is effective, configuring the association between the Java precompiled code and the business request, configuring the whitelist information of the request, the background service request address information, and configuring the flow control information.

[0069] The implementation principle of this method: Step 1: Configure the relevant parameters of multiple interfaces in the parameter configuration center (dynamic configuration), including interface identification, interface whitelist information, interface implementation class name precompiled in SSA, interface exception implementation class name precompiled in SSA, default implementation class name precompiled in SSA, interface request address, request message format (xml / json / other), interface access traffic information. Step 2: Precompile Java code in the SSA service, including precompiled interface class, precompiled implementation class, precompiled exception class, precompiled response processing class, precompiled default class, and reserve the path of unimplemented class for subsequent business expansion (heterogeneous processing). When the SSA service component starts the project, it generates business code through Java reflection, and obtains parameter information (the information configured in the parameter configuration center is currently saved in Zookeeper and can be replaced by database / redis, etc.), and associates the relationship between business code and reflection-generated implementation class. When a business request is made, determine whether the business interface has corresponding parameters in Zookeeper, whether it is effective, whether the parameters are normal, etc., determine whether the precompiled interface and implementation class exist, and determine whether the access is limited during the access process, etc., to achieve the transparent transmission function of the new business interface. Step 3: When the precompiled Java processing class cannot meet the existing new business, develop new business processing, put it into the path of the reserved unimplemented class, load the Java code in the path of the reserved unimplemented class through Java reflection, and configure the parameters of step 1 at the same time to achieve the transparent transmission function of the new business interface.

[0070] The specific implementation steps include:

[0071] S1, determine whether the new business interface has special business requirements: by confirming with business personnel and developers, determine whether the new business interface has the following three special requirements: 1. Whether the request message is not in XML or JSON format (the current interface only supports XML or JSON format); 2. Whether the response message body requires a fixed specified format; 3. Whether the backend interface has special message headers and message body descriptions. If there are no special requirements in the above three aspects, go directly to S2, otherwise go to S2.

[0072] S2, operation steps for special business requirements: Based on the special business, create a business implementation class (java precompiled code) under the specified path. After the project is started, load the implementation class through reflection (heterogeneous business).

[0073] S3, operation steps for all businesses: configure the association relationship of the new interface in the service parameter management component, including: whitelist, backend interface IP, flow control information, association relationship information between the interface and the precompiled implementation class, interface request header parameters and other related information.

[0074] S4, freight rate search interface business process: The freight rate search interface service precompiles the Java function code, obtains the local IP address, parses the business request header information, obtains the association between the business interface and the implementation class through Zookeeper, first determines whether there is an association, and returns directly if there is an association. If there is an association, it determines whether it is in the whitelist service, whether the interface is effective, whether there is a special business implementation class, and whether there is a background interface address. When the relevant verification is not met, it returns directly; when the verification conditions are met, the request is transferred according to the association, the precompiled interface information is accessed, and the flow is controlled. After the business operation is successful, the business message information is returned through the precompiled response interface; when the business is abnormal due to network and other reasons, the freight rate search interface service assembles the response message header and message body information through the precompiled implementation class and returns it to the client. After all interface processes, the business information is assembled through the precompiled interface and sent to the distributed event stream platform (kafka) service to be captured by the traffic data statistics interface.

[0075] The present invention can pre-develop the function module code according to the four dimensions of interface type, business request type, business response type, and request parameters. When the interface with the same dimensions needs to access the system, the function of the business interface can be realized by configuring the corresponding business rules and opening the business authority in two simple operation steps, without the need for a series of time-consuming tasks such as redeveloping the code, code testing, and restarting the server. It can quickly realize the application of business functions, achieve rapid business response, zero code development, and zero software restart.

[0076] According to another aspect of an embodiment of the present invention, a freight rate search interface system is also provided. Figure 5 Schematic diagram of a fare search interface system according to an embodiment of the present invention. Figure 5 As shown, the freight rate search interface system 50 includes: a freight rate search interface service component 52, a parameter configuration center component 54 and a service parameter storage component 56.

[0077] Among them, the freight rate search interface service component is used to load the implementation classes of different business interfaces, and in response to receiving the freight rate search request sent by the client, determine the target business interface from different business interfaces, and based on the target configuration information corresponding to the target business interface, transparently transmit the freight rate search request to the target business cluster connected to the target business interface, wherein the target configuration information at least includes: whitelist information of the target business interface, access traffic information of the target business interface, address information of the target business cluster, target implementation class corresponding to the target business interface, target message format corresponding to the target business interface, and effective time of the target business interface; the parameter configuration center component is used to configure different business interfaces and obtain configuration information corresponding to different business interfaces; the service parameter storage component is used to store configuration information corresponding to different business interfaces.

[0078] An embodiment of the present application further provides an electronic device, comprising: a memory storing an executable program; and a processor for running the program, wherein the program executes the methods in various embodiments of the present invention when running.

[0079] An embodiment of the present application further provides a computer-readable storage medium, which includes a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the methods in various embodiments of the present invention.

[0080] An embodiment of the present application further provides a computer program product, including a computer program, which implements the methods in various embodiments of the present invention when executed by a processor.

[0081] An embodiment of the present application further provides a computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium is used to store a computer program, and when the computer program is executed by a processor, the method in each embodiment of the present invention is implemented.

[0082] The embodiments of the present application further provide a computer program, which implements the methods in the above-mentioned embodiments of the present invention when executed by a processor.

[0083] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0084] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0085] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0086] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0087] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.

[0088] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A method for processing a freight rate search request, characterized in that: include: In response to receiving a freight rate search request sent by a client, determining a target service interface corresponding to the freight rate search request from a plurality of service interfaces; Obtain target configuration information corresponding to the target service interface, wherein the target configuration information includes at least: whitelist information of the target service interface, access traffic information of the target service interface, address information of a target service cluster connected to the target service interface, a target implementation class corresponding to the target service interface, a target message format corresponding to the target service interface, and an effective time of the target service interface; The freight rate search request is transparently transmitted to the target business cluster based on the target configuration information.

2. The method according to claim 1, characterized in that Determining a target business interface corresponding to the freight rate search request from a plurality of business interfaces includes: Parsing the freight rate search request to obtain header information of the freight rate search request; Based on the header information, the target service interface is determined.

3. The method according to claim 1, characterized in that Transmitting the freight rate search request to the target service cluster based on the target configuration information includes: Based on the whitelist information, determining whether to allow transparent transmission of the freight rate search request; Determine whether the target service interface is in a valid state based on the valid time; In response to allowing transparent transmission of the freight rate search request and the target service interface being in the effective state, assembling the freight rate search request according to the target message format through the target implementation class to obtain a target message; Based on the address information of the target service cluster, the target message is transparently transmitted to the target service cluster.

4. The method according to claim 3, characterized in that: In response to an exception occurring during the processing of the freight rate search request, the method further includes: Load the exception handling class corresponding to the target business interface; Exception handling is performed through the exception handling class.

5. The method according to any one of claims 1 to 4, characterized in that: In response to not determining the target service interface from the multiple service interfaces, the method further includes: Create a new business interface corresponding to the freight rate search request, and a new implementation class corresponding to the new business interface; The new service interface is configured to generate new configuration information corresponding to the new service interface.

6. The method according to claim 5, characterized in that The method further comprises: Storing the new implementation class in a preset path; The code stored in the preset path is reflectively loaded.

7. A freight rate search interface system, characterized in that: include: The freight rate search interface service component is used to load the implementation classes of different business interfaces, determine the target business interface from the different business interfaces in response to receiving the freight rate search request sent by the client, and transparently transmit the freight rate search request to the target business cluster connected to the target business interface based on the target configuration information corresponding to the target business interface, wherein the target configuration information at least includes: the whitelist information of the target business interface, the access flow information of the target business interface, the address information of the target business cluster, the target implementation class corresponding to the target business interface, the target message format corresponding to the target business interface, and the effective time of the target business interface; A parameter configuration center component, used to configure the different service interfaces and obtain configuration information corresponding to the different service interfaces; Service parameter storage component: used to store the configuration information corresponding to the different service interfaces.

8. An electronic device, characterized in that: include: A memory storing an executable program; A processor, configured to run the program, wherein the program executes the method according to any one of claims 1 to 6 when running.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored executable program, wherein when the executable program is executed, the device where the storage medium is located is controlled to execute the method according to any one of claims 1 to 6.

10. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 6.