WO2019109957A1 - 基于esb的服务提供方法、装置、设备及可读存储介质 - Google Patents

基于esb的服务提供方法、装置、设备及可读存储介质 Download PDF

Info

Publication number
WO2019109957A1
WO2019109957A1 PCT/CN2018/119392 CN2018119392W WO2019109957A1 WO 2019109957 A1 WO2019109957 A1 WO 2019109957A1 CN 2018119392 W CN2018119392 W CN 2018119392W WO 2019109957 A1 WO2019109957 A1 WO 2019109957A1
Authority
WO
WIPO (PCT)
Prior art keywords
service
target
target service
service provider
consumption request
Prior art date
Application number
PCT/CN2018/119392
Other languages
English (en)
French (fr)
Inventor
李天平
Original Assignee
深圳壹账通智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳壹账通智能科技有限公司 filed Critical 深圳壹账通智能科技有限公司
Publication of WO2019109957A1 publication Critical patent/WO2019109957A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management
    • G06Q10/101Collaborative creation, e.g. joint development of products or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/08Logistics, e.g. warehousing, loading or distribution; Inventory or stock management
    • G06Q10/087Inventory or stock management, e.g. order filling, procurement or balancing against orders
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/1066Session management
    • H04L65/1073Registration or de-registration

Definitions

  • the present application relates to the field of operation and maintenance technologies, and in particular, to an ESB-based service providing method, apparatus, device, and readable storage medium.
  • the main purpose of the present application is to provide an ESB-based service providing method, apparatus, device, and readable storage medium, which are intended to implement service integration and improve service capabilities of a business system.
  • the present application provides an ESB-based service providing method, where the service providing method includes the following steps:
  • the service provider Upon receiving the access request sent by the service provider, the service provider accesses the enterprise service bus ESB, and saves the service information corresponding to the service provider to a database that is connected to the ESB, where Service information includes service paths and service items;
  • the present application further provides an ESB-based service providing apparatus, where the service providing apparatus includes:
  • a service access module configured to: when receiving an access request sent by the service provider, access the service provider to the enterprise service bus ESB, and save the service information corresponding to the service provider to the ESB a docked database, wherein the service information includes a service path and a service item;
  • a request receiving module configured to determine, according to the consumption request, a corresponding target service item when receiving the consumption request sent by the service consumer, and query the target service information corresponding to the target service item in the database;
  • a service providing module configured to acquire a target service path of the corresponding target service provider according to the target service information, and send the consumption request to the target service provider according to the target service path, so that the target service is The provider provides services in accordance with the consumption request.
  • the present application further provides an ESB-based service providing device, including a processor, a memory, and a computer readable and executable by the processor and executable by the processor An instruction, wherein the computer readable instructions are executed by the processor, implements the steps of the service providing method described above.
  • the present application further provides a readable storage medium having computer readable instructions stored thereon, wherein the computer readable instructions are executed by a processor to implement a service as described above Provide steps for the method.
  • this application integrates a previously isolated business system (service provider) in a loosely coupled manner to build a unified service delivery system.
  • service provider business system
  • Discovery and communication improve the calling efficiency and service provisioning capability of each business system.
  • various protocols and tool libraries can be integrated in a standardized manner through the ESB, so that each business system can concentrate.
  • the large-scale business is decomposed into micro-services to improve the development efficiency and comprehensive service capabilities of the business system.
  • FIG. 1 is a schematic structural diagram of an ESB-based service providing device involved in an embodiment of the present application
  • FIG. 2 is a schematic flowchart of a first embodiment of an ESB-based service providing method according to the present application
  • FIG. 3 is a service topology diagram of a first embodiment of an ESB-based service providing method according to the present application
  • FIG. 4 is the same as FIG. 2, when receiving an access request sent by a service provider, accessing the service provider to an enterprise service bus ESB, and saving service information corresponding to the service provider to the ESB a docked database, wherein the service information includes a detailed process flow diagram of service paths and service items;
  • FIG. 5 is a schematic diagram of the target service item determined according to the consumption request when the consumption request sent by the service consumer is received, and the target service information corresponding to the target service item is queried in the database. Schematic diagram of the process;
  • FIG. 6 is a schematic diagram of the target service item determined according to the consumption request when the consumption request sent by the service consumer is received, and the target service information corresponding to the target service item is queried in the database. Schematic diagram of the process;
  • FIG. 7 is a schematic flowchart diagram of a second embodiment of an ESB-based service providing method according to the present application
  • FIG. 8 is a schematic diagram of functional modules of a first embodiment of an ESB-based service providing apparatus according to the present application.
  • the ESB-based service providing method embodiment of the present application is implemented by an ESB-based service providing device, and the physical implementation of the server providing device may be a PC, or may be a mobile phone, a tablet computer, a portable computer, or the like having a display function. Terminal equipment.
  • FIG. 1 is a schematic structural diagram of an ESB-based service providing device involved in an embodiment of the present application.
  • the service providing device may include a processor 1001 (for example, a CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005.
  • the communication bus 1002 is configured to implement connection communication between the components;
  • the user interface 1003 may include a display, an input unit such as a keyboard;
  • the network interface 1004 may optionally include a standard wired interface and a wireless interface. (such as WI-FI interface);
  • memory 1005 can be high-speed RAM memory or stable memory (non-volatile Alternatively, the memory 1005 may alternatively be a storage device independent of the processor 1001 described above.
  • FIG. 1 does not constitute a limitation to the present application, and may include more or less components than those illustrated, or some components may be combined, or different component arrangements.
  • memory 1005 which is a computer readable storage medium, can include an operating system, a network communication module, and computer readable instructions.
  • the network communication module is mainly used to connect to a database and perform data communication with the database; and the processor 1001 can call the computer readable instructions stored in the memory 1005 and execute the ESB-based service providing method provided by the embodiment of the present application. .
  • the application provides an ESB-based service providing method.
  • FIG. 2 is a schematic flowchart diagram of a first embodiment of an ESB-based service providing method according to the present application.
  • the service providing method includes the following steps:
  • Step S10 When receiving the access request sent by the service provider, the service provider accesses the enterprise service bus ESB, and saves the service information corresponding to the service provider to the database that is connected to the ESB.
  • the service information includes a service path and a service item;
  • This embodiment proposes to integrate multiple isolated service subsystems (Services) in a loosely coupled manner based on the ESB (framework) to construct a unified service providing system.
  • Coupling can be understood as a measure of the degree of association between modules (or different systems), or as a dependency between modules, including control relationships, call relationships, and data transfer relationships. The more connections between modules, the more coupled they are. Strong (tight), at the same time, indicating that the independence is worse, for example, the stronger the coupling between A and B, the greater the impact of B when there is an abnormality in A; there are a large number of interface services directly called between various business systems.
  • This call relationship is logically presented as a complex mesh network connection; the interface service mesh network connection causes management and maintenance problems (ie, the above-mentioned strong coupling); and loose coupling means that the mutual dependence is small. Or they rely on a third party (instead of directly contacting each other), which in this embodiment is an ESB.
  • the ESB is the service backbone of the entire system, connecting various distributed business (heterogeneous) systems, passing data messages between the various systems, and past peer-to-peer
  • the interface relationship becomes a point-to-bus relationship.
  • service registration needs to be performed to the management system of the ESB; and for the management system, for the convenience of management thereof
  • the service provider will be required to provide relevant service information at the time of registration, including the host name, port number, service items, and other additional parameters of the service provider. Therefore, the service provider sends an access request to the management system, and the access request includes related service information.
  • the management system registers the service provider according to the service information in the access request.
  • the management system will access the service provider to the ESB, and save the service information corresponding to the service provider to the database connected to the ESB for query and service by other parties in the ESB or the external system. transfer.
  • the management system further provides a visual management interface, which is convenient for the management personnel to view and manage the accessed service provider.
  • the service provider that has accessed the ESB can be displayed in the form of a service topology diagram, as shown in FIG. 3; wherein the nodes of the topology (points A, B, and C in FIG. 3) represent the service provider.
  • the visual management interface can also display related service parameters (such as service online time, total online duration, port number, etc.).
  • Step S20 when receiving the consumption request sent by the service consumer, determining a corresponding target service item according to the consumption request, and querying, in the database, the target service information corresponding to the target service item;
  • the service provider accesses the ESB
  • the service can be provided based on the ESB.
  • the service consumer can directly send a consumption request to the ESB management system to apply for calling a service in the ESB (which can be called a target service).
  • the management system Upon receiving the consumption request, the management system will read the content in the consumption request and determine the target service item corresponding to the consumption request (ie, determine which service in the ESB needs to be invoked by the service consumer).
  • the query can be performed in the database to match the corresponding target service information.
  • Step S30 Acquire a target service path corresponding to the target service provider according to the target service information, and send the consumption request to the target service provider according to the target service path, so that the target service provider is based on the target service provider.
  • the consumption request provides a service.
  • the management system may acquire the target service path of the target service provider according to the target service information, and then send the consumption request to the target service provider according to the target service path.
  • the target service provider can process the consumption request to provide services to the service consumer.
  • the service consumer in this embodiment, it may be an external system or a service provider that has been accessed in the ESB.
  • the service provider in the ESB in some business processes, is Other services in the ESB can be invoked as a service consumer, so that each service in the ESB can discover each other and communicate with each other, thereby improving the service capability between the components.
  • the service provider it may be provided by a distributed hardware architecture; in this case, when the management system records the service information of the service provider, the service path may include Multiple. In order to achieve a balanced load, a plurality of corresponding message queues may be set for the distributed service provider, and when a new consumption request is received, the new consumption request is allocated according to the number of pending messages of each message queue. To balance the business pressure of different service devices. For example, for the service provider X, it has three service devices, namely, device A, device B, and device C. For this, the management system separately sets three message queues, which are queue a, queue b, and queue.
  • queue a corresponds to device A
  • queue b corresponds to device B
  • queue c corresponds to device C
  • the management system when the management system receives the consumption request of the target service provider for X, it queries the service information of the target service provider X, according to The service information indicates that the service provider X has three service devices and three corresponding message queues. In this case, the number of pending messages in the three message queues can be queried. After the query, it is known that there are 4 pending messages in the queue a. There are two pending messages in queue b, and there are three pending messages in queue c.
  • the management system can insert the consumption request into queue b to implement load balancing.
  • the manner in which the consumption request is allocated may also be defined by the administrator.
  • the examples in this embodiment do not constitute a limitation on the technical solution of the present application.
  • the service provider can set up a message queue for the service provider.
  • the management system needs to send a consumption request to the service provider that needs to return the service result, it only needs to insert the consumption request into the message queue, and can return to process other matters without waiting for the service provider's service result.
  • the management system calls back a method to obtain the service result, thereby implementing asynchronous processing, improving the business processing capability and processing efficiency of the management system.
  • the service provider when receiving the access request sent by the service provider, the service provider is connected to the enterprise service bus ESB, and the service information corresponding to the service provider is saved to be connected to the ESB.
  • the service information includes a service path and a service item; when receiving a consumption request sent by the service consumer, determining a corresponding target service item according to the consumption request, and querying the target service in the ESB Target service information corresponding to the item; acquiring a target service path corresponding to the target service provider according to the target service information, and transmitting the consumption request to the target service provider according to the target service path, so that the target The service provider provides services in accordance with the consumption request.
  • the present embodiment integrates a previously isolated service system (service provider) in a loosely coupled manner to construct a unified service providing system, and each service system ( Components) and the ability to discover and communicate with each other, improve the calling efficiency and service provisioning capability of each business system; and because each business system communicates and calls through the ESB, various protocols and tool libraries can be integrated in a standardized manner through the ESB.
  • service provider Service provider
  • Each business system can focus on the development and management of business logic, decompose large-scale business into micro-services, and improve the development efficiency and comprehensive service capabilities of business systems.
  • FIG. 4 is the same as FIG. 2, when receiving an access request sent by a service provider, accessing the service provider to an enterprise service bus ESB, and saving service information corresponding to the service provider to A database that interfaces with the ESB, wherein the service information includes a refinement flow diagram of service paths and service items.
  • step S10 includes:
  • Step S11 when receiving the access request sent by the service provider, verifying the service qualification of the service provider according to the access request;
  • Step S12 When the service qualification passes the verification, the service provider is accessed by the service provider, and the service information corresponding to the service provider is saved to a database that is connected to the ESB, where the service information is Includes service paths and service items.
  • the service provider can provide services for the service consumer after accessing the ESB.
  • the service provider In order to ensure the reliability and security of the service provided by the service provider, the service provider must first service the service before accessing the ESB. The provider's service qualification is verified to determine that it is trustworthy. Specifically, before the service provider accesses the ESB, the service provider sends an access request to the management system, where the access request includes the host name, port number, and service item of the service provider.
  • the management system When receiving the access request, the management system first queries according to the host name and port number to determine whether the identity of the service provider is real; if the host name and service provider are queried according to the port number If the information provided is consistent, the management system will send test information (or test message, test request) to the service provider according to the service item, and then receive the test result returned by the service provider, and judge the service according to the test information and the test result. Whether the service provided by the provider is consistent with the service item in the access request; if it is consistent, the service information provided by the service provider is considered to be authentic, and the reliability and security of the service provider are obtained at this time. It was confirmed that the service provider's service qualification was verified.
  • the verification of the service qualification may also include other aspects of the verification and verification, such as the communication protocol, the data transmission format, and the like.
  • the management system When the service provider's service qualification is verified, the management system will register the service provider according to the service information in the access request. When the registration is completed, the management system will access the service provider to the ESB, and save the service information corresponding to the service provider to the ESB database for query and service call by other parties in the ESB or the external system.
  • FIG. 5 is a method for determining, according to the consumption request, a corresponding target service item according to the consumption request when receiving a consumption request sent by a service consumer, and querying a target corresponding to the target service item in the database.
  • Schematic diagram of the detailed process of service information is a method for determining, according to the consumption request, a corresponding target service item according to the consumption request when receiving a consumption request sent by a service consumer, and querying a target corresponding to the target service item in the database.
  • step S20 includes:
  • Step S21 when receiving the consumption request sent by the service consumer, verifying the consumption qualification of the service consumer according to the consumption request;
  • step S22 when the consumption qualification passes the verification, the corresponding target service item is determined according to the consumption request, and the target service information corresponding to the target service item is queried in the database.
  • multiple service providers are accessed in the ESB to provide services to the service consumer.
  • data interaction is inevitably involved, and the interaction data may involve private data (or secret data).
  • the service provider's service qualification should be verified first to determine that it is trustworthy and avoid An illegal third party attacks the system or steals data in the ESB.
  • the consumption request includes information such as its own consumption host name, consumption port number, and request service item.
  • the management system When receiving the consumption request, the management system queries according to the host name and port number to determine whether the identity of the service consumer is real; if the identity of the service consumer actually exists, the service is considered The service information provided by the consumer is authentic, and the identity of the service consumer is confirmed at this time, and the consumption qualification of the service consumer has been verified. It should be noted that, in this embodiment, only the identity (address) of the service consumer is confirmed. If the service consumer is detected to have attacked the system or data is stolen, it may be taken according to the identity and address of the service consumer. Corresponding measures (such as IP forbidden access, port forbidden access, etc.); of course, in the specific implementation, the verification and verification of other aspects may be included in the verification process of consumption qualification.
  • the management system determines the target service implementation corresponding to the consumption request according to the requested service item in the consumption request (ie, determines which service in the ESB needs to be invoked by the service consumer).
  • the query may be performed in the database to match the corresponding target service information, and the target service path of the corresponding target service provider is obtained according to the target service information, so as to pass the target The service path sends the consumption request to the corresponding target service provider.
  • FIG. 6 is a schematic diagram of the target service item determined according to the consumption request when the consumption request sent by the service consumer is received, and the target corresponding to the target service item is queried in the database. Schematic diagram of the detailed process of service information.
  • step S20 further includes:
  • Step S23 when receiving the consumption request sent by the service consumer, parsing the message header of the consumption request, and determining a target service item corresponding to the consumption request;
  • Step S24 Query the corresponding target service information in the database according to the target service item.
  • the consumption request sent by the service consumer includes the target service information
  • the management system needs to parse the consumption request first, and the content in the consumption request is read (the target service information) And determining the target service item corresponding to the consumption request according to the content.
  • the message format of the consumption request may be limited, and the service consumer is required to place the target service information in the message header of the consumption request; in this case, management
  • the system can directly access the message header and parse it, so that the entire consumption request is not processed, and the efficiency of the analysis is improved.
  • the target service item corresponding to the message request may be determined according to the target service information therein, and the corresponding target service information is queried in the ESB according to the target service item.
  • the service consumer may be an external visitor (outside system) or a service provider in the ESB, and may have different system architectures and communication protocols for different service consumers, in order to ensure that the service consumers send
  • the consumption request can be transmitted quickly and accurately in the ESB system.
  • the consumption request can be pre-processed, the consumption request is serialized, and then parsed and forwarded; wherein, the serialization processing is performed. Is the process of converting an object into a sequence of bytes.
  • the ESB system of this embodiment may set the XML (Extensible Markup Language) format as the default transport format of the consuming request; upon receiving the consuming request sent by the service consuming party, the entity object of the consuming request is first serialized into The XML format, in which the message header (packet header) of the serialized consumption request includes target service information, of course, the message header may also include other information, such as the consumer's consumption host, port number, and the like. Taking a Java class consumption request as an example, serialization of Java class consumption requests can be done through JDK (Java).
  • JDK Java
  • the attribute information of the object is written into the serialization stream in the order of the basic data type to the java object type, and the java object type
  • the property will begin to recursively output until the properties of the java object type no longer exist; then the object can be converted to a streamed xml and output via the conversion class that comes with the JDK.
  • the message header is parsed, the target service item corresponding to the message request is determined according to the target service information therein, and the corresponding target service information is queried in the database according to the target service item.
  • the target service information therein can be represented by a specific string instead of a complete service description message.
  • the service item in the service information may be encoded, for example, the corresponding code of the service item A is a, and the corresponding code of the service item B is b; the service consumer is in need
  • the target service information in the consumption request can be represented by the code a, and it is not necessary to completely add the specific service description of the service item A, thereby reducing the data amount of the consumption request, and also facilitating the serialization and parsing of the management system. , improve request processing efficiency and response speed.
  • FIG. 7 is a schematic flowchart diagram of a second embodiment of an ESB-based service providing method according to the present application.
  • the method further includes:
  • Step S40 If the service result information returned by the target service provider is received within a preset time, the service result information is returned to the service consumer;
  • Step S50 If the service result information returned by the target service provider is not received within a preset time, the target service provider is marked as an abnormal state, and the alarm is performed in a preset manner.
  • the consumption path may be added to the consumption request.
  • the timing will start; if the service result information returned by the target service provider is received within the preset time, the management system will use the service result information according to the consumption path in the consumption request. Return to the corresponding service consumer for the service consumer to perform subsequent processing according to the service result information. If the management system does not receive the service result information returned by the target service provider within the preset time, the processing of the target service provider is considered abnormal, and the management system marks the target service party as an abnormal state, and The alarm is triggered in a preset manner.
  • the manner of the alarm can be set according to the specific situation. For example, different service items can be set to two levels: high and normal; when the service provider of the general level service item is abnormal, the corresponding visual management interface of the management system is corresponding. When the service provider of the high-level service item is abnormal, the corresponding topology node of the visual management interface will flash in the blinking manner, and the corresponding voice alarm information will be sent. Remind the manager.
  • the alarm can be set in other different ways.
  • the management system disables the service according to the target service path of the target service provider, and does not process the information sent by the target service provider in reverse, thereby avoiding abnormal target service provision.
  • the party interferes with other service providers in the ESB.
  • the information of the service provided by the abnormal target service provider may be suspended in the database, and the other consumer requester may continue to request the abnormal target service provider to provide the service, and then restart the service when the abnormal target service party returns to normal.
  • the present application also provides an ESB-based service providing apparatus.
  • FIG. 8 is a schematic diagram of functional modules of a first embodiment of an ESB-based service providing apparatus according to the present application.
  • the service providing apparatus includes:
  • the service access module 10 is configured to: when receiving the access request sent by the service provider, access the service provider to the enterprise service bus ESB, and save the service information corresponding to the service provider to the An ESB docked database, wherein the service information includes a service path and a service item;
  • the request receiving module 20 is configured to: when receiving the consumption request sent by the service consumer, determine a corresponding target service item according to the consumption request, and query the database for the target service information corresponding to the target service item;
  • the service providing module 30 is configured to acquire a target service path of the corresponding target service provider according to the target service information, and send the consumption request to the target service provider according to the target service path, so that the target The service provider provides services in accordance with the consumption request.
  • the virtual function modules of the ESB-based service providing apparatus are stored in the memory 1005 of the ESB-based service providing apparatus shown in FIG. 1 for implementing all functions of the computer readable instructions; when each module is executed by the processor 1001 It can realize the function of mutual discovery and communication between various business systems (components).
  • the service access module 10 includes:
  • a first verification unit configured to: when receiving the access request sent by the service provider, verify the service qualification of the service provider according to the access request;
  • a service access unit configured to: when the service qualification passes the verification, access the service provider to the ESB, and save the service information corresponding to the service provider to a database that is connected to the ESB, where
  • the service information includes a service path and a service item.
  • the request receiving module 20 includes:
  • a second verification unit configured to: when receiving the consumption request sent by the service consumer, verify the consumption qualification of the service consumer according to the consumption request;
  • the first query unit is configured to determine, according to the consumption request, a corresponding target service item when the consumption qualification passes the verification, and query the target service information corresponding to the target service item in the database.
  • the request receiving module 20 includes:
  • a message parsing unit configured to parse a message header of the consumption request, and determine a target service item corresponding to the consumption request, when receiving a consumption request sent by a service consumer;
  • a second querying unit configured to query, in the database, corresponding target service information according to the target service item.
  • the message parsing unit is further configured to, when receiving the consumption request sent by the service consumer, recursively output the class description information in the consumption request and the actual data value of the object domain according to a preset rule, and The class description information and the object domain actual data value are written into the serialization stream; the preset conversion class tool is invoked to convert the serialization stream to obtain a serialization request; and the message header of the serialized consumption request is parsed to determine The target service item corresponding to the consumption request.
  • the service providing apparatus further includes:
  • An information returning module configured to return the service result information to the service consumer if the service result information returned by the target service provider is received within a preset time
  • the abnormality alarm module is configured to: if the service result information returned by the target service provider is not received within a preset time, mark the target service provider as an abnormal state, and perform an alarm in a preset manner.
  • the service providing apparatus further includes:
  • a service suspension module configured to disable service of the target service provider according to the target service path, and issue target service suspension information in the database.
  • the present application also provides a readable storage medium, which may be a non-volatile readable storage medium.
  • the computer readable instructions are stored on the readable storage medium of the present application, wherein when the computer readable instructions are executed by the processor, the steps of the ESB based service providing method as described above are implemented.
  • the technical solution of the present application which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM as described above). , a disk, an optical disk, including a number of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods described in the various embodiments of the present application.
  • a terminal device which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Human Resources & Organizations (AREA)
  • Entrepreneurship & Innovation (AREA)
  • General Business, Economics & Management (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • Operations Research (AREA)
  • General Physics & Mathematics (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Marketing (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Data Mining & Analysis (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Development Economics (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

一种基于企业服务总线ESB的服务提供方法、服务提供装置、设备和可读存储机制,涉及运维技术领域。该方法包括:在接收到服务提供方发送的接入请求时,将服务提供方接入企业服务总线ESB,并将对应的服务信息保存至ESB的数据库(S10);在接收到服务消费方发送的消费请求时,确定对应的目标服务事项,并在所述数据库中查询对应的目标服务信息(S20);根据所述目标服务信息获取目标服务路径,并将所述消费请求发送至目标服务提供方,以提供服务(S30)。该方法基于ESB框架构建统一的服务提供***,各业务***能够相互发现与通信,提高了各个业务***的调用效率和服务提供能力。

Description

基于ESB的服务提供方法、装置、设备及可读存储介质
本申请要求于2017年12月8日提交中国专利局、申请号为201711292797.7、发明名称为“基于ESB的服务提供方法、装置、设备及可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及运维技术领域,尤其涉及一种基于ESB的服务提供方法、装置、设备及可读存储介质。
背景技术
随着互联网技术飞速应用与发展,企业网络中提供的服务呈现多样化的趋势。这些服务往往是靠多个独立的子***进行提供,随着业务模型的历史沿革与版本交叉,当已开发和线上***需要进行整合时,容易造成严重的调用约定分歧,使各个子***间各自为政、相互依赖,从而使整个***形成强烈的依赖循环与资源互锁,这对服务的管理者及使用者而言,将极大的提高***的维护成本,并降低***的扩展性与可靠性。同时,由于各子***之间未形成有机的、共同遵守的服务与调度约定,在需要向其它子***或外界提供服务时,各子***间将形成无法逾越的协议鸿沟,对整个***的综合服务能力产生严重的不利影响,降低了服务的效率。
发明内容
本申请的主要目的在于提供一种基于ESB的服务提供方法、装置、设备及可读存储介质,旨在实现服务整合,提高业务***的服务能力。
为实现上述目的,本申请提供一种基于ESB的服务提供方法,所述服务提供方法包括以下步骤:
在接收到服务提供方发送的接入请求时,将所述服务提供方接入企业服务总线ESB,并将所述服务提供方对应的服务信息保存至与所述ESB对接的数据库,其中所述服务信息包括服务路径和服务事项;
在接收到服务消费方发送的消费请求时,根据所述消费请求确定对应的目标服务事项,并在所述数据库中查询所述目标服务事项对应的目标服务信息;
根据所述目标服务信息获取对应目标服务提供方的目标服务路径,并根据所述目标服务路径将所述消费请求发送至所述目标服务提供方,以使所述目标服务提供方根据所述消费请求提供服务。
此外,为实现上述目的,本申请还提供一种基于ESB的服务提供装置,所述服务提供装置包括:
服务接入模块,用于在接收到服务提供方发送的接入请求时,将所述服务提供方接入企业服务总线ESB,并将所述服务提供方对应的服务信息保存至与所述ESB对接的数据库,其中所述服务信息包括服务路径和服务事项;
请求接收模块,用于在接收到服务消费方发送的消费请求时,根据所述消费请求确定对应的目标服务事项,并在所述数据库中查询所述目标服务事项对应的目标服务信息;
服务提供模块,用于根据所述目标服务信息获取对应目标服务提供方的目标服务路径,并根据所述目标服务路径将所述消费请求发送至所述目标服务提供方,以使所述目标服务提供方根据所述消费请求提供服务。
此外,为实现上述目的,本申请还提供一种基于ESB的服务提供设备,所述服务提供设备包括处理器、存储器、以及存储在所述存储器上并可被所述处理器执行的计算机可读指令,其中所述计算机可读指令被所述处理器执行时,实现上述的服务提供方法的步骤。
此外,为实现上述目的,本申请还提供一种可读存储介质,所述可读存储介质上存储有计算机可读指令,其中所述计算机可读指令被处理器执行时,实现如上述的服务提供方法的步骤。
本申请基于ESB(企业服务总线)框架,以松耦合的方式,把以前一个个孤立的业务***(服务提供方)整合起来,构建一个统一的服务提供***,各业务***(组件)并能够相互发现与通信,提高了各个业务***的调用效率和服务提供能力;同时由于各业务***通过ESB进行通信和调用,可通过ESB以标准化的方式集成各种协议和工具库,使得各业务***能专注于业务逻辑的开发和管理,将大粒度的业务向微服务分解,提升业务***的开发效率和综合服务能力。
附图说明
图1是本申请实施例方案涉及的基于ESB的服务提供设备的结构示意图;
图2为本申请基于ESB的服务提供方法第一实施例的流程示意图;
图3为本申请基于ESB的服务提供方法第一实施例涉及的服务拓扑图;
图4为图2所述在接收到服务提供方发送的接入请求时,将所述服务提供方接入企业服务总线ESB,并将所述服务提供方对应的服务信息保存至与所述ESB对接的数据库,其中所述服务信息包括服务路径和服务事项的细化流程示意图;
图5为图2所述在接收到服务消费方发送的消费请求时,根据所述消费请求确定对应的目标服务事项,并在所述数据库中查询所述目标服务事项对应的目标服务信息的细化流程示意图;
图6为图2所述在接收到服务消费方发送的消费请求时,根据所述消费请求确定对应的目标服务事项,并在所述数据库中查询所述目标服务事项对应的目标服务信息的细化流程示意图;
图7为本申请基于ESB的服务提供方法第二实施例的流程示意图
图8为本申请基于ESB的服务提供装置第一实施例的功能模块示意图。
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请基于ESB的服务提供方法实施例是由基于ESB的服务提供设备实现的,该服务器提供设备的物理实现可以是PC,也可以是智能手机、平板电脑、便携计算机等具有显示功能的可移动式终端设备。
如图1所示,图1是本申请实施例方案涉及的基于ESB的服务提供设备的结构示意图。本申请实施例中,该服务提供设备可以包括处理器1001(例如CPU),通信总线1002,用户接口1003,网络接口1004,存储器1005。其中,通信总线1002用于实现这些组件之间的连接通信;用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard);网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口);存储器1005可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器,存储器1005可选的还可以是独立于前述处理器1001的存储装置。
本领域技术人员可以理解,图1中示出的硬件结构并不构成对本申请的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
继续参照图1,图1中作为一种计算机可读存储介质的存储器1005可以包括操作***、网络通信模块以及计算机可读指令。
在图1中,网络通信模块主要用于连接数据库,与数据库进行数据通信;而处理器1001可以调用存储器1005中存储的计算机可读指令,并执行本申请实施例提供的基于ESB的服务提供方法。
本申请提供一种基于ESB的服务提供方法。
参照图2,图2为本申请基于ESB的服务提供方法第一实施例的流程示意图。
本实施例中,所述服务提供方法包括以下步骤:
步骤S10,在接收到服务提供方发送的接入请求时,将所述服务提供方接入企业服务总线ESB,并将所述服务提供方对应的服务信息保存至与所述ESB对接的数据库,其中所述服务信息包括服务路径和服务事项;
本实施例提出基于ESB(框架)、以松耦合的方式将多个孤立的服务子***(Service)整合起来,构建成一个统一的服务提供***。其中,耦合性可以理解成模块(或不同***)间关联程度的度量,或者理解成模块之间的依赖关系,包括控制关系、调用关系、数据传递关系;模块间联系越多,其耦合性越强(紧),同时表明其独立性越差,例如A和B的耦合性越强,在A出现异常时,B受到的影响越大;传统的各业务***间存在大量的接口服务直接调用,这种调用关系在逻辑上呈现为复杂的网状网连接;接口服务网状网连接造成了管理维护上的问题(即上述强耦合);而松耦合是则指彼此相互之间的依赖很小,或者他们共同依赖第三方(而不是互相直接联系调用),在本实施例中这个第三方即为ESB。ESB作为***的一个重要部分(甚至是整个结构的核心),它是整个***的服务中枢,其连接各个分布式的业务(异构)***,在各个***间传递数据消息,将过去的点对点的接口关系变成点对总线的关系。
具体的,本实施例中,在各业务子***(后称为“服务提供方”)接入ESB前,需要在向ESB的管理***进行服务注册;而对于管理***而言,为了方便其管理,将要求服务提供方在注册时提供有关的服务信息,包含服务提供方的主机名、端口号、服务事项、其它额外参数等。因此,服务提供方会向管理***发送接入请求,该接入请求中包括了相关的服务信息。管理***在接收到该接入请求时,即根据该接入请求中的服务信息对服务提供方进行注册备案。在注册完成时,管理***会将服务提供方接入到ESB,并将服务提供方对应的服务信息保存至与ESB对接的数据库中,以供ESB中的其它方或是外界***进行查询与服务调用。
进一步的,本实施例中,管理***还提供有可视化管理界面,方便管理人员对接入的服务提供方进行查看和管理。该可视化管理界面中可以服务拓扑图的形式显示已接入ESB的服务提供方,如图3所示;其中,拓扑的节点(如图3中的A、B、C点)代表了服务提供方;当某个服务提供方接入ESB(业务***上线时),对应的节点和服务线路将被点亮。当然,可视化管理界面中还可以显示相关的服务参数(如服务上线时间、上线总时长、端口号等)。
步骤S20,在接收到服务消费方发送的消费请求时,根据所述消费请求确定对应的目标服务事项,并在所述数据库中查询所述目标服务事项对应的目标服务信息;
本实施例中,服务提供方在接入到ESB时,即可基于ESB提供服务了。当服务消费方需要调用某个服务时,可直接向ESB的管理***发送消费请求,以申请调用ESB中的某个服务(可称为目标服务)。管理***在接收到该消费请求时,将会读取该消费请求中的内容,并确定该消费请求对应的目标服务事项(即确定服务消费方是需要调用ESB中的什么服务)。在确定服务消费方的目标服务事项时,即可在数据库中进行查询,以匹配到对应的目标服务信息。
步骤S30,根据所述目标服务信息获取对应目标服务提供方的目标服务路径,并根据所述目标服务路径将所述消费请求发送至所述目标服务提供方,以使所述目标服务提供方根据所述消费请求提供服务。
本实施例中,在数据库中查询匹配到对应的目标服务信息时,即可根据目标服务信息中的内容确定目标服务是由哪一个服务提供方提供的。此时,管理***可根据目标服务信息获取到目标服务提供方的目标服务路径,然后根据该目标服务路径将消费请求发送到目标服务提供方。目标服务提供方在接收到该消费请求时,即可对该消费请求进行处理,为服务消费方提供服务。
进一步的,对于本实施例中的服务消费方,可以是外界***,也可以是ESB中已接入的服务提供方,换而言之,ESB中的服务提供方,在某些业务流程,是可以作为服务消费方调用ESB中的其它服务,从而使得ESB中的各个服务可以相互发现、相互通信调用,提高了各个组件之间的服务能力。
再进一步的,对于服务提供方而言,其可能是采用分布式的硬件架构进行服务提供的;在这样的情况下,管理***在对服务提供方的服务信息进行记录时,其服务路径可以包括多个。而为了实现均衡负载,还可以为该分布式的服务提供方设置多个对应的消息队列,在接收到新的消费请求时,根据各消息队列的待处理消息数来分配该新的消费请求,以平衡不同的服务设备的业务压力。例如,对于服务提供方X,其具有3个服务设备,分别为设备A、设备B、设备C;对此,管理***为其分别设置了3条消息队列,分别为队列a、队列b、队列c;其中队列a对应设备A,队列b对应设备B,队列c对应设备C;当管理***接收到目标服务提供方为X的消费请求时,会查询到目标服务提供方X的服务信息,根据该服务信息可知服务提供方X具有3个服务设备和3条对应的消息队列;此时可对3条消息队列中的待处理消息数进行查询,查询后获知队列a中有4条待处理消息,队列b中有2条待处理消息,队列c中有3条待处理消息,则管理***可将该消费请求***到队列b中,从而实现负载均衡。当然,消费请求的分配方式还可以是由管理人员自行定义,本实施例的举例并不构成对本申请技术方案的限定。
值得说明的是,即使服务提供方不是采用分布式的硬件架构进行服务提供,也可以为服务提供方设置消息队列。通过设置消息队列,管理***在需要向服务提供方发送需要返回服务结果的消费请求时,只需要将消费请求***到消息队列中,即可返回处理其它事项,而无需等待服务提供方的服务结果;当服务提供方处理完成时,管理***再回调一个方法来获取服务结果即可,从而实现了异步处理,提高了管理***的业务处理能力和处理效率。
本实施例中,通过在接收到服务提供方发送的接入请求时,将所述服务提供方接入企业服务总线ESB,并将所述服务提供方对应的服务信息保存至与所述ESB对接的数据库,其中所述服务信息包括服务路径和服务事项;在接收到服务消费方发送的消费请求时,根据所述消费请求确定对应的目标服务事项,并在所述ESB中查询所述目标服务事项对应的目标服务信息;根据所述目标服务信息获取对应目标服务提供方的目标服务路径,并根据所述目标服务路径将所述消费请求发送至所述目标服务提供方,以使所述目标服务提供方根据所述消费请求提供服务。通过以上方式,本实施例基于ESB(企业服务总线)框架,以松耦合的方式,把以前一个个孤立的业务***(服务提供方)整合起来,构建一个统一的服务提供***,各业务***(组件)并能够相互发现与通信,提高了各个业务***的调用效率和服务提供能力;同时由于各业务***通过ESB进行通信和调用,可通过ESB以标准化的方式集成各种协议和工具库,使得各业务***能专注于业务逻辑的开发和管理,将大粒度的业务向微服务分解,提升业务***的开发效率和综合服务能力。
参照图4,图4为图2所述在接收到服务提供方发送的接入请求时,将所述服务提供方接入企业服务总线ESB,并将所述服务提供方对应的服务信息保存至与所述ESB对接的数据库,其中所述服务信息包括服务路径和服务事项的细化流程示意图。
基于上述图2所示实施例,本实施例中,步骤S10包括:
步骤S11,在接收到服务提供方发送的接入请求时,根据所述接入请求对所述服务提供方的服务资质进行验证;
步骤S12,在所述服务资质通过验证时,将所述服务提供方接入所述ESB,并将所述服务提供方对应的服务信息保存至与所述ESB对接的数据库,其中所述服务信息包括服务路径和服务事项。
本实施例中,考虑到服务提供方在接入ESB后,即可以为服务消费方提供服务,为了保证其提供服务的可靠性和安全性,在服务提供方接入ESB前,首先要对服务提供方的服务资质进行验证,以确定其是可信的。具体的,服务提供方在接入ESB前,会向管理***发送接入请求,该接入请求中包含服务提供方的主机名、端口号、服务事项。管理***在接收到该接入请求时,首先会根据其中的主机名和端口号进行查询,以判断该服务提供方的身份是否为真实存在的;若根据端口号查询到的主机名与服务提供方提供的信息一致,则管理***将根据服务事项向服务提供方发测试信息(或称为测试报文、测试请求),然后接收服务提供方返回的测试结果,并根据测试信息和测试结果判断服务提供方的所提供的服务是否与接入请求中的服务事项一致;若一致,则认为该服务提供方所提供服务信息是真实可信的,此时即对服务提供方的可靠性和安全性进行了确认,服务提供方的服务资质通过了验证。当然,在具体实施中,对于服务资质的验证过程中,还可以包括其它方面的审核和验证,例如通信协议、数据传输格式等,本实施例的上述举例并不构成对本申请技术方案的限定。
在服务提供方的服务资质通过验证时,管理***将根据该接入请求中的服务信息对服务提供方进行注册备案。在注册完成时,管理***会将服务提供方接入到ESB,并将服务提供方对应的服务信息保存至ESB的数据库,以供ESB中的其它方或是外界***进行查询与服务调用。
参照图5,图5为图2所述在接收到服务消费方发送的消费请求时,根据所述消费请求确定对应的目标服务事项,并在所述数据库中查询所述目标服务事项对应的目标服务信息的细化流程示意图。
基于上述图2所示实施例,本实施例中,步骤S20包括:
步骤S21,在接收到服务消费方发送的消费请求时,根据所述消费请求对所述服务消费方的消费资质进行验证;
步骤S22,在所述消费资质通过验证时,根据所述消费请求确定对应的目标服务事项,并在所述数据库中查询所述目标服务事项对应的目标服务信息。
本实施例中,ESB中接入了多个服务提供方以向服务消费方提供服务,在提供服务的过程中,必然涉及到数据的交互,这些交互数据可能涉及到隐私数据(或秘密数据);为了保证服务和数据交互的过程整个***的稳定性和数据的安全性,在向服务消费方提供服务时,首先要对服务提供方的服务资质进行验证,以确定其是可信的,避免非法第三方在ESB中对***进行攻击或数据窃取行为。具体的,服务消费方在向ESB发送消费请求时,该消费请求中包括自己的消费主机名、消费端口号和请求服务事项等信息。管理***在接收到该消费请求时,会根据其中的主机名和端口号进行查询,以判断该服务消费方的身份是否为真实存在的;若其服务消费方的身份真实存在,则则认为该服务消费方所提供服务信息是真实可信的,此时即对服务消费方的身份进行了确认,服务消费方的消费资质通过了验证。值得说明的是,本实施例中仅是对服务消费方的身份(地址)进行了确认,若检测到服务消费方对***进行了攻击或数据窃取,则可根据服务消费方的身份和地址采取相应的措施(例如IP禁止访问、端口禁止访问等);当然,在具体实施中,对于消费资质的验证过程中,还可以包括其它方面的审核和验证。
在服务消费方的消费资质通过验证时,管理***将根据消费请求中的请求服务事项确定该消费请求对应的目标服务实现(即确定服务消费方是需要调用ESB中的什么服务)。在确定服务消费方的目标服务事项时,即可在数据库中进行查询,以匹配到对应的目标服务信息,并根据所述目标服务信息获取对应目标服务提供方的目标服务路径,以通过该目标服务路径将消费请求发送至对应的目标服务提供方。
参照图6,图6为图2所述在接收到服务消费方发送的消费请求时,根据所述消费请求确定对应的目标服务事项,并在所述数据库中查询所述目标服务事项对应的目标服务信息的细化流程示意图。
基于上述图2所示实施例,本实施例中,步骤S20还包括:
步骤S23,在接收到服务消费方发送的消费请求时,对所述消费请求的消息头进行解析,确定所述消费请求对应的目标服务事项;
步骤S24,根据所述目标服务事项在所述数据库中查询对应的目标服务信息。
本实施例中,服务消费方发送的消费请求中包括目标服务信息,管理***在接收到该消费请求时,需要先对消费请求进行解析,将会读取该消费请求中的内容(目标服务信息),并根据该内容确定该消费请求对应的目标服务事项。其中,在对消费请求进行解析时,为了加快解析的速度,可以对消费请求的报文格式进行限定,要求服务消费方将目标服务信息放置在消费请求的消息头;在这样的情况下,管理***在对消费请求进行解析时,可直接访问消息头并进行解析,从而无需对整条消费请求进行处理,提高了解析的效率。在根据对消费请求的消息头解析完成时,即可根据其中的目标服务信息确定消息请求对应的目标服务事项,并根据目标服务事项在ESB中查询对应的目标服务信息。
进一步的,服务消费方可以是外界访问方(外***),也可以ESB中的服务提供方,对于不同的服务消费方可能具有不同的***架构和通信协议,为了保证这些服务消费方所发送的消费请求可在ESB***中快速、准确地传输,在接收到消费请求时,可先对消费请求进行预处理,将消费请求进行序列化处理后再进行解析、转发等操作;其中,序列化处理是指把对象转换为字节序列的过程。例如,本实施例的ESB***,可将XML(可扩展标记语言)格式设置为消费请求的默认传输格式;在接收到服务消费方发送的消费请求,首先要将该消费请求的实体对象序列化成XML格式,其中序列化后的消费请求的消息头(包头)包括目标服务信息,当然消息头中还可以包括其它信息,例如消费方的消费主机、端口号等。以Java类消费请求为例,Java类消费请求的序列化可通过JDK(Java Development Kit,Java语言的软件开发工具包)实现,具体的,在接收到Java类消费请求时,首先将输出序列化的头部信息(头部信息可以包括标识序列化协议的幻数和协议版本);然后按照由子类到父类的顺序,递归的输出类的描述信息,直到不再有父类为止,而类描述信息则按照类元数据、类属性信息的顺序写入到序列化流中;其次按照由父类到子类的顺序,递归的输出对象域的实际数据值,对象的属性信息则是按照基本数据类型到java对象类型的顺序写入序列化流中,而java对象类型的属性将开始递归的输出,直到不再存在java对象类型的属性;然后还可通过JDK中自带的转换类将对象转化成流形式的xml并进行输出。在序列化完成时,再对消息头进行解析,根据其中的目标服务信息确定消息请求对应的目标服务事项,并根据目标服务事项在数据库中查询对应的目标服务信息。
再进一步的,对于其中的目标服务信息,可以用特定字符串表示,而不是完整的服务描述报文。具体的,管理***在数据库中存储和发布服务信息时,可对服务信息中的服务事项进行编码,例如服务事项A的对应编码为a,服务事项B的对应编码为b;服务消费方在需要调用服务事项A时,其消费请求中的目标服务信息可用编码a表示,无需完整添加服务事项A的具体服务描述,从而减少了消费请求的数据量,也方便管理***的序列化和解析等处理,提高了请求处理效率和响应速度。
参照图7,图7为本申请基于ESB的服务提供方法第二实施例的流程示意图。
基于上述图2所示实施例,本实施例中,步骤S30之后还包括:
步骤S40,若在预设时间内接收到所述目标服务提供方返回的服务结果信息,则将所述服务结果信息返回至所述服务消费方;
步骤S50,若在预设时间内未接收到所述目标服务提供方返回的服务结果信息,则将所述目标服务提供方标记为了异常状态,并以预设方式进行告警。
本实施例中,服务消费方在调用ESB中的服务时,若调用的目标服务是需要返回服务结果的,可在消费请求中添加自己的消费路径。管理***将消费请求发送至目标服务提供方后,将开始计时;若在预设时间内接收目标服务提供方返回的服务结果信息,则管理***会根据消费请求中的消费路径将该服务结果信息返回至对应的服务消费方,以供服务消费方根据服务结果信息进行后续的处理。若管理***在预设时间内没有接收到目标服务提供方返回的服务结果信息,则会认为目标服务提供方的处理出现了异常,此时管理***会将该目标服务方标记为异常状态,并以预设方式进行告警。其中告警的方式,可以根据具体情况进行设置,例如,对于不同的服务事项可设置为高和一般两个等级;在一般等级服务事项的服务提供方出现异常时,管理***的可视化管理界面的对应拓扑节点会以闪烁的方式进行告警;在高等级服务事项的服务提供方出现异常时,除了可视化管理界面的对应拓扑节点会以闪烁的方式进行告警,同时还会发出相应的语音告警信息,以向管理人员进行提醒。当然告警的方式除了上述举例之外,还可以设置成其它不同的方式。
进一步的,在目标服务提供方出现异常时管理***将根据该目标服务提供方的目标服务路径对其进行服务禁用,不对该目标服务提供方反向发送的信息进行处理,避免异常的目标服务提供方对ESB中的其它服务提供方造成干扰。此外,还可以对数据库中发布异常目标服务提供方暂停提供服务的信息,避免其它消费请求方继续请求该异常目标服务提供方提供服务,当异常目标服务方恢复正常时,再重新启用该服务。
此外,本申请还提供一种基于ESB的服务提供装置。
参照图8,图8为本申请基于ESB的服务提供装置第一实施例的功能模块示意图。
本实施例中,所述服务提供装置包括:
服务接入模块10,用于在接收到服务提供方发送的接入请求时,将所述服务提供方接入企业服务总线ESB,并将所述服务提供方对应的服务信息保存至与所述ESB对接的数据库,其中所述服务信息包括服务路径和服务事项;
请求接收模块20,用于在接收到服务消费方发送的消费请求时,根据所述消费请求确定对应的目标服务事项,并在所述数据库中查询所述目标服务事项对应的目标服务信息;
服务提供模块30,用于根据所述目标服务信息获取对应目标服务提供方的目标服务路径,并根据所述目标服务路径将所述消费请求发送至所述目标服务提供方,以使所述目标服务提供方根据所述消费请求提供服务。
其中,上述基于ESB的服务提供装置的各虚拟功能模块存储于图1所示基于ESB的服务提供设备的存储器1005中,用于实现计算机可读指令的所有功能;各模块被处理器1001执行时,可实现各业务***(组件)相互发现与通信的功能。
进一步的,所述服务接入模块10包括:
第一验证单元,用于在接收到服务提供方发送的接入请求时,根据所述接入请求对所述服务提供方的服务资质进行验证;
服务接入单元,用于在所述服务资质通过验证时,将所述服务提供方接入所述ESB,并将所述服务提供方对应的服务信息保存至与所述ESB对接的数据库,其中所述服务信息包括服务路径和服务事项。
进一步的,所述请求接收模块20包括:
第二验证单元,用于在接收到服务消费方发送的消费请求时,根据所述消费请求对所述服务消费方的消费资质进行验证;
第一查询单元,用于在所述消费资质通过验证时,根据所述消费请求确定对应的目标服务事项,并在所述数据库中查询所述目标服务事项对应的目标服务信息。
进一步的,所述请求接收模块20包括:
消息解析单元,用于在接收到服务消费方发送的消费请求时,对所述消费请求的消息头进行解析,确定所述消费请求对应的目标服务事项;
第二查询单元,用于根据所述目标服务事项在所述数据库中查询对应的目标服务信息。
进一步的,所述消息解析单元还用于,在接收到服务消费方发送的消费请求时,根据预设规则将所述消费请求中的类描述信息和对象域实际数据值递归输出,并将所述类描述信息和对象域实际数据值写入序列化流;调用预设转换类工具对所述序列化流进行转化,获得序列化请求;对序列化的消费请求的消息头进行解析,确定所述消费请求对应的目标服务事项。
进一步的,所述服务提供装置还包括:
信息返回模块,用于若在预设时间内接收到所述目标服务提供方返回的服务结果信息,则将所述服务结果信息返回至所述服务消费方;
异常告警模块,用于若在预设时间内未接收到所述目标服务提供方返回的服务结果信息,则将所述目标服务提供方标记为了异常状态,并以预设方式进行告警。
进一步的,所述服务提供装置还包括:
服务暂停模块,用于根据所述目标服务路径对所述目标服务提供方进行服务禁用,并在所述数据库中发布目标服务暂停信息。
其中,上述服务提供装置中各个模块与上述服务提供方法实施例中各步骤相对应,其功能和实现过程在此处不再赘述。
此外,本申请还提供一种可读存储介质,所述可读存储介质可以为非易失性可读存储介质。
本申请可读存储介质上存储有计算机可读指令,其中所述计算机可读指令被处理器执行时,实现如上述的基于ESB的服务提供方法的步骤。
其中,计算机可读指令被执行时所实现的方法可参照本申请基于ESB的服务提供方法的各个实施例,此处不再赘述。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者***不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者***所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者***中还存在另外的相同要素。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。

Claims (20)

  1. 一种基于ESB的服务提供方法,其特征在于,所述服务提供方法包括以下步骤:
    在接收到服务提供方发送的接入请求时,将所述服务提供方接入企业服务总线ESB,并将所述服务提供方对应的服务信息保存至与所述ESB对接的数据库,其中所述服务信息包括服务路径和服务事项;
    在接收到服务消费方发送的消费请求时,根据所述消费请求确定对应的目标服务事项,并在所述数据库中查询所述目标服务事项对应的目标服务信息;
    根据所述目标服务信息获取对应目标服务提供方的目标服务路径,并根据所述目标服务路径将所述消费请求发送至所述目标服务提供方,以使所述目标服务提供方根据所述消费请求提供服务。
  2. 如权利要求1所述的服务提供方法,其特征在于,所述在接收到服务提供方发送的接入请求时,将所述服务提供方接入企业服务总线ESB,并将所述服务提供方对应的服务信息保存至与所述ESB对接的数据库,其中所述服务信息包括服务路径和服务事项的步骤,包括:
    在接收到服务提供方发送的接入请求时,根据所述接入请求对所述服务提供方的服务资质进行验证;
    在所述服务资质通过验证时,将所述服务提供方接入所述ESB,并将所述服务提供方对应的服务信息保存至与所述ESB对接的数据库,其中所述服务信息包括服务路径和服务事项。
  3. 如权利要求1所述的服务提供方法,其特征在于,所述在接收到服务消费方发送的消费请求时,根据所述消费请求确定对应的目标服务事项,并在所述数据库中查询所述目标服务事项对应的目标服务信息的步骤,包括:
    在接收到服务消费方发送的消费请求时,根据所述消费请求对所述服务消费方的消费资质进行验证;
    在所述消费资质通过验证时,根据所述消费请求确定对应的目标服务事项,并在所述数据库中查询所述目标服务事项对应的目标服务信息。
  4. 如权利要求1所述的服务提供方法,其特征在于,所述在接收到服务消费方发送的消费请求时,根据所述消费请求确定对应的目标服务事项,并在所述数据库中查询所述目标服务事项对应的目标服务信息的步骤,包括:
    在接收到服务消费方发送的消费请求时,对所述消费请求的消息头进行解析,确定所述消费请求对应的目标服务事项;
    根据所述目标服务事项在所述数据库中查询对应的目标服务信息。
  5. 如权利要求4所述的服务提供方法,其特征在于,所述在接收到服务消费方发送的消费请求时,对所述消费请求的消息头进行解析,确定所述消费请求对应的目标服务事项的步骤,包括:
    在接收到服务消费方发送的消费请求时,根据预设规则将所述消费请求中的类描述信息和对象域实际数据值递归输出,并将所述类描述信息和对象域实际数据值写入序列化流;
    调用预设转换类工具对所述序列化流进行转化,获得序列化请求;
    对序列化的消费请求的消息头进行解析,确定所述消费请求对应的目标服务事项。
  6. 如权利要求1所述的服务提供方法,其特征在于,所述根据所述目标服务信息获取对应目标服务提供方的目标服务路径,并根据所述目标服务路径将所述消费请求发送至所述目标服务提供方,以使所述目标服务提供方根据所述消费请求提供服务的步骤之后,还包括:
    若在预设时间内接收到所述目标服务提供方返回的服务结果信息,则将所述服务结果信息返回至所述服务消费方;
    若在预设时间内未接收到所述目标服务提供方返回的服务结果信息,则将所述目标服务提供方标记为了异常状态,并以预设方式进行告警。
  7. 如权利要求6所述的服务提供方法,其特征在于,所述若在预设时间内未接收到所述目标服务提供方返回的服务结果信息,则将所述目标服务提供方标记为了异常状态,并以预设方式进行告警的步骤之后,还包括:
    根据所述目标服务路径对所述目标服务提供方进行服务禁用,并在所述数据库中发布目标服务暂停信息。
  8. 一种基于ESB的服务提供装置,其特征在于,所述服务提供装置包括:
    服务接入模块,用于在接收到服务提供方发送的接入请求时,将所述服务提供方接入企业服务总线ESB,并将所述服务提供方对应的服务信息保存至与所述ESB对接的数据库,其中所述服务信息包括服务路径和服务事项;
    请求接收模块,用于在接收到服务消费方发送的消费请求时,根据所述消费请求确定对应的目标服务事项,并在所述数据库中查询所述目标服务事项对应的目标服务信息;
    服务提供模块,用于根据所述目标服务信息获取对应目标服务提供方的目标服务路径,并根据所述目标服务路径将所述消费请求发送至所述目标服务提供方,以使所述目标服务提供方根据所述消费请求提供服务。
  9. 如权利要求8所述的服务提供装置,其特征在于,所述服务接入模块包括:
    第一验证单元,用于在接收到服务提供方发送的接入请求时,根据所述接入请求对所述服务提供方的服务资质进行验证;
    服务接入单元,用于在所述服务资质通过验证时,将所述服务提供方接入所述ESB,并将所述服务提供方对应的服务信息保存至与所述ESB对接的数据库,其中所述服务信息包括服务路径和服务事项
  10. 如权利要求8所述的服务提供装置,其特征在于,所述请求接收模块包括:
    第二验证单元,用于在接收到服务消费方发送的消费请求时,根据所述消费请求对所述服务消费方的消费资质进行验证;
    第一查询单元,用于在所述消费资质通过验证时,根据所述消费请求确定对应的目标服务事项,并在所述数据库中查询所述目标服务事项对应的目标服务信息。
  11. 如权利要求8所述的服务提供装置,其特征在于,所述请求接收模块包括:
    消息解析单元,用于在接收到服务消费方发送的消费请求时,对所述消费请求的消息头进行解析,确定所述消费请求对应的目标服务事项;
    第二查询单元,用于根据所述目标服务事项在所述数据库中查询对应的目标服务信息。
  12. 如权利要求11所述的服务提供装置,其特征在于,所述消息解析单元还用于,在接收到服务消费方发送的消费请求时,根据预设规则将所述消费请求中的类描述信息和对象域实际数据值递归输出,并将所述类描述信息和对象域实际数据值写入序列化流;调用预设转换类工具对所述序列化流进行转化,获得序列化请求;对序列化的消费请求的消息头进行解析,确定所述消费请求对应的目标服务事项。
  13. 如权利要求8所述的服务提供装置,其特征在于,所述服务提供装置还包括:
    信息返回模块,用于若在预设时间内接收到所述目标服务提供方返回的服务结果信息,则将所述服务结果信息返回至所述服务消费方;
    异常告警模块,用于若在预设时间内未接收到所述目标服务提供方返回的服务结果信息,则将所述目标服务提供方标记为了异常状态,并以预设方式进行告警。
  14. 如权利要求13所述的服务提供装置,其特征在于,所述服务提供装置还包括:
    服务暂停模块,用于根据所述目标服务路径对所述目标服务提供方进行服务禁用,并在所述数据库中发布目标服务暂停信息。
  15. 一种基于ESB的服务提供设备,其特征在于,所述服务提供设备包括处理器、存储器、以及存储在所述存储器上并可被所述处理器执行的计算机可读指令,其中所述计算机可读指令被所述处理器执行时,实现如下步骤:
    在接收到服务提供方发送的接入请求时,将所述服务提供方接入企业服务总线ESB,并将所述服务提供方对应的服务信息保存至与所述ESB对接的数据库,其中所述服务信息包括服务路径和服务事项;
    在接收到服务消费方发送的消费请求时,根据所述消费请求确定对应的目标服务事项,并在所述数据库中查询所述目标服务事项对应的目标服务信息;
    根据所述目标服务信息获取对应目标服务提供方的目标服务路径,并根据所述目标服务路径将所述消费请求发送至所述目标服务提供方,以使所述目标服务提供方根据所述消费请求提供服务。
  16. 如权利要求15所述的服务提供设备,其特征在于,所述在接收到服务提供方发送的接入请求时,将所述服务提供方接入企业服务总线ESB,并将所述服务提供方对应的服务信息保存至与所述ESB对接的数据库,其中所述服务信息包括服务路径和服务事项的步骤,包括:
    在接收到服务提供方发送的接入请求时,根据所述接入请求对所述服务提供方的服务资质进行验证;
    在所述服务资质通过验证时,将所述服务提供方接入所述ESB,并将所述服务提供方对应的服务信息保存至与所述ESB对接的数据库,其中所述服务信息包括服务路径和服务事项。
  17. 如权利要求15所述的服务提供设备,其特征在于,所述在接收到服务消费方发送的消费请求时,根据所述消费请求确定对应的目标服务事项,并在所述数据库中查询所述目标服务事项对应的目标服务信息的步骤,包括:
    在接收到服务消费方发送的消费请求时,根据所述消费请求对所述服务消费方的消费资质进行验证;
    在所述消费资质通过验证时,根据所述消费请求确定对应的目标服务事项,并在所述数据库中查询所述目标服务事项对应的目标服务信息。
  18. 一种可读存储介质,其特征在于,所述可读存储介质上存储有计算机可读指令,其中所述计算机可读指令被处理器执行时,实现如下步骤:
    在接收到服务提供方发送的接入请求时,将所述服务提供方接入企业服务总线ESB,并将所述服务提供方对应的服务信息保存至与所述ESB对接的数据库,其中所述服务信息包括服务路径和服务事项;
    在接收到服务消费方发送的消费请求时,根据所述消费请求确定对应的目标服务事项,并在所述数据库中查询所述目标服务事项对应的目标服务信息;
    根据所述目标服务信息获取对应目标服务提供方的目标服务路径,并根据所述目标服务路径将所述消费请求发送至所述目标服务提供方,以使所述目标服务提供方根据所述消费请求提供服务。
  19. 如权利要求18所述的可读存储介质,其特征在于,所述在接收到服务提供方发送的接入请求时,将所述服务提供方接入企业服务总线ESB,并将所述服务提供方对应的服务信息保存至与所述ESB对接的数据库,其中所述服务信息包括服务路径和服务事项的步骤,包括:
    在接收到服务提供方发送的接入请求时,根据所述接入请求对所述服务提供方的服务资质进行验证;
    在所述服务资质通过验证时,将所述服务提供方接入所述ESB,并将所述服务提供方对应的服务信息保存至与所述ESB对接的数据库,其中所述服务信息包括服务路径和服务事项。
  20. 如权利要求18所述的可读存储介质,其特征在于,所述在接收到服务消费方发送的消费请求时,根据所述消费请求确定对应的目标服务事项,并在所述数据库中查询所述目标服务事项对应的目标服务信息的步骤,包括:
    在接收到服务消费方发送的消费请求时,根据所述消费请求对所述服务消费方的消费资质进行验证;
    在所述消费资质通过验证时,根据所述消费请求确定对应的目标服务事项,并在所述数据库中查询所述目标服务事项对应的目标服务信息。
PCT/CN2018/119392 2017-12-08 2018-12-05 基于esb的服务提供方法、装置、设备及可读存储介质 WO2019109957A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711292797.7A CN108074076A (zh) 2017-12-08 2017-12-08 基于esb的服务提供方法、装置、设备及可读存储介质
CN201711292797.7 2017-12-08

Publications (1)

Publication Number Publication Date
WO2019109957A1 true WO2019109957A1 (zh) 2019-06-13

Family

ID=62158110

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/119392 WO2019109957A1 (zh) 2017-12-08 2018-12-05 基于esb的服务提供方法、装置、设备及可读存储介质

Country Status (2)

Country Link
CN (1) CN108074076A (zh)
WO (1) WO2019109957A1 (zh)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108074076A (zh) * 2017-12-08 2018-05-25 上海壹账通金融科技有限公司 基于esb的服务提供方法、装置、设备及可读存储介质
CN109062848B (zh) * 2018-08-01 2021-01-26 武汉索雅信息技术有限公司 基于esb总线平台的采购管理方法、装置及总线平台
CN109150858A (zh) * 2018-08-01 2019-01-04 武汉索雅信息技术有限公司 数据交互总线的请求处理方法、设备、***及存储介质
CN109120684B (zh) * 2018-08-01 2021-10-01 武汉索雅信息技术有限公司 信息化管理方法、装置、esb总线平台以及存储介质
CN109298950A (zh) * 2018-08-15 2019-02-01 深圳壹账通智能科技有限公司 企业服务总线***、数据处理方法、终端及存储介质
CN109525550B (zh) * 2018-09-30 2021-05-04 创新先进技术有限公司 一种数据报文的处理方法、装置以及***
CN110287267A (zh) * 2019-06-28 2019-09-27 深圳前海微众银行股份有限公司 一种跨节点的数据处理方法及装置
CN111865746B (zh) * 2020-06-19 2022-08-19 苏宁云计算有限公司 基于环路总线的***开发方法及装置
CN112732534B (zh) * 2021-03-30 2021-07-23 北京宇信科技集团股份有限公司 一种支持分布式微服务的esb***

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102158548A (zh) * 2011-03-02 2011-08-17 山东中创软件工程股份有限公司 一种企业服务总线接入外部服务的方法
CN102364921A (zh) * 2011-11-21 2012-02-29 携程计算机技术(上海)有限公司 企业服务总线的实现方法、设备及相应的平台
CN102387075A (zh) * 2011-10-18 2012-03-21 成都康赛电子科大信息技术有限责任公司 面向企业服务总线的动态服务路由方法及装置
CN106331167A (zh) * 2016-10-13 2017-01-11 安徽鼎集信息科技有限公司 一种企业服务总线***
CN108074076A (zh) * 2017-12-08 2018-05-25 上海壹账通金融科技有限公司 基于esb的服务提供方法、装置、设备及可读存储介质

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101674255B (zh) * 2008-09-12 2012-01-11 北京东方通科技股份有限公司 一种企业服务总线的消息转发方法、服务器及其***
CN101610288B (zh) * 2009-06-16 2012-08-22 浙江大学 一种企业服务总线智能路由方法
CN101827115B (zh) * 2009-12-31 2012-11-21 厦门市美亚柏科信息股份有限公司 一种全息式企业服务总线
CN105812241A (zh) * 2016-03-24 2016-07-27 江苏物联网研究发展中心 基于Spring Integration的企业应用集成方法和***
CN106713464B (zh) * 2016-12-27 2019-12-13 山东中创软件商用中间件股份有限公司 一种企业服务总线的服务管理方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102158548A (zh) * 2011-03-02 2011-08-17 山东中创软件工程股份有限公司 一种企业服务总线接入外部服务的方法
CN102387075A (zh) * 2011-10-18 2012-03-21 成都康赛电子科大信息技术有限责任公司 面向企业服务总线的动态服务路由方法及装置
CN102364921A (zh) * 2011-11-21 2012-02-29 携程计算机技术(上海)有限公司 企业服务总线的实现方法、设备及相应的平台
CN106331167A (zh) * 2016-10-13 2017-01-11 安徽鼎集信息科技有限公司 一种企业服务总线***
CN108074076A (zh) * 2017-12-08 2018-05-25 上海壹账通金融科技有限公司 基于esb的服务提供方法、装置、设备及可读存储介质

Also Published As

Publication number Publication date
CN108074076A (zh) 2018-05-25

Similar Documents

Publication Publication Date Title
WO2019109957A1 (zh) 基于esb的服务提供方法、装置、设备及可读存储介质
WO2020224250A1 (zh) 智能合约的触发方法、装置、设备及存储介质
WO2023038381A1 (ko) Api 데이터 수집시스템 및 그에 관한 방법
WO2014094300A1 (zh) 远程控制通讯终端工作的服务器和方法及通讯终端
WO2014112754A1 (ko) 웹 서비스 푸시 방법 및 이를 수행하는 웹 서비스 푸시 서버 및 웹 서비스 제공 서버
WO2012169775A9 (ko) 오픈 api 기반 콘텐츠 서비스 인터페이스 제공 시스템 및 방법
WO2020253120A1 (zh) 网页注册方法、***、设备和计算机存储介质
WO2012157940A2 (ko) 피드백메시지를 이용한 푸시 서비스 제공 시스템 및 방법
WO2013063897A1 (zh) 一种回填用户固定身份的方法及装置
WO2020233073A1 (zh) 区块链环境检测方法、设备、装置及存储介质
CN111385147B (zh) 故障模拟方法、装置和计算机可读存储介质
WO2020042471A1 (zh) 防火墙策略验证方法、***、设备及可读存储介质
WO2021072881A1 (zh) 基于对象存储的请求处理方法、装置、设备及存储介质
WO2018035929A1 (zh) 一种验证码的处理方法及装置
WO2016013718A1 (ko) 와이파이 망을 이용한 웹기반 광고 제공 시스템 및 방법
WO2017173838A1 (zh) 基于验证的消息显示方法及通信终端
WO2020224251A1 (zh) 区块链事务的处理方法、装置、设备及存储介质
WO2017028685A1 (zh) 即时通信的方法、服务器和存储介质
WO2013123854A1 (zh) 一种由计算机执行的网络应用的客户端互动方法、装置及计算机存储介质
WO2020019405A1 (zh) 数据库监控方法、装置、设备及可读存储介质
WO2021078062A1 (zh) Ssl证书校验方法、装置、设备及计算机存储介质
WO2013176431A1 (ko) 단말을 서버에 할당하고 단말로의 효율적인 메시징을 위한 시스템 및 방법
CN114338682A (zh) 流量身份标识传递方法、装置、电子设备及存储介质
WO2014021675A1 (en) Method and apparatus for updating personal information in communication system
WO2019000962A1 (zh) 收益计算方法、装置及计算机可读存储介质

Legal Events

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

Ref document number: 18886965

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 13/10/2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18886965

Country of ref document: EP

Kind code of ref document: A1