[go: up one dir, main page]

CN119829820A - Processing method of freight rate search request, freight rate search interface system and electronic equipment - Google Patents

Processing method of freight rate search request, freight rate search interface system and electronic equipment Download PDF

Info

Publication number
CN119829820A
CN119829820A CN202411873590.9A CN202411873590A CN119829820A CN 119829820 A CN119829820 A CN 119829820A CN 202411873590 A CN202411873590 A CN 202411873590A CN 119829820 A CN119829820 A CN 119829820A
Authority
CN
China
Prior art keywords
target
interface
service
freight rate
rate search
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202411873590.9A
Other languages
Chinese (zh)
Inventor
栾长炜
李婷
李贵娟
翟建波
许洋
张宏海
贾永强
崔斌豪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Travelsky Technology Co Ltd
Original Assignee
China Travelsky Technology Co Ltd
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 China Travelsky Technology Co Ltd filed Critical China Travelsky Technology Co Ltd
Priority to CN202411873590.9A priority Critical patent/CN119829820A/en
Publication of CN119829820A publication Critical patent/CN119829820A/en
Pending legal-status Critical Current

Links

Landscapes

  • Computer And Data Communications (AREA)

Abstract

本发明公开了一种运价搜索请求的处理方法、运价搜索接口系统及电子设备。其中,该方法涉及数据搜索领域,包括:响应于接收到客户端发送的运价搜索请求,从多个业务接口中确定运价搜索请求对应的目标业务接口;获取目标业务接口对应的目标配置信息,其中,目标配置信息至少包括:目标业务接口的白名单信息、目标业务接口的访问流量信息、与目标业务接口连接的目标业务集群的地址信息、目标业务接口对应的目标实现类、目标业务接口对应的目标报文格式、以及目标业务接口的生效时间;基于目标配置信息将运价搜索请求透传至目标业务集群。本发明解决了相关技术中在原有接口不变的情况下,无法快速提供安全、可靠的接口服务的技术问题。

The present invention discloses a method for processing a freight search request, a freight search interface system and an electronic device. The method relates to the field of data search, and includes: in response to receiving a freight search request sent by a client, determining a target business interface corresponding to the freight search request from multiple business interfaces; obtaining 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 a 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; transparently transmitting the freight search request to the target business cluster based on the target configuration information. The present invention solves the technical problem in the related art that a safe and reliable interface service cannot be quickly provided when the original interface remains unchanged.

Description

Processing method of freight rate search request, freight rate search interface system and electronic equipment
Technical Field
The invention relates to the field of data searching, in particular to a processing method of a freight rate search request, a freight rate search interface system and electronic equipment.
Background
Under the requirements of national informatization innovation and domestic software, under the background of the explosive development of global civil aviation industry and the continuous expansion of economic globalization, most countries in the world are promoted to generate one or more airlines and countless airports, and meanwhile, more airlines and corresponding freight rate data thereof and more interior interface services of the airlines are generated, so that more freight rate search interfaces need to provide services to the outside. However, the existing technical scheme has the problem that safe and reliable interface service cannot be provided rapidly under the condition that the original interface is unchanged.
In view of the above problems, no effective solution has been proposed at present.
Disclosure of Invention
The embodiment of the invention provides a processing method of a freight rate search request, a freight rate search interface system and electronic equipment, which at least solve the technical problem that safe and reliable interface service cannot be provided quickly under the condition that the original interface is unchanged in the related art.
According to one aspect of the embodiment of the invention, a processing method of a freight rate search request is provided, which comprises the steps of determining a target service interface corresponding to the freight rate search request from a plurality of service interfaces in response to receiving the freight rate search request sent by a client, obtaining target configuration information corresponding to the target service interface, wherein the target configuration information at least comprises white list information of the target service interface, access flow information of the target service interface, address information of a target service cluster connected with the target service interface, a target realization 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.
Further, determining a target service interface corresponding to the freight rate search request from the plurality of service interfaces comprises analyzing the freight rate search request to obtain header information of the freight rate search request, and determining the target service interface based on the header information.
The method comprises the steps of determining whether to allow the freight rate search request to be transmitted transparently to a target service cluster based on white list information, determining whether a target service interface is in an effective state based on effective time, responding to the permission of the freight rate search request to be transmitted transparently, assembling the freight rate search request according to a target message format through a target implementation class to obtain a target message in the effective state, and transmitting the target message to the target service cluster based on address information of the target service cluster.
Further, the method also comprises the steps of loading an exception handling class corresponding to the target service interface and carrying out exception handling through the exception handling class in response to the exception of the handling process of the freight rate search request.
Further, in response to not determining the target service interface from the plurality of service interfaces, the method further comprises creating a new service interface corresponding to the freight rate search request and a new implementation class corresponding to the new service interface, configuring the new service interface, and generating new configuration information corresponding to the new service interface.
Further, the method comprises the steps of storing the new implementation class into a preset path, and carrying out reflection loading on codes stored in the preset path in the last year.
According to another aspect of the embodiment of the invention, the system comprises a freight rate search interface service component for loading realization classes of different service interfaces, a parameter configuration center component for configuring the different service interfaces to obtain configuration information corresponding to the different service interfaces, and a service parameter storage component for storing the configuration information corresponding to the different service interfaces, wherein the freight rate search interface service component is used for loading realization classes of the different service interfaces, responding to a freight rate search request sent by a client, determining the target service interfaces from the different service interfaces, and transmitting the freight rate search request to the target service clusters connected with the target service interfaces based on target configuration information corresponding to the target service interfaces.
According to another aspect of the embodiment of the invention, there is also provided an electronic device, including a memory storing an executable program, and a processor for running the program, where the program executes the method in each embodiment of the invention.
According to another aspect of the embodiments of the present invention, there is also provided a computer readable storage medium including a stored executable program, where the executable program when run controls a device in which the computer readable storage medium is located to perform the method in the embodiments of the present invention.
According to another aspect of embodiments of the present invention, there is also provided a computer program product comprising a computer program which, when executed by a processor, implements the methods of the various embodiments of the invention.
According to another aspect of embodiments of the present invention, there is also provided a computer program product comprising a non-volatile computer readable storage medium storing a computer program which, when executed by a processor, implements the method in various embodiments of the invention.
According to another aspect of embodiments of the present invention, there is also provided a computer program which, when executed by a processor, implements the methods of the various embodiments of the invention.
In the embodiment of the invention, a target service interface corresponding to the freight rate search request is determined from a plurality of service interfaces by responding to the freight rate search request sent by a client, target configuration information corresponding to the target service interface is acquired, wherein the target configuration information at least comprises white list information of the target service interface, access flow information of the target service interface, address information of a target service cluster connected with the target service interface, a target realization 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 the freight rate search request is transmitted to the target service cluster in a penetrating way based on the target configuration information. It is easy to note that, through the target configuration information, the freight rate search interface system can quickly respond to the freight rate search request of the client, and can flexibly select the most suitable interface from a plurality of service interfaces for data processing. The method and the device avoid delay or error caused by improper interface selection or untimely configuration, and achieve the aim of rapidly providing safe and reliable interface service, thereby realizing the technical effect of rapidly providing safe and reliable interface service based on the original interface, and further solving the technical problem that the prior art cannot rapidly provide safe and reliable interface service under the condition that the original interface is unchanged.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
FIG. 1 is a flow chart of a method of processing a freight rate search request according to an embodiment of the invention;
FIG. 2 is a flow chart of an alternative method of configuring dynamic interface relationships according to an embodiment of the invention;
FIG. 3 is a schematic diagram of an alternative flow data ensemble in accordance with an embodiment of the present invention;
FIG. 4 is a flow chart of an alternative freight rate search interface service method according to an embodiment of the invention;
fig. 5 is a schematic diagram of a freight rate search interface system according to an embodiment of the invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to an embodiment of the present invention, there is provided an embodiment of a method for processing a freight rate search request, it being noted that the steps shown in the flowchart of the drawings may be performed 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 may be performed in an order different from that shown or described herein.
Fig. 1 is a flowchart of a processing method of a freight rate search request according to an embodiment of the present invention, as shown in fig. 1, the method including the steps of:
step S102, in response to receiving the freight rate search request sent by the client, determining a target service interface corresponding to the freight rate search request from a plurality of service interfaces.
The freight rate search request described above may be entered by the user in the search interface of the client for querying the airline fares and bookable seat information within a specific date or date range from the departure place to the destination. The freight rate search request at least comprises departure place information, destination information, passenger information, departure time, arrival time and airline company information. The service interfaces may be interfaces in the software system inside the airline, which are responsible for specific service logic processing, and they are core components of the system functions, and are used to define rules and flows of different service operations, and specifications of communication between internal components of the system and between the system and external systems. The target service interface may be a target service interface corresponding to the freight rate search request.
In an alternative embodiment, in order to solve the problem that in the prior art, under the condition that the original interface is unchanged, safe and reliable interface service cannot be provided quickly, the embodiment of the invention provides a processing method of a freight rate search request. First, in the case of receiving a freight rate search request (hereinafter referred to as a request) sent by a client, a target service interface corresponding to the freight rate search request may be determined from a plurality of service interfaces. For example, the freight rate search request may be parsed first to obtain header information of the freight rate search request, and then the target service interface may be determined based on the header information.
Step S104, obtaining target configuration information corresponding to a target service interface, wherein the target configuration information at least comprises white list information of the target service interface, access flow 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.
The configuration information described above may be set in advance by the technician to ensure that the freight rate search request can be handled correctly, safely, and efficiently. The white list is used for controlling the access authority, and only clients in the white list can access the specific service interface, so that the security of the system is guaranteed, unauthorized access is prevented, and a system administrator is allowed to finely control the clients accessing the interface. The access flow information is used to implement a flow control policy, such as limiting the number of requests over a period of time, to avoid the interface from being overloaded, which would affect performance or service availability. The cluster address information can ensure that the freight rate search request can be routed to the business cluster that actually provides the service, rather than being forwarded to an invalid address with a freewheeling or error. The target implementation class contains specific logic that handles specific service interface requests. By configuring the information acquisition target implementation class, the system can dynamically select and load the correct service processing code, so hard coding can be avoided, and the processing logic for adding a new interface or updating an existing interface becomes more flexible and simple. The target message format information is used for guiding the system how to correctly analyze and generate the message, and ensuring the accuracy and consistency of data transmission. The validation time defines when a certain configuration or service interface comes into effect and when the service is stopped. This is important in system maintenance, upgrades or business adjustments, and can avoid affecting the normal operation of the service at an inappropriate point in time.
In an alternative embodiment, in the case of determining the target service interface, the system may first query the configuration center for configuration information of the target service interface based on the target service interface. Upon querying, relevant information is obtained from the application program interface (App l icat ion Programming I NTERFACE, API) or query language provided by the configuration center. The configuration information obtained from the configuration center may be a structured data object. The system needs to analyze the data object, extract the white list information, the access flow information, the service cluster address information, the realization class information, the message format information, the effective time and the like of the target service interface. And verifying whether the acquired configuration information is complete and valid, such as checking whether all necessary fields are contained, and whether the message format, the validation time and the like meet expectations. And according to the extracted and verified configuration information, the system performs corresponding business logic processing. For example, access control is performed using whitelist information, traffic information is used for throttling, service cluster address information and implementation class information are used for back-end interface call and service processing, and message format information is used for serialization and deserialization of data.
FIG. 2 is a flow chart of an alternative method of configuring dynamic interface relationships, as shown in FIG. 2, according to an embodiment of the invention, the method comprising:
step S21, configuring the relation between a service interface and a pre-compiled code;
step S22, configuring a white list and current limiting information of an interface;
Step S23, configuring a rear-end interface access address;
step S24, whether the configuration is effective or not;
Step S25, configuring a pre-compiled code path.
It should be noted that the implementation mode of the multi-interface service is that the SSA only provides one external service interface (different service interfaces are provided in the SSA pair, each interface has own request parameters and request formats, and the interfaces do not provide services externally), and the unique external interface realizes the configuration and integration of the back-end data interface. The system background pre-provides a series of pre-compiled business realization classes and default realization classes through high-level programming language (Java) codes, and all the business realization classes and default realization classes are pre-loaded when the project is started. The preloaded class is not effective at this time, when external service functions are required to be opened, an interface is dynamically configured through a parameter configuration center to realize pluggable service functions according to the interface and realize heterogeneous service code functions, and the parameter configuration center is used for configuring the following four functions, namely, 1, configuring the association relation between a request header parameter and the precompiled implementation class to enable the preloaded code in the SSA to be effective, 2, configuring the accessible flow of a white list of an accessible interface, a foreground interface (the flow for accessing the external address), the accessible flow of a background interface (the flow for accessing the specific service interface address by the SSA), and configuring the security control of the new interface, 3, configuring the access address of the background service, and 4, configuring whether the interface is effective and effective time.
The flight shopping service interface (Shop SERVICE API, SSA) is a service architecture or interface type designed for specific service scenes, and is mainly applied to freight rate search service of civil aviation industry. The SSA serves to provide a unified, standardized interface through which the front-end application can query for information such as flight fare, seat availability, etc., without directly interacting with the underlying multiple business systems or data sources.
And step S106, the freight rate search request is transmitted to the target service cluster based on the target configuration information.
In an alternative embodiment, under the condition that the target configuration information is acquired, the information configured by the parameter configuration center is stored in a storage, after configuration is effective, SSA does not need to restart items, a transparent transmission function (dynamic plug) of a new interface service is realized through a precompiled implementation class, the new interface service is directly operated on line through a simple test, if the precompiled implementation class and the precompiled default class cannot meet the service function of the new interface, a new interface implementation class (java) is only required to be created under a specified path, SSA automatically completes loading of the new interface implementation class (heterogeneous service class) through java reflection, and meanwhile, the association relation of the 4 items above is configured in the parameter configuration center, so that the realization of the new service interface function is completed.
The data processing flow is as follows, whether an interface is in a transparent white list or not is acquired according to service request header information and SSA parameter information, whether the interface is limited in current or not is acquired, an interface data format is acquired, an interface target cluster address is acquired, the association relation between the interface and a precompiled java service class is acquired, and the precompiled service class (an inlet service implementation class and an outlet service implementation class are acquired according to the interface type) is acquired through java reflection according to access control, so that the transparent transmission function of service functions is realized.
In the embodiment of the invention, a target service interface corresponding to the freight rate search request is determined from a plurality of service interfaces by responding to the freight rate search request sent by a client, target configuration information corresponding to the target service interface is acquired, wherein the target configuration information at least comprises white list information of the target service interface, access flow information of the target service interface, address information of a target service cluster connected with the target service interface, a target realization 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 the freight rate search request is transmitted to the target service cluster in a penetrating way based on the target configuration information. It is easy to note that, through the target configuration information, the system can quickly respond to the freight rate search request of the client, and can flexibly select the most suitable interface from a plurality of service interfaces for data processing. The method and the device avoid delay or error caused by improper interface selection or untimely configuration, and achieve the aim of rapidly providing safe and reliable interface service, thereby realizing the technical effect of rapidly providing safe and reliable interface service based on the original interface, and further solving the technical problem that the prior art cannot rapidly provide safe and reliable interface service under the condition that the original interface is unchanged.
Optionally, determining the target service interface corresponding to the freight rate search request from the plurality of service interfaces comprises analyzing the freight rate search request to obtain header information of the freight rate search request, and determining the target service interface based on the header information.
In an alternative embodiment, java may be used to parse the requested header information. The request header information contains important metadata about the request, such as request type, accepted format, client information, etc., which is critical to determining the service interface. A specific service identification (e.g., a service code or service type) is extracted from the request header. In the freight search service of the civil aviation industry, this may be a specific string or enumerated value that identifies which type of service the request should be processed into. And using the extracted service identifier to query service interface configuration information corresponding to the identifier from the configuration center. This includes whitelist information for the target service interface, access traffic information, service cluster address information, implementation class information, message format information, and validation time, etc. And determining the specific implementation class corresponding to the target service interface according to the queried implementation class information. In Java, this is typically done through a reflection mechanism, i.e., objects are dynamically created and instantiated through class name strings. And verifying whether the queried configuration information is within the validity period, accords with the white list rule, accesses whether the flow is within the allowable range and the like. If the verification is not passed, the system may refuse the request or return an error message. If the configuration information passes verification, the service interface corresponding to the configuration information can be determined to be a target service interface, and the system calls the service cluster at the rear end by using the determined target implementation class at the moment to execute specific freight rate searching service logic. This may involve converting the request parameters into a particular format, invoking a backend service, receiving and processing response data, and so forth.
The method comprises the steps of determining whether to allow the freight rate search request to be transmitted transparently to a target service cluster based on white list information, determining whether a target service interface is in an effective state based on effective time, responding to the permission of the freight rate search request to be transmitted transparently, assembling the freight rate search request according to a target message format through a target implementation class in the effective state to obtain a target message, and transmitting the target message to the target service cluster based on address information of the target service cluster.
In an alternative embodiment, the system may first determine whether to allow transparent transmission of the freight rate search request based on the white list information, determine whether the target service interface is in an effective state based on the effective time, and in the case that it is determined that transparent transmission of the freight rate search request is allowed and the target service interface is in the effective state, the system may assemble the freight rate search request according to the target message format through the target implementation class to obtain the target message, and finally may transparent transmit the target message to the target service cluster based on the address information of the target service cluster.
Optionally, the processing process responding to the freight rate search request is abnormal, and the method further comprises loading an abnormal processing class corresponding to the target service interface and performing abnormal processing through the abnormal processing class.
In an alternative embodiment, in the case that the system has an exception in the processing procedure of the freight rate search request, the system may further load an exception handling class corresponding to the target service interface, and perform exception handling through the exception handling class.
Optionally, in response to not determining the target service interface from the plurality of service interfaces, the method further comprises creating a new service interface corresponding to the freight rate search request and a new implementation class corresponding to the new service interface, configuring the new service interface, and generating new configuration information corresponding to the new service interface.
In an alternative embodiment, in the case that the system does not determine the target service from the multiple service interfaces, the system may further create a new service interface corresponding to the freight rate search request and a new implementation class corresponding to the new service interface, and then the system may configure the new service interface to generate new configuration information corresponding to the new service interface. That is, if the service functions of the new interface cannot be satisfied in the precompiled implementation class and the precompiled default class, only the new interface implementation class (java) needs to be created under the specified path, the SSA automatically completes loading (heterogeneous service class) of the new interface implementation class through java reflection, and meanwhile configures the association relationship of the above 4 items in the parameter configuration center, so as to complete implementation of the new service interface function.
Optionally, the method further comprises the steps of storing the new implementation class into a preset path, and carrying out reflection loading on codes stored in the preset path in the years.
In an alternative embodiment, the system may also store the new implementation class into a preset path, and reflect-load the code stored in the preset path. That is, when the precompiled java processing class cannot meet the existing new service, the java code in the path of the reserved unrealized class is loaded and reserved through java reflection by developing new service processing and putting the new service processing into the path of the reserved unrealized class, and meanwhile, the transparent transmission function of the new service interface is realized through configuring the parameters of the step one.
FIG. 3 is a schematic diagram of an alternative flow data entity according to an embodiment of the present invention, as shown in FIG. 3, a parameter configuration center and a pluggable data storage location, by configuring a pluggable interface relationship communication connection, a freight rate search interface service implementation can obtain pluggable parameters from the pluggable data storage location, and a pluggable data storage location communication connection.
Fig. 4 is a flowchart of an alternative freight rate search interface service method according to an embodiment of the invention. As shown in fig. 4, the method comprises the steps of:
step S41, obtaining a service request;
Step S42, judging whether to configure the parameter relation, if yes, proceeding to step S43, otherwise proceeding to step S45;
Step S43, loading a series of pre-compiled codes (interface class, implementation class, exception handling class and response class) when the project is started, judging whether the pre-compiled codes exist or not, if yes, entering step S44, and if not, entering step S47;
Step S44, judging whether to perform flow control, if yes, proceeding to step S45, otherwise proceeding to step S46;
step S45, heterogeneous service transparent transmission;
step S46, heterogeneous response processing;
step S47, reloading codes on the designated path or the default path, and returning to step S44;
Step S48, ends.
The invention discloses a method for quickly realizing a plurality of interfaces according to parameters in a shipping price searching process, which introduces a method for dynamically configuring interfaces and quickly transmitting services according to precompiled service functions if different service interfaces of a target are acquired through different service request header information, and related parameters of the interfaces are acquired.
And (3) the transmission of the service interface which cannot be completed through a default implementation class, wherein the request message may have an XML format and a JSON format, and the response result of the interface also has the XML format and the JSON format, so that the processing process is different. 2. The message results of the response results of the interfaces are different, no influence exists in default, when the SSA calls the background interface, the reasons such as network and the like possibly exist, the results of the response to the client are generated by the SSA, and different service implementation classes of the SSA need to realize the unable response message body according to different service interfaces. 3. The background interface may have different requirements for the header and body of the message when requested, and different service implementation classes are functions to handle these different requirements.
The system design component comprises 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 (DB) or in-memory Database red is). And the freight rate search interface service assembly (SSA service assembly) is realized through java codes and is responsible for loading service codes, acquiring the association relation between a service interface and the service, analyzing whether each service request is in a white list, judging whether the service type of a request message is correct, judging whether the service request is possibly called through network service, processing the response message format and message information of the service which is not round when abnormal, processing the message response of the normal service, and processing log landing according to the service interface. And the service parameter storage (zookeeper service) is responsible for configuration management of parameters in the freight rate search interface sub-service component (SSA service component), and comprises white list information, interface relation information, a background interface address and background interface parameters, so that the real-time performance and consistency of the parameters in the cluster environment are ensured. The parameter configuration center component is realized through a java code and is responsible for configuring parameters used by the operation price search interface service component, configuring whether java precompiled codes take effect or not, configuring the association relation between the java precompiled codes and service requests, configuring white list information of the requests, requesting address information by background service and configuring flow control information.
The method comprises the following steps of configuring relevant parameters (dynamic configuration) of multiple interfaces in a parameter configuration center, wherein the relevant parameters comprise interface identification, interface white list information, interface realization class names precompiled in SSA, interface abnormal realization class names precompiled in SSA, default realization class names precompiled in SSA, interface request addresses, request message formats (xml/json/other) and interface access flow information. The second step of pre-compiling java codes in SSA service, wherein the pre-compiling java codes comprise pre-compiling interface classes, pre-compiling realization classes, pre-compiling exception classes, pre-compiling response processing classes and pre-compiling default classes, paths of unrealized classes are reserved for expansion (heterogeneous processing) of subsequent services, when an item is started, SSA service components generate service codes through java reflection, parameter information (information configured by a parameter configuration center is currently stored in a zookeeper and can be replaced by a database/red i s and the like) is obtained, and the service codes are related to the relation of the reflection generation realization classes. When a service request is made, judging whether a corresponding parameter exists in the zookeeper, whether the corresponding parameter is effective, whether the parameter is normal and other information exists in the precompiled interface and the realization class, and judging whether the information is limited in the access process, so as to realize the transparent transmission function of the new service interface. And thirdly, when the precompiled java processing class cannot meet the existing new service, the java processing class is put into a path reserved with the unrealized class by developing new service processing, java codes in the path reserved with the unrealized class are loaded by java reflection, and meanwhile, the transparent transmission function of the new service interface is realized by configuring parameters of the step one.
The specific implementation steps comprise:
S1, judging whether a new service interface has special service requirements or not by confirming with service personnel and developers, judging whether the new service interface has the special requirements of 1 whether a request message is not in an xml or json format (the current interface only supports the xml or json format), 2, responding to whether a message body needs a fixed appointed format or not, and 3, judging whether a rear end interface has special message header and message body description or not. If there is no special requirement of the above three aspects, S2 is directly performed, otherwise S2 is performed.
S2, the special service requirement operation step is that a service implementation class (java precompiled code) is created under a specified path according to the special service, and after the project is started, loading of the implementation class (heterogeneous service) is completed through reflection.
And S3, configuring the association relation of the new interface in the service parameter management component, wherein the association relation comprises a white list, a back-end interface IP, flow control information, association relation information of the interface and a precompiled implementation class, interface request header parameters and other related information.
S4, carrying out operation price searching interface service, analyzing service request header information through pre-compiling java function codes, acquiring the association relation between a service interface and an implementation class through a zookeeper, firstly judging whether the association relation exists, judging whether the association relation does not exist directly, judging whether the interface is in a white list service or not, judging whether a special service implementation class exists, judging whether a background interface address exists or not, directly returning when the related verification is not met, carrying out service flow transfer on a request according to the association relation after the verification condition is met, accessing pre-compiled interface information, carrying out flow control, carrying out service operation successfully, and returning service message information through a pre-compiled response interface, and when the service is abnormal due to a network and the like, returning to a client, assembling the service information through the pre-compiled implementation class to a distributed event stream platform (kafka) service, and carrying out grabbing through a flow data statistics interface after all the interface flows.
The invention can develop the function module codes in advance according to the four dimensions of the interface type, the service request type, the service response type and the request parameters, and when the interfaces with the same dimension need to be accessed into the system, the function of the service interface is realized by configuring the corresponding service rules and opening the service authority through two simple operation steps without a series of time-consuming works such as code re-development, code test, server restarting and the like. The application of the service function can be realized quickly, the service can be responded quickly, the development of the zero code is realized, and the software is restarted.
According to another aspect of the embodiment of the invention, there is also provided a freight rate search interface system. Fig. 5 is a schematic diagram of a freight rate search interface system according to an embodiment of the invention. As shown in FIG. 5, 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.
The system comprises a service interface service component, a parameter configuration center component, a service parameter storage component and a service parameter storage component, wherein the service interface service component is used for loading implementation classes of different service interfaces, determining target service interfaces from different service interfaces in response to receiving a service price search request sent by a client, and transmitting the service price search request to a target service cluster connected with the target service interfaces based on target configuration information corresponding to the target service interfaces, wherein the target configuration information at least comprises white list information of the target service interfaces, access flow information of the target service interfaces, address information of the target service cluster, target implementation classes corresponding to the target service interfaces, target message formats corresponding to the target service interfaces and effective time of the target service interfaces, the parameter configuration center component is used for configuring the different service interfaces to obtain configuration information corresponding to the different service interfaces, and the service parameter storage component is used for storing the configuration information corresponding to the different service interfaces.
The embodiment of the application also provides electronic equipment, which comprises a memory and a processor, wherein the memory stores an executable program, and the processor is used for running the program, and the method in each embodiment of the application is executed when the program runs.
Embodiments of the present application also provide a computer-readable storage medium including a stored executable program, wherein the executable program when run controls a device in which the computer-readable storage medium resides to perform the methods of the embodiments of the present application.
Embodiments of the application also provide a computer program product comprising a computer program which, when executed by a processor, implements the methods of the various embodiments of the application.
Embodiments of the present application also provide a computer program product comprising a non-volatile computer readable storage medium for storing a computer program which, when executed by a processor, implements the methods of the various embodiments of the application.
Embodiments of the present application also provide a computer program which, when executed by a processor, implements the methods of the various embodiments of the application described above.
In the foregoing embodiments of the present invention, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed technology may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, for example, may be a logic function division, and may be implemented in another manner, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. The storage medium includes a U disk, a Read-only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, etc. which can store the program code.
The foregoing is merely a preferred embodiment of the present invention and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present invention, which are intended to be comprehended within the scope of the present invention.

Claims (10)

1. A method for processing a freight rate search request, comprising:
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;
Acquiring target configuration information corresponding to the target service interface, wherein the target configuration information at least comprises white list information of the target service interface, access flow 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.
2. The method of claim 1, wherein determining a target service interface corresponding to the freight rate search request from a plurality of service interfaces comprises:
analyzing the freight rate search request to obtain header information of the freight rate search request;
and determining the target service interface based on the header information.
3. The method of claim 1, wherein transparently passing the freight rate search request to the target service cluster based on the target configuration information comprises:
Determining whether to allow transparent transmission of the freight rate search request based on the white list information;
determining whether the target service interface is in an effective state based on the effective time;
responding to the permission of transparent transmission of the freight rate search request, and the target service interface is in the effective state, and assembling the freight rate search request according to the target message format through the target implementation class to obtain a target message;
and transmitting the target message to the target service cluster based on the address information of the target service cluster.
4. A method according to claim 3, wherein an exception occurs in response to processing of the freight rate search request, the method further comprising:
loading an exception handling class corresponding to the target service interface;
and performing exception handling through the exception handling class.
5. The method of any of claims 1-4, wherein in response to the target traffic interface not being determined from the plurality of traffic interfaces, the method further comprises:
creating a new service interface corresponding to the freight rate search request and a new implementation class corresponding to the new service interface;
and configuring the new service interface to generate new configuration information corresponding to the new service interface.
6. The method of claim 5, wherein the method further comprises:
storing the new implementation class into a preset path;
And carrying out reflection loading on the code stored in the preset path in the years.
7. A freight rate search interface system, comprising:
The system comprises a freight rate search interface service component, a freight rate search interface service component and a service management component, wherein the freight rate search interface service component is used for loading implementation classes of different service interfaces, determining a target service interface from the different service interfaces in response to receiving freight rate search requests sent by a client, and transmitting the freight rate search requests to a target service cluster connected with the target service interface based on target configuration information corresponding to the target service interface, wherein the target configuration information at least comprises white list information of the target service interface, access flow information of the target service interface, address information of the target service cluster, target implementation class corresponding to the target service interface, target message format corresponding to the target service interface and effective time of the target service interface;
The parameter configuration center component is used for configuring the different service interfaces to obtain configuration information corresponding to the different service interfaces;
and the service parameter storage component is used for storing configuration information corresponding to the different service interfaces.
8. An electronic device, comprising:
A memory storing an executable program;
A processor for executing the program, wherein the program when run performs the method of any one of claims 1to 6.
9. A computer readable storage medium, characterized in that the computer readable storage medium comprises a stored executable program, wherein the executable program when run controls a device in which the storage medium is located to perform the method of any one of claims 1 to 6.
10. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 6.
CN202411873590.9A 2024-12-18 2024-12-18 Processing method of freight rate search request, freight rate search interface system and electronic equipment Pending CN119829820A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411873590.9A CN119829820A (en) 2024-12-18 2024-12-18 Processing method of freight rate search request, freight rate search interface system and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411873590.9A CN119829820A (en) 2024-12-18 2024-12-18 Processing method of freight rate search request, freight rate search interface system and electronic equipment

Publications (1)

Publication Number Publication Date
CN119829820A true CN119829820A (en) 2025-04-15

Family

ID=95304886

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411873590.9A Pending CN119829820A (en) 2024-12-18 2024-12-18 Processing method of freight rate search request, freight rate search interface system and electronic equipment

Country Status (1)

Country Link
CN (1) CN119829820A (en)

Similar Documents

Publication Publication Date Title
US11087249B2 (en) Method and apparatus for triggering execution of a workflow over a network
US8977845B2 (en) Methods and apparatus for access control in service-oriented computing environments
US20040230667A1 (en) Loosely coupled intellectual capital processing engine
WO2015058216A1 (en) Event-driven data processing system
CN102291464A (en) System and method for dynamically generating Web Service by business flow in BPM (Business Process Management)
US11595299B2 (en) System and method of suppressing inbound payload to an integration flow of an orchestration based application integration
WO2019203785A1 (en) Content management system
US7428756B2 (en) Access control over dynamic intellectual capital content
US20050022208A1 (en) Corba gateway
CN112579461A (en) Assertion processing method, system and storage medium
US20040230982A1 (en) Assembly of business process using intellectual capital processing
US20090210748A1 (en) Methods and systems to test airline information systems
CN112559344A (en) Remote mock testing method and system
US11245701B1 (en) Authorization pre-processing for network-accessible service requests
CN101043648B (en) Business Service Exchange System
CN119829820A (en) Processing method of freight rate search request, freight rate search interface system and electronic equipment
KR101301092B1 (en) Remote customisation module and system comprising said module
CN117992115A (en) System configuration processing method, device, equipment, medium and program product
US20040230567A1 (en) Integrating intellectual capital into an intellectual capital management system
CN118070268A (en) Data authority system model design and application thereof
US12020022B2 (en) In-band instantiation configuration for application workloads
US8353013B2 (en) Authorized application services via an XML message protocol
US20040230691A1 (en) Evolutionary development of intellectual capital in an intellectual capital management system
WO2009105459A2 (en) Methods and systems to test airline information systems
US10108743B2 (en) Methods and systems for simplifying object mapping for user interfaces

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination