Movatterモバイル変換


[0]ホーム

URL:


CN103117983A - Data service request response method and data service protocol stack - Google Patents

Data service request response method and data service protocol stack
Download PDF

Info

Publication number
CN103117983A
CN103117983ACN2011103628786ACN201110362878ACN103117983ACN 103117983 ACN103117983 ACN 103117983ACN 2011103628786 ACN2011103628786 ACN 2011103628786ACN 201110362878 ACN201110362878 ACN 201110362878ACN 103117983 ACN103117983 ACN 103117983A
Authority
CN
China
Prior art keywords
service
data
layer
soap
data packet
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.)
Granted
Application number
CN2011103628786A
Other languages
Chinese (zh)
Other versions
CN103117983B (en
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.)
FUJIAN NEW LAND SOFTWARE ENGINEERING Co Ltd
China Mobile Communications Group Co Ltd
Original Assignee
FUJIAN NEW LAND SOFTWARE ENGINEERING Co Ltd
China Mobile Communications Group 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 FUJIAN NEW LAND SOFTWARE ENGINEERING Co Ltd, China Mobile Communications Group Co LtdfiledCriticalFUJIAN NEW LAND SOFTWARE ENGINEERING Co Ltd
Priority to CN201110362878.6ApriorityCriticalpatent/CN103117983B/en
Publication of CN103117983ApublicationCriticalpatent/CN103117983A/en
Application grantedgrantedCritical
Publication of CN103117983BpublicationCriticalpatent/CN103117983B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Landscapes

Abstract

Translated fromChinese

本发明公开了一种数据服务请求应答方法及数据服务协议栈,其中,该方法包括:服务请求方将服务指标参数封装到SOAP数据包;服务请求方将封装后的SOAP数据包发送给服务提供方,以使服务提供方将SOAP数据包或HTTP数据包进行解析处理后获得服务查询指令,自数据库中获取服务数据。本发明不仅可以实现应用与数据的解耦,还可以实现数据服务内部的解耦,使数据服务的内部实现细节更加简单、高效、清晰、灵活和可扩展。

The invention discloses a data service request response method and a data service protocol stack, wherein the method comprises: a service requester encapsulates service index parameters into a SOAP data packet; the service requester sends the encapsulated SOAP data packet to a service provider side, so that the service provider parses the SOAP data packet or the HTTP data packet to obtain a service query instruction and obtain service data from the database. The present invention can not only realize the decoupling of application and data, but also realize the decoupling of the internal data service, so that the internal implementation details of the data service are simpler, more efficient, clearer, more flexible and expandable.

Description

Translated fromChinese
数据服务请求应答方法和数据服务协议栈Data service request response method and data service protocol stack

技术领域technical field

本发明涉及通信领域中业务运营支撑技术,具体地,涉及数据服务请求应答的方法及数据服务协议栈。 The present invention relates to a business operation support technology in the communication field, in particular to a data service request response method and a data service protocol stack. the

背景技术Background technique

目前很多大型企业,如通信、金融等行业的企业都已经开始实施SOA(Service-Oriented Architecture,面向服务架构)。SOA提供了一种构建IT组织的标准和方法,通过建立可组合、可重用的服务体系来减少IT业务冗余,并加快项目开发的进程,SOA体系能够使IT部门效率更高、开发周期更短、项目分发更快,在协助IT技术和业务整合方面有着较高的价值。 At present, many large enterprises, such as enterprises in communication and financial industries, have begun to implement SOA (Service-Oriented Architecture, Service-Oriented Architecture). SOA provides a standard and method for building an IT organization. By establishing a composable and reusable service system to reduce IT business redundancy and speed up the project development process, the SOA system can make the IT department more efficient and the development cycle shorter. Shorter and faster project distribution, it has a high value in assisting IT technology and business integration. the

SOA实施过程中的关键内容之一在于数据服务的实现,数据服务作为应用与数据解耦的技术,可实现软件的高内聚、松耦合,可以提高软件的复用度。 One of the key contents in the SOA implementation process is the realization of data services. As a technology for decoupling applications and data, data services can achieve high cohesion and loose coupling of software, and can improve software reusability. the

现有业界在数据服务的实现方面主要有EJB、CORBA、DCOM和Web Service等技术,其中比较流行的是Web Service。Web Service使用标准的、规范的XML描述接口,来描述与服务进行交互所需要的全部细节,包括消息格式、传输协议和服务位置;而在对外的接口中隐藏了服务实现的细节,仅提供一系列可执行的操作,该操作独立于软硬件平台和编写服务所用的编程语言。Web Service的体系结构主要基于服务注册中心、服务请求者(即服务请求方)和服务提供者(即服务提供方)三种角色之间的交互,如图1所示。 In the existing industry, there are mainly technologies such as EJB, CORBA, DCOM, and Web Service in the realization of data services, among which Web Service is more popular. Web Service uses a standard and standardized XML description interface to describe all the details needed to interact with the service, including message format, transmission protocol and service location; while the details of service implementation are hidden in the external interface, only providing a A series of executable operations that is independent of hardware and software platforms and the programming language used to write the service. The architecture of Web Service is mainly based on the interaction between the three roles of service registry, service requester (that is, service requester) and service provider (that is, service provider), as shown in Figure 1. the

三种角色的交互主要涉及发布、查找和绑定操作,服务提供者定义Web服务的服务描述并把它发布到服务注册中心,服务请求者使用查找操作从本地或服务注册中心检索服务描述,然后使用服务描述与服务提供者进行绑定并调用Web服务。 The interaction of the three roles mainly involves publishing, searching and binding operations. The service provider defines the service description of the Web service and publishes it to the service registry. The service requester uses the lookup operation to retrieve the service description from the local or service registry, and then Use the service description to bind with the service provider and invoke the Web service. the

申请号为201010616910.4的中国专利申请介绍了一种Web Service服务的管理方法和系统,包括:网络服务器获取客户端发送的用户身份认证请求;所述用户身份认证请求包括:用户数字证书和用户身份认证信息;所述网络服务器将其获取到的用户身份认证请求转发给认证中心,以便所述认证中心对所述网络服务器以及用户身份进行认证;当所述认证中心完成认证后,所述网络服务器接收所述认证中心返回的认证结果;根据所述认证结果,所述网络服务器为所述客户端提供网络服务。本专利申请能够提高Web Service的安全性,还能有效的解决验证数字证书的使用者和所有者是否是同一实体的问题。 The Chinese patent application with application number 201010616910.4 introduces a management method and system for Web Service services, including: the network server obtains the user identity authentication request sent by the client; the user identity authentication request includes: user digital certificate and user identity authentication information; the network server forwards the obtained user identity authentication request to the authentication center, so that the authentication center can authenticate the network server and the user identity; when the authentication center completes the authentication, the network server receives The authentication result returned by the authentication center; according to the authentication result, the network server provides network services for the client. This patent application can improve the security of Web Service, and can also effectively solve the problem of verifying whether the user and owner of the digital certificate are the same entity. the

申请号为200910167170.8的中国专利申请公开了一种提供数据服务的处理系统及方法,包括:在接收到用户的提供数据服务的业务请求后,在需要调用外部接口时,基于调用外部接口的位置将业务拆分为初始逻辑业务和后续逻辑业务;对初始逻辑业务进行处理,并向反向代理服务器返回分段响应处理结果;反向代理服务器根据分段响应结果的请求调用外部接口;在调用的外部接口返回响应结果后,将分段响应结果与调用外部接口返回的响应结果整合成提供给用户的数据服务结果;向用户返回数据服务结果。本专利申请可以避免前端逻辑被阻塞,使得前端服务能够连续处理新请求而不用浪费时间在等待外部服务请求的响应上。 The Chinese patent application with application number 200910167170.8 discloses a processing system and method for providing data services, including: after receiving a service request from a user for providing data services, when an external interface needs to be called, based on the location where the external interface is called, the The business is split into initial logical business and subsequent logical business; the initial logical business is processed, and the segmented response processing result is returned to the reverse proxy server; the reverse proxy server calls the external interface according to the request of the segmented response result; After the external interface returns the response result, the segmented response result and the response result returned by calling the external interface are integrated into the data service result provided to the user; the data service result is returned to the user. This patent application can prevent the front-end logic from being blocked, so that the front-end service can continuously process new requests without wasting time waiting for the response of external service requests. the

总体来说,上述现有方案虽然可以一定程度上解决Web Service数据服务的实现问题,但主要针对服务接口层面实现,并不能深入到数据服务的内部实现细节进行规范说明,使数据服务的内部实现不能得到充分的解耦和复用,导致数据服务的内部实现比较复杂,影响数据服务的实现效率。 Generally speaking, although the above-mentioned existing solutions can solve the implementation problem of Web Service data services to a certain extent, they are mainly aimed at the implementation of the service interface level, and cannot go deep into the internal implementation details of the data service for specification, so that the internal implementation of the data service Cannot be fully decoupled and reused, resulting in complex internal implementation of data services, affecting the efficiency of data services. the

发明内容Contents of the invention

本发明的目的是针对现有技术中数据服务的实现效率较低的缺陷,提出一种数据服务请求应答方法及数据服务协议栈。 The object of the present invention is to propose a data service request response method and a data service protocol stack for the defect of low data service implementation efficiency in the prior art. the

为实现上述目的,根据本发明的一个方面,提供了一种数据服务请求方法。 To achieve the above object, according to one aspect of the present invention, a data service request method is provided. the

根据本发明实施例的数据服务请求方法,包括: The data service request method according to the embodiment of the present invention includes:

服务请求方通过数据服务协议栈的表示层、会话层、服务层和接口层将服务指标参数封装到SOAP数据包或HTTP数据包; The service requester encapsulates the service indicator parameters into SOAP data packets or HTTP data packets through the presentation layer, session layer, service layer and interface layer of the data service protocol stack;

服务请求方将封装后的SOAP数据包或HTTP数据包发送给服务提供方,以使服务提供方将SOAP数据包或HTTP数据包进行解析处理后获得服务查询指令,自数据库中获取服务数据。 The service requester sends the encapsulated SOAP data packet or HTTP data packet to the service provider, so that the service provider parses the SOAP data packet or HTTP data packet to obtain service query instructions and obtain service data from the database. the

在上述技术方案中,服务提供方将SOAP数据包或HTTP数据包进行解析后获得服务查询指令,自数据库中获取服务数据的步骤包括:服务提供方通过数据服务协议栈的接口层、服务层、会话层和表示层对SOAP数据包或HTTP数据包进行解析后获得服务指标参数; In the above technical solution, the service provider parses the SOAP data packet or the HTTP data packet to obtain the service query instruction, and the steps of obtaining the service data from the database include: the service provider passes through the interface layer of the data service protocol stack, the service layer, The session layer and the presentation layer parse the SOAP data packet or HTTP data packet to obtain service index parameters;

服务提供方通过数据服务协议栈的模型映射层和连接层根据服务指标参数组成服务查询指令提交到数据库中执行,自数据库中获取服务数据。 The service provider composes service query instructions according to the service index parameters through the model mapping layer and connection layer of the data service protocol stack, submits them to the database for execution, and obtains service data from the database. the

在上述技术方案中,将服务指标参数封装到SOAP数据包或HTTP数据包的步骤包括: In the above technical solution, the steps of encapsulating the service indicator parameters into SOAP data packets or HTTP data packets include:

将服务指标参数通过数据服务协议栈的表示层封装成可扩展标记语言数据,根据服务的交互类型通过数据服务协议栈的会话层发起会话请求; Encapsulate the service indicator parameters into Extensible Markup Language data through the presentation layer of the data service protocol stack, and initiate a session request through the session layer of the data service protocol stack according to the interaction type of the service;

通过数据服务协议栈的服务层将可扩展标记语言数据封装到SOAP数据包或HTTP数据包的包体中; Encapsulate the Extensible Markup Language data into the body of the SOAP data packet or HTTP data packet through the service layer of the data service protocol stack;

通过数据服务协议栈的接口层对SOAP数据包或HTTP数据包的包头进行服务版本、路由、请求源和认证鉴权的封装操作。 Through the interface layer of the data service protocol stack, the encapsulation operation of the service version, route, request source and authentication is performed on the header of the SOAP data packet or HTTP data packet. the

在上述技术方案中,在将服务指标参数封装到SOAP数据包或HTTP数据包的步骤与将封装后的SOAP数据包或HTTP数据包发送给服务提供方的步骤之间还包括:通过数据服务协议栈的接口层对SOAP数据包或HTTP数据包进行数字签名的操作。 In the above technical solution, between the step of encapsulating the service index parameter into a SOAP data packet or HTTP data packet and the step of sending the encapsulated SOAP data packet or HTTP data packet to the service provider, it also includes: The interface layer of the stack performs digital signature operations on SOAP data packets or HTTP data packets. the

在上述技术方案中,对SOAP数据包或HTTP数据包进行解析后获得服务指标参数的步骤包括:通过数据服务协议栈的接口层对SOAP数据包或HTTP数据包进行数字签名认证和数据解密;通过数据服务协议栈的接口层对SOAP数据包或HTTP数据包的包头进行解析,进行认证鉴权、请 求源、路由和服务版本的控制操作,获取SOAP数据包或HTTP数据包的包体;通过数据服务协议栈的服务层对SOAP数据包或HTTP数据包的包体进行解析,获取可扩展标记语言数据;通过数据服务协议栈的会话层,获知服务的交互类型,根据服务的交互类型将可扩展标记语言数据转发至数据服务协议栈的表示层;通过数据服务协议栈的表示层对可扩展标记语言数据进行解析,获取服务指标参数。 In the above-mentioned technical scheme, the step of obtaining the service index parameter after parsing the SOAP data packet or the HTTP data packet comprises: carrying out digital signature authentication and data decryption to the SOAP data packet or the HTTP data packet through the interface layer of the data service protocol stack; The interface layer of the data service protocol stack parses the header of the SOAP data packet or HTTP data packet, performs authentication and authentication, request source, routing and service version control operations, and obtains the body of the SOAP data packet or HTTP data packet; The service layer of the data service protocol stack parses the body of the SOAP data packet or HTTP data packet to obtain the extensible markup language data; through the session layer of the data service protocol stack, the interaction type of the service is known, and according to the interaction type of the service, the The extensible markup language data is forwarded to the presentation layer of the data service protocol stack; the extensible markup language data is parsed through the presentation layer of the data service protocol stack to obtain service index parameters. the

在上述技术方案中,根据服务指标参数组成服务查询指令提交到数据库中执行,自数据库中获取服务数据的步骤具体包括:通过数据服务协议栈的模型映射层将服务指标参数组装成服务查询指令;通过数据服务协议栈的连接层将服务查询指令提交到数据库中执行,自数据库中获取服务数据。 In the above technical solution, the service query instruction is composed according to the service index parameters and submitted to the database for execution, and the step of obtaining service data from the database specifically includes: assembling the service index parameters into a service query instruction through the model mapping layer of the data service protocol stack; Through the connection layer of the data service protocol stack, the service query instruction is submitted to the database for execution, and the service data is obtained from the database. the

为实现上述目的,根据本发明的一个方面,提供了一种数据服务应答方法。 In order to achieve the above object, according to one aspect of the present invention, a data service response method is provided. the

根据本发明实施例的数据服务应答方法,包括: The data service response method according to the embodiment of the present invention includes:

服务提供方通过数据服务协议栈的连接层自数据库中获取服务数据,通过数据服务协议栈的模型映射层、表示层、会话层、服务层和接口层将服务数据封装成SOAP数据包或HTTP数据包; The service provider obtains service data from the database through the connection layer of the data service protocol stack, and encapsulates the service data into SOAP packets or HTTP data through the model mapping layer, presentation layer, session layer, service layer and interface layer of the data service protocol stack Bag;

服务提供方将封装后的SOAP数据包或HTTP数据包发送给服务请求方,以使服务请求方通过数据服务协议栈的接口层、服务层、会话层和表示层对SOAP数据包或HTTP数据包进行解析后,获取服务数据。 The service provider sends the encapsulated SOAP data packet or HTTP data packet to the service requester, so that the service requester can process the SOAP data packet or HTTP data packet through the interface layer, service layer, session layer and presentation layer of the data service protocol stack. After parsing, get service data. the

在上述技术方案中,将服务数据封装成SOAP数据包或HTTP数据包的步骤包括:将服务数据通过数据服务协议栈的模型映射层转换为关系型数据,并将该关系型数据通过数据服务协议栈的表示层封装成可扩展标记语言数据;通过数据服务协议栈的会话层,获知服务的交互类型,根据服务的交互类型将可扩展标记语言数据转发至数据服务协议栈的服务层;将可扩展标记语言数据通过数据服务协议栈的服务层封装到SOAP数据包或HTTP数据包的包体中;通过数据服务协议栈的接口层对SOAP数据包或HTTP数据包的包头进行应答结果、应答时间、应答编码和应答描述的控制信息的封装操作。 In the above technical solution, the step of encapsulating the service data into SOAP data packets or HTTP data packets includes: converting the service data into relational data through the model mapping layer of the data service protocol stack, and converting the relational data into relational data through the data service protocol The presentation layer of the stack is encapsulated into extensible markup language data; through the session layer of the data service protocol stack, the interaction type of the service is known, and the extensible markup language data is forwarded to the service layer of the data service protocol stack according to the interaction type of the service; Extended markup language data is encapsulated into the body of SOAP data packet or HTTP data packet through the service layer of the data service protocol stack; the response result and response time of the header of the SOAP data packet or HTTP data packet are performed through the interface layer of the data service protocol stack , the encapsulation operation of the control information described in response encoding and response. the

为实现上述目的,根据本发明的另一个方面,提供了一种数据服务请求数据服务协议栈。 To achieve the above purpose, according to another aspect of the present invention, a data service request data service protocol stack is provided. the

根据本发明实施例的数据服务协议栈,包括: The data service protocol stack according to the embodiment of the present invention includes:

表示层,用于将服务指标参数封装成可扩展标记语言数据,对可扩展标记语言数据进行解析,获取服务指标参数; The presentation layer is used to encapsulate the service indicator parameters into XML data, analyze the XML data, and obtain the service indicator parameters;

会话层,用于根据服务的交互类型发起会话请求,获知服务的交互类型,根据服务的交互类型将可扩展标记语言数据转发至表示层; The session layer is used to initiate a session request according to the interaction type of the service, obtain the interaction type of the service, and forward the extensible markup language data to the presentation layer according to the interaction type of the service;

服务层,用于将可扩展标记语言数据封装到SOAP数据包或HTTP数据包的包体中,对SOAP数据包或HTTP数据包的包体进行解析,获取可扩展标记语言数据; The service layer is used to encapsulate the extensible markup language data into the body of the SOAP data packet or the HTTP data packet, parse the body of the SOAP data packet or the HTTP data packet, and obtain the extensible markup language data;

接口层,用于对SOAP数据包或HTTP数据包的包头进行服务版本、路由、请求源和认证鉴权的封装操作,对SOAP数据包或HTTP数据包的包头进行解析,进行认证鉴权、请求源、路由和服务版本的控制操作,获取SOAP数据包或HTTP数据包的包体; The interface layer is used for encapsulating the service version, routing, request source and authentication authentication on the header of SOAP data packet or HTTP data packet, parsing the header of SOAP data packet or HTTP data packet, performing authentication authentication, request Source, route and service version control operations, get the body of SOAP data packet or HTTP data packet;

模型映射层,用于将服务指标参数组装成服务查询指令; The model mapping layer is used to assemble service index parameters into service query instructions;

连接层,用于将服务查询指令提交到数据库中执行,自数据库中获取服务数据。 The connection layer is used to submit service query instructions to the database for execution, and obtain service data from the database. the

在上述技术方案中,协议栈还包括:接口层,还用于对SOAP数据包或HTTP数据包进行数字签名的操作,对SOAP数据包或HTTP数据包进行数字签名认证和数据解密。 In the above technical solution, the protocol stack further includes: an interface layer, which is also used for performing digital signature operations on SOAP data packets or HTTP data packets, and performing digital signature authentication and data decryption on SOAP data packets or HTTP data packets. the

在上述技术方案中,协议栈还包括:接口层,还用于将数据服务对外发布,提供给服务请求方调用,并且通过企业服务总线控制数据服务的访问,实现数据服务的集成和统一控制。 In the above technical solution, the protocol stack also includes: an interface layer, which is also used to release the data service to the outside, provide it to the service requester to call, and control the access of the data service through the enterprise service bus, so as to realize the integration and unified control of the data service. the

在上述技术方案中,协议栈还包括:模型映射层,还用于实现数据服务的数据模型与数据库数据模型的映射。 In the above technical solution, the protocol stack further includes: a model mapping layer, which is also used to realize the mapping between the data model of the data service and the data model of the database. the

为实现上述目的,根据本发明的另一个方面,提供了一种数据服务协议栈。 To achieve the above object, according to another aspect of the present invention, a data service protocol stack is provided. the

根据本发明实施例的数据服务协议栈,包括: The data service protocol stack according to the embodiment of the present invention includes:

连接层,用于自数据库中获取服务数据; The connection layer is used to obtain service data from the database;

模型映射层,用于将服务数据转换为关系型数据; Model mapping layer, used to convert service data into relational data;

表示层,用于将关系型数据封装成可扩展标记语言数据; Presentation layer, used to encapsulate relational data into Extensible Markup Language data;

会话层,用于获知服务的交互类型,根据服务的交互类型将可扩展标记语言数据转发至服务层; The session layer is used to learn the interaction type of the service, and forward the extensible markup language data to the service layer according to the interaction type of the service;

服务层,用于将可扩展标记语言数据封装到SOAP数据包或HTTP数据包的包体中; The service layer is used to encapsulate the extensible markup language data into the body of the SOAP data packet or HTTP data packet;

接口层,用于对SOAP数据包或HTTP数据包的包头进行应答结果、应答时间、应答编码和应答描述的控制信息的封装操作。 The interface layer is used for encapsulating the response result, response time, response encoding and control information described in the response to the header of the SOAP data packet or HTTP data packet. the

本发明各实施例的数据服务请求应答方法及数据服务协议栈,不仅可以实现应用与数据的解耦,还可以实现数据服务内部的解耦,使数据服务的内部实现细节更加简单、高效、清晰、灵活和可扩展。 The data service request response method and data service protocol stack of each embodiment of the present invention can not only realize the decoupling of applications and data, but also realize the internal decoupling of data services, making the internal implementation details of data services simpler, more efficient and clearer , flexible and extensible. the

本发明的其它特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本发明而了解。本发明的目的和其他优点可通过在所写的说明书、权利要求书、以及附图中所特别指出的结构来实现和获得。 Additional features and advantages of the invention will be set forth in the description which follows, and in part will be apparent from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention may be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings. the

下面通过附图和实施例,对本发明的技术方案做进一步的详细描述。 The technical solutions of the present invention will be described in further detail below with reference to the accompanying drawings and embodiments. the

附图说明Description of drawings

附图用来提供对本发明的进一步理解,并且构成说明书的一部分,与本发明的实施例一起用于解释本发明,并不构成对本发明的限制。在附图中: The accompanying drawings are used to provide a further understanding of the present invention, and constitute a part of the description, and are used together with the embodiments of the present invention to explain the present invention, and do not constitute a limitation to the present invention. In the attached picture:

图1为根据现有技术中的服务注册中心、服务请求方和服务提供方交互关系示意图; Figure 1 is a schematic diagram of the interaction relationship between the service registration center, the service requester and the service provider according to the prior art;

图2为本发明的数据服务协议栈的结构示意图; Fig. 2 is the structural representation of the data service protocol stack of the present invention;

图3为本发明的连接层中数据源数据格式示意图; Fig. 3 is a schematic diagram of data source data format in the connection layer of the present invention;

图4为本发明的LSQL的数据格式示意图; Fig. 4 is the data format schematic diagram of LSQL of the present invention;

图5为本发明的SQL的数据格式示意图; Fig. 5 is the data format schematic diagram of SQL of the present invention;

图6为根据本发明模型映射层中关系型数据格式示意图; Fig. 6 is a schematic diagram of the relational data format in the model mapping layer according to the present invention;

图7为根据本发明表示层的XML数据表示方式示意图; Fig. 7 is a schematic diagram of XML data representation according to the presentation layer of the present invention;

图8为根据本发明表示层的CSV数据表示方式示意图; Fig. 8 is a schematic diagram of CSV data representation according to the presentation layer of the present invention;

图9为根据本发明表示层的Excel文件类型的数据示意图; Fig. 9 is the data schematic diagram of the Excel file type according to presentation layer of the present invention;

图10为根据本发明会话层的在线请求-同步响应方式的示意图; Fig. 10 is a schematic diagram of the online request-synchronous response mode according to the session layer of the present invention;

图11为根据本发明会话层的在线请求-异步响应方式的示意图; Fig. 11 is a schematic diagram of an online request-asynchronous response mode according to the session layer of the present invention;

图12为根据本发明会话层的发布-订阅方式的示意图; Fig. 12 is a schematic diagram of a publish-subscribe mode according to the session layer of the present invention;

图13为根据本发明服务层的封装了请求消息体的SOAP请求报文数据格式示意图; Fig. 13 is a schematic diagram of the SOAP request message data format that encapsulates the request message body according to the service layer of the present invention;

图14为根据本发明服务层的封装了应答消息体的SOAP应答报文数据格式示意图; Fig. 14 is a schematic diagram of the SOAP response message data format that encapsulates the response message body according to the service layer of the present invention;

图15为根据本发明接口层的加入服务版本后的SOAP请求报文数据格式示意图; Fig. 15 is a schematic diagram of the SOAP request message data format after adding the service version according to the interface layer of the present invention;

图16为根据本发明接口层的加入服务路由后的SOAP请求报文数据格式示意图; Fig. 16 is a schematic diagram of the SOAP request message data format after adding the service route according to the interface layer of the present invention;

图17为根据本发明接口层的加入请求时间后的SOAP请求报文数据格式示意图; Fig. 17 is a schematic diagram of the SOAP request message data format after the joining request time of the interface layer according to the present invention;

图18为根据本发明接口层的加入短连接认证信息后的SOAP请求报文数据格式示意图; Fig. 18 is a schematic diagram of the SOAP request message data format after adding the short connection authentication information according to the interface layer of the present invention;

图19为根据本发明接口层的加入长连接认证信息后的SOAP请求报文数据格式示意图; Fig. 19 is a schematic diagram of the SOAP request message data format after adding persistent connection authentication information according to the interface layer of the present invention;

图20为根据本发明接口层的加入可靠请求源信息后的SOAP请求报文数据格式示意图; Figure 20 is a schematic diagram of the SOAP request message data format after adding reliable request source information according to the interface layer of the present invention;

图21为根据本发明接口层的进行数字签名后的SOAP请求报文数据格式示意图; Fig. 21 is a schematic diagram of the SOAP request message data format after carrying out the digital signature according to the interface layer of the present invention;

图22为根据本发明接口层的加入控制信息后的SOAP应答报文数据格式示意图; Fig. 22 is a schematic diagram of the SOAP response message data format after adding control information according to the interface layer of the present invention;

图23为根据本发明服务请求方向服务提供方发起服务请求的流程示意图; Figure 23 is a schematic flow diagram of a service request initiated by a service requester to a service provider according to the present invention;

图24为根据本发明步骤102中KPI指标参数的数据格式示意图; Fig. 24 is according to the data format schematic diagram of KPI index parameter in the step 102 of the present invention;

图25为根据本发明步骤104中XML格式数据的数据格式示意图; Fig. 25 is according to the data format schematic diagram of XML format data in the step 104 of the present invention;

图26为根据本发明步骤108中SOAP数据格式示意图; Fig. 26 is a schematic diagram of SOAP data format according to step 108 of the present invention;

图27为本发明发起服务请求方法实施例中步骤110封装后的数据格式示意图; Figure 27 is a schematic diagram of the data format encapsulated in step 110 in the embodiment of the method for initiating a service request in the present invention;

图28为本发明发起服务请求方法实施例中步骤112数字签名后的数据格式示意图; Figure 28 is a schematic diagram of the data format after the digital signature in step 112 in the embodiment of the method for initiating a service request in the present invention;

图29为根据本发明服务提供方对服务请求方发起的服务请求进行服务应答的流程示意图; Figure 29 is a schematic flow diagram of a service response by a service provider to a service request initiated by a service requester according to the present invention;

图30为根据本发明步骤202中数据源数据格式示意图; Fig. 30 is a schematic diagram of data source data format according to step 202 of the present invention;

图31为根据本发明步骤204中关系型数据格式示意图; Figure 31 is a schematic diagram of a relational data format according to step 204 of the present invention;

图32为根据本发明步骤206中封装后XML数据格式示意图; Figure 32 is a schematic diagram of XML data format after encapsulation in step 206 according to the present invention;

图33为本发明进行服务应答方法实施例中步骤210封装后的数据格式示意图; Figure 33 is a schematic diagram of the data format encapsulated in step 210 in the embodiment of the service response method of the present invention;

图34为本发明进行服务应答方法实施例中步骤212封装后的SOAP数据包示意图。 FIG. 34 is a schematic diagram of a SOAP data packet encapsulated in step 212 in the embodiment of the method for performing a service response in the present invention. the

具体实施方式Detailed ways

以下结合附图对本发明的优选实施例进行说明,应当理解,此处所描述的优选实施例仅用于说明和解释本发明,并不用于限定本发明。 The preferred embodiments of the present invention will be described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described here are only used to illustrate and explain the present invention, and are not intended to limit the present invention. the

现有的Web Service数据服务实现的技术方案,主要针对服务接口层面的实现,并不能深入到数据服务的内部实现细节进行规范说明,使数据服务的内部实现不能得到充分的解耦和复用,导致数据服务的内部实现比较复杂,影响数据服务的实现效率。本发明公开数据服务请求应答方法和数据服务协议栈,可以较好的解决上述问题,除了可以实现应用与数据的解耦,还可以实现数据服务内部实现的解耦,使数据服务的内部实现细节更加简单、高效、清晰、灵活、可扩展。 The existing technical solutions for implementing Web Service data services are mainly aimed at the implementation of the service interface level, and cannot go deep into the internal implementation details of the data service for specification, so that the internal implementation of the data service cannot be fully decoupled and reused. As a result, the internal implementation of data services is more complicated, which affects the implementation efficiency of data services. The invention discloses a data service request response method and a data service protocol stack, which can better solve the above problems. In addition to realizing the decoupling of the application and data, it can also realize the decoupling of the internal implementation of the data service, so that the internal implementation details of the data service More simple, efficient, clear, flexible and scalable. the

如图2所示,本发明的数据服务协议栈共划分为六层,自上而下依次是连接层、模型映射层、表示层、会话层、服务层和接口层;本发明的数据服务协议栈共分为两部分:服务请求方部分和服务提供方部分,服务请求方部分自上而下由表示层、会话层、服务层和接口层组成,服务提供方 部分自上而下由连接层、模型映射层、表示层、会话层、服务层和接口层组成;其中,服务请求方部分与服务提供方部分中的表示层、会话层、服务层和接口层的结构和功能都相同。数据服务便是由数据源数据,经过数据服务协议栈中连接层到接口层的逐层封装而成。 As shown in Figure 2, the data service protocol stack of the present invention is divided into six layers altogether, is successively connection layer, model mapping layer, presentation layer, session layer, service layer and interface layer from top to bottom; Data service protocol of the present invention The stack is divided into two parts: the service requester part and the service provider part. The service requester part is composed of presentation layer, session layer, service layer and interface layer from top to bottom, and the service provider part is composed of connection layer from top to bottom. , model mapping layer, presentation layer, session layer, service layer and interface layer; among them, the structure and function of the presentation layer, session layer, service layer and interface layer in the service requester part and service provider part are the same. The data service is formed by encapsulating the data source data layer by layer from the connection layer to the interface layer in the data service protocol stack. the

1、连接层 1. Connection layer

连接层用来实现数据服务对各种数据源的连接,以及数据源数据的操作,从而获取数据服务所需要的数据源数据。 The connection layer is used to realize the connection of data services to various data sources and the operation of data source data, so as to obtain the data source data required by data services. the

连接层通过数据源连接技术,例如JDBC、ODBC、FTP和SOAP等来实现对各种数据源的连接,并从数据源(即数据库)取得数据源数据。连接层从数据源取得数据后,以比特流形式的数据格式存在,如图3所示。 The connection layer connects to various data sources through data source connection technologies, such as JDBC, ODBC, FTP, and SOAP, and obtains data from the data source (that is, the database). After the connection layer obtains data from the data source, it exists in a data format in the form of bit stream, as shown in Figure 3. the

2、模型映射层 2. Model mapping layer

模型映射层用来实现数据服务的数据模型与数据源数据模型的映射,将数据服务的数据模型的查询语句转换为可执行的数据源的数据模型的查询语句,以及将连接层的数据源数据转换为关系型数据。 The model mapping layer is used to realize the mapping between the data model of the data service and the data source data model, convert the query statement of the data service data model into the query statement of the executable data source data model, and convert the data source data of the connection layer Convert to relational data. the

模型映射层为表示层提供的数据服务的数据模型的查询语句接口,主要可以采用标准的SQL或者LSQL(LSQL为中国移动经营分析系统数据仓库逻辑查询语言CMCC-LSQL)来实现。其中,SQL无法屏蔽数据库和数据模型之间的差异,因此主要适用于速度要求较高,数据模型差异不大的应用场景;而LSQL主要适用于速度要求不高,数据模型差异较大的应用场景。 The query statement interface of the data model provided by the model mapping layer for the data service provided by the presentation layer can mainly be realized by standard SQL or LSQL (LSQL is the logic query language CMCC-LSQL for the data warehouse of China Mobile's business analysis system). Among them, SQL cannot shield the difference between the database and the data model, so it is mainly suitable for application scenarios with high speed requirements and little difference in data models; while LSQL is mainly suitable for application scenarios with low speed requirements and large differences in data models . the

LSQL的数据格式如图4所示。 The data format of LSQL is shown in Figure 4. the

SQL的数据格式如图5所示。 The data format of SQL is shown in Figure 5. the

如果是SQL,则直接提交给连接层执行,如果是LSQL,则需要经过模型映射后转换为可执行的物理SQL,再提交给连接层执行。连接层通过连接技术将SQL提交数据库执行,并将获取的数据源数据,返回给模型映射层,模型映射层为了方便表示层的数据表示,将数据源数据转换为关系型数据,关系型数据格式如图6所示。 If it is SQL, it is directly submitted to the connection layer for execution. If it is LSQL, it needs to be converted into executable physical SQL after model mapping, and then submitted to the connection layer for execution. The connection layer submits SQL to the database for execution through the connection technology, and returns the obtained data source data to the model mapping layer. The model mapping layer converts the data source data into relational data and relational data format in order to facilitate the data representation of the presentation layer. As shown in Figure 6. the

3、表示层 3. Presentation layer

表示层用来表示数据服务交互过程中的数据,实现将模型映射层中的 关系型数据表示为数据服务交互过程中所需要的数据格式。 The presentation layer is used to represent the data in the process of data service interaction, and realize the representation of relational data in the model mapping layer as the data format required in the process of data service interaction. the

数据表示方式主要包括:XML、CSV和二进制的方式,在不同的数据服务交互过程中,数据的表示方式可能不同,如:在“在线请求-同步响应”的数据服务交互方式中采用XML作为数据的表示方式;在“在线请求-异步响应”和“发布-订阅”交互方式中的数据服务控制信息采用XML,而应答的数据内容采用CSV数据表示方式;在对数据格式有特殊要求的需求场合,可以采用二进制流的数据表示方式。 Data representation methods mainly include: XML, CSV and binary methods. In different data service interaction processes, data representation methods may be different. For example, XML is used as data in the "online request-synchronous response" data service interaction method. In the "online request-asynchronous response" and "publish-subscribe" interaction mode, the data service control information adopts XML, and the data content of the response adopts CSV data representation; in the case of special requirements for data format , you can use binary stream data representation. the

XML的数据表示方式如图7所示,CSV的数据表示方式如图8所示。 The XML data representation method is shown in Figure 7, and the CSV data representation method is shown in Figure 8. the

二进制流数据表示方式主要是根据具体应用的需要或者用户的要求,生成相应文件类型的数据,如Excel文件类型的数据,如图9所示。 The representation of binary stream data is mainly based on the needs of specific applications or user requirements to generate data of the corresponding file type, such as the data of the Excel file type, as shown in Figure 9. the

4、会话层 4. Session layer

会话层是服务请求方与服务提供方进行交互会话的场所,会话层通过不同的交互方式来表示数据服务的交互过程。 The session layer is the place where the service requester and the service provider interact with each other. The session layer represents the interaction process of data services through different interaction methods. the

会话层的数据交互方式有“在线请求-同步响应方式”、“在线请求-异步响应方式”和“发布-订阅方式”。该三种交互方式(即会话协商方式)的选择主要由数据的服务提供方决定,服务提供方根据自身数据量、实时性要求等特点,在数据服务开发时确定采用何种数据交互方式。具体说明如下: The data interaction modes of the session layer include "online request-synchronous response mode", "online request-asynchronous response mode" and "publish-subscribe mode". The choice of the three interaction methods (that is, the session negotiation method) is mainly determined by the data service provider. The service provider determines which data interaction method to use when developing data services according to its own data volume and real-time requirements. The specific instructions are as follows:

(1)在线请求-同步响应方式 (1) Online request-synchronous response method

在线请求-同步响应方式是指服务请求方向服务提供方发送数据请求,并进入阻塞状态,等待服务提供方的响应数据返回。服务提供方在接收到数据请求后,进行一系列的业务处理获取响应数据,并将响应数据回复给服务请求方。服务请求方在接收到响应数据后,中止阻塞状态继续运行。具体在线请求-同步响应方式的数据交互流程如图10所示。 The online request-synchronous response method means that the service requester sends a data request to the service provider, enters a blocking state, and waits for the response data from the service provider to return. After receiving the data request, the service provider performs a series of business processes to obtain the response data, and replies the response data to the service requester. After receiving the response data, the service requester stops the blocking state and continues to run. The specific online request-synchronous response data interaction process is shown in Figure 10. the

该方式适用于响应速度比较快,且数据量比较小的场合。由于发送数据请求的服务请求方需要阻塞运行,因此如果响应的速度比较慢,会造成服务请求方长时间阻塞不能运行,很可能会影响到服务请求方应用的正常运行;同样,如果传输的数据量比较大,那么传输的过程中请求数据的服务也需要等待,造成等待时间过长。 This method is suitable for situations where the response speed is relatively fast and the amount of data is relatively small. Since the service requester sending the data request needs to block the operation, if the response speed is relatively slow, the service requester will be blocked for a long time and cannot run, which may affect the normal operation of the service requester application; similarly, if the transmitted data If the amount is relatively large, the service requesting data during the transmission process also needs to wait, resulting in too long a waiting time. the

(2)在线请求-异步响应方式 (2) Online request-asynchronous response mode

在线请求-异步响应方式是指服务请求方调用服务提供方的“准备数据方法”,向服务提供方发送数据请求。服务提供方在接收到数据请求后,返回请求成功标志、数据准备的预估处理时间、建议定期查询数据准备情况的时间间隔和数据的获取方式等消息。服务请求方在获得上述消息后可继续运行,不需要长时间处于阻塞状态。服务提供方在返回上述消息后进行一系列的业务处理以准备数据。服务请求方在数据准备的预估处理时间到达后,按照建议定期查询数据准备情况的时间间隔,服务请求方向服务提供方发送查询数据准备情况的请求。如果数据未准备完毕,服务提供方返回数据未准备完毕的消息,服务请求方则在建议的时间间隔后继续查询;如果数据准备完毕,服务提供方返回包含何时何地如何获取数据的消息。服务请求方即可以按照给定的时间到给定的地点(FTP或HTTP地址)在给定的有效期内自行决定何时使用给定的方式(FTP或HTTP协议)取得数据。具体在线请求-异步响应方式的数据交互流程如图11所示。 The online request-asynchronous response method means that the service requester calls the service provider's "preparation data method" and sends a data request to the service provider. After receiving the data request, the service provider will return messages such as the request success flag, the estimated processing time of data preparation, the recommended time interval for regularly querying the data preparation status, and the method of data acquisition. After receiving the above message, the service requester can continue to run without being blocked for a long time. After returning the above message, the service provider performs a series of business processes to prepare the data. After the estimated processing time of data preparation arrives, the service requester will periodically query the data preparation status according to the recommended time interval, and the service requester will send a request for querying the data preparation status to the service provider. If the data is not ready, the service provider will return a message that the data is not ready, and the service requester will continue to query after the suggested time interval; if the data is ready, the service provider will return a message containing when, where and how to obtain the data. The service requester can then go to a given location (FTP or HTTP address) at a given time and within a given validity period to decide when to use a given method (FTP or HTTP protocol) to obtain data. The specific online request-asynchronous response data interaction process is shown in Figure 11. the

该方式适用于被请求的数据量产生时间比较长,或者数据量较大的场合。因为采用异步方式,不需要长时间的等待与阻塞,服务请求方可以正常运行其它功能,仅需要在接到数据准备完毕的信号之后再处理请求的数据。 This method is suitable for occasions where the requested data volume takes a long time to generate or the data volume is large. Because of the asynchronous method, there is no need for long-term waiting and blocking, and the service requester can run other functions normally, and only needs to process the requested data after receiving the signal that the data is ready. the

(3)发布-订阅方式 (3) Publish-subscribe method

发布-订阅方式是指服务请求方向服务提供方的“注册方法”注册请求数据的要求和通知服务。服务提供方在接到服务请求方的注册消息后,返回请求成功的标志。服务请求方在获得上述注册消息后,可以继续运行而不需要长时间处于阻塞状态,服务提供方在返回上述注册消息后,进行一系列的业务处理以准备数据。当数据准备完毕,服务提供方调用服务请求方注册的通知服务,告知服务请求方数据准备情况和相关的获取信息。服务请求方回复成功或失败的标志,服务请求方即可以按照给定的时间到给定的地点(FTP或HTTP地址)在给定的有效期内自行决定何时使用给定的方式(FTP或HTTP协议)取得数据,从而实现数据的触发式交互。具体发布-订阅方式的交互流程如图12所示。 The publish-subscribe method refers to the request and notification service for the service requester to register the request data with the "registration method" of the service provider. After the service provider receives the registration message from the service requester, it returns a sign that the request is successful. After the service requester obtains the above registration message, it can continue to run without being blocked for a long time. After the service provider returns the above registration message, it performs a series of business processes to prepare data. When the data preparation is completed, the service provider calls the notification service registered by the service requester to inform the service requester of the data preparation status and related acquisition information. The service requester replies with a sign of success or failure, and the service requester can go to a given location (FTP or HTTP address) at a given time and decide when to use a given method (FTP or HTTP address) within a given validity period. Protocol) to obtain data, so as to realize the triggered interaction of data. The interaction process of the specific publish-subscribe mode is shown in Figure 12. the

该方式适用于触发性传输各种数据量的数据封装服务,由于发布-订阅方式本质上是异步响应方式,因此服务请求方不需要长时间的等待与阻塞,可以正常运行其它功能。 This method is suitable for data encapsulation services that trigger the transmission of various data volumes. Since the publish-subscribe method is essentially an asynchronous response method, the service requester does not need to wait and block for a long time, and can run other functions normally. the

5、服务层 5. Service layer

服务层主要通过服务实现技术对表示层的数据做进一步的封装,把数据内容的消息体封装到数据服务的报文体中,并实现具体的数据服务。 The service layer further encapsulates the data of the presentation layer mainly through the service implementation technology, encapsulates the message body of the data content into the message body of the data service, and realizes the specific data service. the

服务层数据服务的实现主要采用Web Service技术,其中Web Service的服务提供方可以通过SOAP或者REST架构来实现。基于SOAP实现的数据服务,主要将表示层的数据内容消息体封装到SOAP协议的Body中,而基于REST实现的数据服务,主要将消息体封装到HTTP协议的报文体中。下面主要介绍基于SOAP的实现方式: The implementation of service layer data services mainly adopts Web Service technology, and the service provider of Web Service can be realized through SOAP or REST architecture. The data service based on SOAP mainly encapsulates the data content message body of the presentation layer into the Body of the SOAP protocol, while the data service based on REST mainly encapsulates the message body into the message body of the HTTP protocol. The following mainly introduces the implementation method based on SOAP:

5.1请求消息体封装 5.1 Request message body encapsulation

将表示层请求数据内容的消息体封装成SOAP请求报文的数据格式如图13所示。 Figure 13 shows the data format of encapsulating the message body of the request data content of the presentation layer into a SOAP request message. the

5.2应答消息体封装 5.2 Response message body encapsulation

将表示层应答数据内容的消息体封装成SOAP应答报文的数据格式如图14所示。 Figure 14 shows the data format of encapsulating the message body of the response data content of the presentation layer into a SOAP response message. the

6、接口层 6. Interface layer

接口层是在服务层的基础上,实现对数据服务消息头的安全、版本、路由和控制信息等的进一步封装,并将数据服务对外发布,提供给服务请求方调用,同时通过ESB(Enterprise Service Bus,即企业服务总线)技术来控制数据服务的访问,实现数据服务的集成和统一控制。 On the basis of the service layer, the interface layer realizes the further encapsulation of the security, version, routing and control information of the data service message header, and releases the data service to the outside world for the service requester to call. Bus, that is, enterprise service bus) technology to control the access of data services, and realize the integration and unified control of data services. the

基于SOAP实现的数据服务,主要将消息头封装到SOAP协议的Header中;而基于REST实现的数据服务,主要将消息头封装到HTTP协议报文头的自定义变量HeaderReq中。下面主要介绍基于SOAP的实现方式: The data service based on SOAP mainly encapsulates the message header into the Header of the SOAP protocol; while the data service based on REST mainly encapsulates the message header into the custom variable HeaderReq of the HTTP protocol header. The following mainly introduces the implementation method based on SOAP:

6.1请求消息头封装 6.1 Request header encapsulation

6.1.1服务版本 6.1.1 Service version

服务版本用于控制服务请求方对不同版本的数据服务的访问。在服务 层SOAP请求报文的基础上,封装了服务版本消息头的请求报文数据格式如图15所示。 Service versions are used to control the service requester's access to different versions of data services. On the basis of the service layer SOAP request message, the data format of the request message encapsulating the service version message header is shown in Figure 15. the

6.1.2服务路由 6.1.2 Service Routing

服务路由是将服务请求方的请求按照一定的路由规则发送到相应的服务提供方,主要应用于服务提供方进行分地区、分库等集群部署的情况。例如:可以根据地区的路由信息,将服务请求发送到该地区所在的数据服务服务器。 Service routing is to send the request of the service requester to the corresponding service provider according to certain routing rules. It is mainly used in the case where the service provider performs cluster deployment such as sub-regions and sub-databases. For example: according to the routing information of the region, the service request can be sent to the data service server where the region is located. the

在服务层SOAP请求报文的基础上,封装了服务路由消息头的请求报文数据格式如图16所示。 On the basis of the service layer SOAP request message, the data format of the request message encapsulating the service routing message header is shown in Figure 16. the

6.1.3请求时间 6.1.3 Request Time

请求时间用来标识本次数据服务访问的时间,作为访问日志的主要内容,方便日后的日志追踪排查。 The request time is used to identify the time of this data service access, as the main content of the access log, which is convenient for future log tracking and troubleshooting. the

在服务层SOAP请求报文的基础上,封装了请求时间消息头的请求报文数据格式如图17所示。 Based on the SOAP request message at the service layer, the data format of the request message encapsulating the request time header is shown in Figure 17. the

6.1.4认证鉴权 6.1.4 Authentication authentication

认证鉴权用来对服务请求方是否合法进行鉴别和确认。通过认证鉴权,可以使服务提供方确认服务请求方的身份,确定是否有该服务的访问权限。认证鉴权主要有以下两种方式: Authentication is used to identify and confirm whether the service requester is legitimate. Through authentication and authentication, the service provider can confirm the identity of the service requester and determine whether it has access to the service. There are two main methods of authentication:

(1)短连接认证 (1) Short connection authentication

短连接认证方式主要适用于外部系统对数据服务的访问,外部系统对数据服务的访问效率一般不会太高,但安全性相对较高,因此服务请求方每次请求时都要提供用户名、密码等校验信息来进行认证鉴权。 The short connection authentication method is mainly applicable to the access of external systems to data services. The access efficiency of external systems to data services is generally not too high, but the security is relatively high. Therefore, the service requester must provide the user name, Password and other verification information for authentication and authentication. the

在服务层SOAP请求报文的基础上,封装了短连接认证信息的请求报文数据格式如图18所示。 On the basis of the service layer SOAP request message, the data format of the request message encapsulating the short connection authentication information is shown in Figure 18. the

(2)长连接认证 (2) Long connection authentication

长连接认证方式主要适用于系统内部应用对数据服务的访问,内部应用对数据服务的访问效率一般会比较高,安全性也比较可靠,因此服务请求方只需在首次访问服务提供方的用户认证服务时,提供用户名、密码认证信息,经过认证通过后,服务提供方为服务请求方生成唯一的令牌信息, 服务请求方在令牌的有效期内,无需每次请求都提供用户名、密码等校验信息。 The persistent connection authentication method is mainly applicable to the access of data services by internal applications of the system. The access efficiency of internal applications to data services is generally higher and the security is more reliable. Therefore, the service requester only needs to authenticate the user when accessing the service provider for the first time. When serving, provide user name and password authentication information. After passing the authentication, the service provider generates unique token information for the service requester. The service requester does not need to provide the user name and password for each request within the validity period of the token. Wait for verification information. the

在服务层SOAP请求报文的基础上,封装了长连接认证信息的请求报文数据格式如图19所示。 Based on the SOAP request message at the service layer, the data format of the request message encapsulating the persistent connection authentication information is shown in Figure 19. the

6.1.5可靠请求源 6.1.5 Reliable request source

可靠请求源用来控制某个请求来源是否需要安全校验功能,对于受信任的系统,允许用户不经过安全校验,就能访问数据服务,可以减少受信任系统的开发工作。 The reliable request source is used to control whether a certain request source needs the security verification function. For a trusted system, users are allowed to access data services without passing the security verification, which can reduce the development work of the trusted system. the

在服务层SOAP请求报文的基础上,封装了可靠请求源信息的请求报文数据格式如图20所示。 Based on the SOAP request message at the service layer, the data format of the request message encapsulating reliable request source information is shown in Figure 20. the

6.1.6数字签名 6.1.6 Digital signature

数字签名是基于非对称加密技术的安全机制,通过数字签名技术可以保障数据或业务流量信息的机密性,以及预防客户端的抵赖行为。 Digital signature is a security mechanism based on asymmetric encryption technology. Digital signature technology can ensure the confidentiality of data or business flow information and prevent client denial. the

对SOAP请求报文进行数字签名后的数据格式如图21所示。 Figure 21 shows the data format after digitally signing the SOAP request message. the

6.2应答消息头封装 6.2 Response header encapsulation

应答消息头中主要封装了数据服务的应答时间、应答结果、应答错误编码、应答错误信息等控制信息内容,作为服务请求方对应答成功或者失败的判断依据,以及失败原因的分析。 The response message header mainly encapsulates the response time, response result, response error code, response error information and other control information content of the data service, which is used as the basis for the service requester to judge the success or failure of the response and analyze the cause of the failure. the

在服务层SOAP应答报文的基础上,封装了控制信息的应答报文数据格式如图22所示。 Based on the SOAP response message at the service layer, the data format of the response message that encapsulates the control information is shown in Figure 22. the

方法实施例method embodiment

下面以在线请求-同步响应交互方式的“关键指标监控”应用场景为例,来说明数据服务协议栈在服务请求和服务应答过程中,进行协议包封装及解析的流程。 The following takes the "key indicator monitoring" application scenario of online request-synchronous response interaction as an example to illustrate the process of encapsulation and analysis of protocol packets by the data service protocol stack in the process of service request and service response. the

服务请求流程 Service Request Process

“关键指标监控”应用通过服务请求方向服务提供方发起服务请求时,数据服务协议栈进行协议包封装及解析的流程,如图23所示。 When the "key indicator monitoring" application initiates a service request to the service provider through a service request, the data service protocol stack performs protocol packet encapsulation and analysis, as shown in Figure 23. the

具体流程步骤如下: The specific process steps are as follows:

步骤102:“关键指标监控”应用通过服务请求方的界面输入KPI指 标参数,向服务提供方发起应用请求,KPI指标参数如图24所示; Step 102: The "key indicator monitoring" application inputs KPI index parameters through the interface of the service requester, and initiates an application request to the service provider. The KPI index parameters are shown in Figure 24;

步骤104:服务请求方将KPI指标参数通过数据服务协议栈的表示层,封装到XML(Extensible Markup Language,可扩展标记语言)中,封装后的XML格式数据如图25所示。 Step 104: The service requester encapsulates the KPI index parameters into XML (Extensible Markup Language, Extensible Markup Language) through the presentation layer of the data service protocol stack, and the encapsulated XML format data is shown in FIG. 25 . the

步骤106:服务请求方根据服务的交互方式,通过数据服务协议栈的会话层发起在线请求-同步响应方式的会话; Step 106: The service requester initiates an online request-synchronous response session through the session layer of the data service protocol stack according to the interaction mode of the service;

步骤108:服务请求方通过数据服务协议栈的服务层,将XML数据封装到SOAP数据包的包体中,封装后的SOAP数据格式如图26所示。步骤110:服务请求方通过数据服务协议栈的接口层,对SOAP数据包的包头,进行服务版本、路由、请求源和认证鉴权等封装操作,封装后的数据格式如图27所示; Step 108: The service requester encapsulates the XML data into the body of the SOAP data packet through the service layer of the data service protocol stack. The format of the encapsulated SOAP data is shown in FIG. 26 . Step 110: The service requester performs encapsulation operations such as service version, routing, request source and authentication on the header of the SOAP data packet through the interface layer of the data service protocol stack, and the encapsulated data format is shown in Figure 27;

步骤112:服务请求方通过数据服务协议栈的接口层,对SOAP数据包进行数字签名操作,签名后的数据格式如图28所示; Step 112: The service requester digitally signs the SOAP data packet through the interface layer of the data service protocol stack, and the signed data format is shown in Figure 28;

步骤114:服务请求方将封装完成后的SOAP数据包,以在线请求-同步响应方式,通过HTTP通道发送给服务提供方; Step 114: The service requester sends the encapsulated SOAP packet to the service provider through the HTTP channel in an online request-synchronous response mode;

步骤116:服务提供方接收到服务请求后,通过数据服务协议栈的接口层进行SOAP数据包的数字签名认证和数据解密,并对SOAP数据包的包头进行解析,进行认证鉴权、请求源、路由和版本等控制,然后获取SOAP数据包的包体发送给数据服务协议栈的服务层; Step 116: After receiving the service request, the service provider performs digital signature authentication and data decryption of the SOAP data packet through the interface layer of the data service protocol stack, and parses the header of the SOAP data packet to perform authentication, authentication, request source, Routing and version control, and then get the body of the SOAP data packet and send it to the service layer of the data service protocol stack;

步骤118:服务提供方通过数据服务协议栈的服务层,对SOAP数据包的包体进行解析,获取服务数据请求内容的XML数据; Step 118: The service provider analyzes the body of the SOAP data packet through the service layer of the data service protocol stack, and obtains the XML data of the content of the service data request;

步骤120:服务提供方通过数据服务协议栈的会话层,获知目前的交互方式为在线请求-同步响应方式后,通过同步方式将请求的XML数据转发给数据服务协议栈的表示层; Step 120: After learning that the current interaction mode is online request-synchronous response mode through the session layer of the data service protocol stack, the service provider forwards the requested XML data to the presentation layer of the data service protocol stack in a synchronous manner;

步骤122:服务提供方通过表示层,对XML数据进行解析,获取服务请求的KPI参数; Step 122: The service provider parses the XML data through the presentation layer to obtain the KPI parameters of the service request;

步骤124:服务提供方通过数据服务协议栈的模型映射层,将KPI指标参数组装成KPI信息查询的SQL语句; Step 124: The service provider assembles KPI index parameters into SQL statements for KPI information query through the model mapping layer of the data service protocol stack;

步骤126:服务提供方通过数据服务协议栈的连接层,将SQL语句通 过JDBC连接技术,提交到数据库中执行,自数据库中获取服务数据(即数据源数据)。 Step 126: The service provider submits the SQL statement to the database for execution through the connection layer of the data service protocol stack through the JDBC connection technology, and obtains the service data (that is, the data source data) from the database. the

服务应答流程 Service response process

服务提供方对“关键指标监控”应用发起的服务请求进行服务应答时,数据服务协议进行数据包的封装及解析的流程,如图29所示。 When the service provider responds to the service request initiated by the "key indicator monitoring" application, the data service protocol encapsulates and parses the data packet, as shown in Figure 29. the

具体流程步骤如下: The specific process steps are as follows:

步骤202:服务提供方通过数据服务协议栈的连接层,自数据库中获取到服务数据(即数据源数据),数据源数据格式如图30所示。 Step 202: The service provider obtains service data (that is, data source data) from the database through the connection layer of the data service protocol stack. The format of the data source data is shown in FIG. 30 . the

步骤204:服务提供方通过数据服务协议栈的模型映射层,将数据源数据转换为关系型数据,方便数据服务协议栈的表示层的封装,转换后的关系型数据如图31所示。 Step 204: The service provider converts the data source data into relational data through the model mapping layer of the data service protocol stack to facilitate the encapsulation of the presentation layer of the data service protocol stack. The converted relational data is shown in FIG. 31 . the

步骤206:服务提供方通过数据服务协议栈的表示层,将模型映射层中的关系型数据封装到XML中,封装后的XML数据格式如图32所示。 Step 206: The service provider encapsulates the relational data in the model mapping layer into XML through the presentation layer of the data service protocol stack. The format of the encapsulated XML data is shown in FIG. 32 . the

步骤208:服务提供方通过数据服务协议栈的会话层,判断本次交互为在线请求-同步响应的方式,将XML数据转发给数据服务协议栈的服务层; Step 208: The service provider judges that this interaction is an online request-synchronous response through the session layer of the data service protocol stack, and forwards the XML data to the service layer of the data service protocol stack;

步骤210:服务提供方通过数据服务协议栈的服务层,将XML数据封装到SOAP数据包的包体中,封装后的数据格式如图33所示; Step 210: The service provider encapsulates the XML data into the body of the SOAP data packet through the service layer of the data service protocol stack, and the encapsulated data format is shown in Figure 33;

步骤212:服务提供方通过数据服务协议栈的接口层,对SOAP数据包的包头,进行应答结果、应答时间、应答编码和应答描述等控制信息的封装,并将SOAP数据包发送给服务请求方,封装后的SOAP数据包如图34所示; Step 212: The service provider encapsulates the control information such as response result, response time, response code and response description to the header of the SOAP data packet through the interface layer of the data service protocol stack, and sends the SOAP data packet to the service requester , the encapsulated SOAP packet is shown in Figure 34;

步骤214:服务请求方依次通过接口层、服务层、会话层、表示层对SOAP数据包进行解析,最终获取到数据源数据,并通过“关键指标监控”应用展现出来。 Step 214: The service requester parses the SOAP data packet sequentially through the interface layer, service layer, session layer, and presentation layer, and finally obtains the data source data, and displays them through the "key indicator monitoring" application. the

本发明的数据请求应答方法,不仅可以实现应用与数据的解耦,还可以实现数据服务内部的解耦,使数据服务的内部实现细节更加简单、高效、清晰、灵活和可扩展。 The data request response method of the present invention can not only realize the decoupling of applications and data, but also realize the internal decoupling of data services, making the internal implementation details of data services simpler, more efficient, clearer, more flexible and scalable. the

协议栈实施例Protocol Stack Embodiment

根据本发明实施例,提供了一种数据服务协议栈。本实施例包括: According to an embodiment of the present invention, a data service protocol stack is provided. This example includes:

表示层,用于将服务指标参数封装成可扩展标记语言数据,对可扩展标记语言数据进行解析,获取服务指标参数; The presentation layer is used to encapsulate the service indicator parameters into XML data, analyze the XML data, and obtain the service indicator parameters;

会话层,用于根据服务的交互类型发起会话请求,获知服务的交互类型,根据服务的交互类型将可扩展标记语言数据转发至表示层; The session layer is used to initiate a session request according to the interaction type of the service, obtain the interaction type of the service, and forward the extensible markup language data to the presentation layer according to the interaction type of the service;

服务层,用于将可扩展标记语言数据封装到SOAP数据包或HTTP数据包的包体中,对SOAP数据包或HTTP数据包的包体进行解析,获取可扩展标记语言数据; The service layer is used to encapsulate the extensible markup language data into the body of the SOAP data packet or the HTTP data packet, parse the body of the SOAP data packet or the HTTP data packet, and obtain the extensible markup language data;

接口层,用于对SOAP数据包或HTTP数据包的包头进行服务版本、路由、请求源和认证鉴权的封装操作,对SOAP数据包或HTTP数据包的包头进行解析,进行认证鉴权、请求源、路由和服务版本的控制操作,获取SOAP数据包或HTTP数据包的包体; The interface layer is used for encapsulating the service version, routing, request source and authentication authentication on the header of SOAP data packet or HTTP data packet, parsing the header of SOAP data packet or HTTP data packet, performing authentication authentication, request Source, route and service version control operations, get the body of SOAP data packet or HTTP data packet;

模型映射层,用于将服务指标参数组装成服务查询指令; The model mapping layer is used to assemble service index parameters into service query instructions;

连接层,用于将服务查询指令提交到数据库中执行,自数据库中获取服务数据。 The connection layer is used to submit service query instructions to the database for execution, and obtain service data from the database. the

其中: in:

接口层,还用于对SOAP数据包或HTTP数据包进行数字签名的操作,对SOAP数据包或HTTP数据包进行数字签名认证和数据解密。 The interface layer is also used for performing digital signature operations on SOAP data packets or HTTP data packets, and performing digital signature authentication and data decryption on SOAP data packets or HTTP data packets. the

其中: in:

接口层,还用于将数据服务对外发布,提供给服务请求方调用,并且通过企业服务总线控制数据服务的访问,实现数据服务的集成和统一控制。 The interface layer is also used to publish data services to the outside world, provide them to the service requester to call, and control the access of data services through the enterprise service bus, so as to realize the integration and unified control of data services. the

其中: in:

模型映射层,还用于实现数据服务的数据模型与数据库数据模型的映射。 The model mapping layer is also used to realize the mapping between the data model of the data service and the data model of the database. the

根据本发明实施例,提供了一种数据服务协议栈。本实施例包括: According to an embodiment of the present invention, a data service protocol stack is provided. This example includes:

连接层,用于自数据库中获取服务数据; The connection layer is used to obtain service data from the database;

模型映射层,用于将服务数据转换为关系型数据; Model mapping layer, used to convert service data into relational data;

表示层,用于将关系型数据封装成可扩展标记语言数据; Presentation layer, used to encapsulate relational data into Extensible Markup Language data;

会话层,用于获知服务的交互类型,根据服务的交互类型将可扩展标记语言数据转发至服务层; The session layer is used to learn the interaction type of the service, and forward the extensible markup language data to the service layer according to the interaction type of the service;

服务层,用于将可扩展标记语言数据封装到SOAP数据包或HTTP数据包的包体中; The service layer is used to encapsulate the extensible markup language data into the body of the SOAP data packet or HTTP data packet;

接口层,用于对SOAP数据包或HTTP数据包的包头进行应答结果、应答时间、应答编码和应答描述的控制信息的封装操作。 The interface layer is used for encapsulating the response result, response time, response encoding and control information described in the response to the header of the SOAP data packet or HTTP data packet. the

本发明的数据服务协议栈,不仅可以实现应用与数据的解耦,还可以实现数据服务内部的解耦,使数据服务的内部实现细节更加简单、高效、清晰、灵活和可扩展。 The data service protocol stack of the present invention can not only realize the decoupling of applications and data, but also realize the decoupling of the internal data service, making the internal implementation details of the data service more simple, efficient, clear, flexible and scalable. the

本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。 Those of ordinary skill in the art can understand that all or part of the steps for realizing the above-mentioned method embodiments can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the It includes the steps of the above method embodiments; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other various media that can store program codes. the

最后应说明的是:以上所述仅为本发明的优选实施例而已,并不用于限制本发明,尽管参照前述实施例对本发明进行了详细的说明,对于本领域的技术人员来说,其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。 Finally, it should be noted that: the above is only a preferred embodiment of the present invention, and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, for those skilled in the art, it still The technical solutions recorded in the foregoing embodiments may be modified, or some technical features thereof may be equivalently replaced. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the protection scope of the present invention. the

Claims (13)

Translated fromChinese
1.一种数据服务请求方法,其特征在于,包括:1. A data service request method, characterized in that, comprising:服务请求方通过数据服务协议栈的表示层、会话层、服务层和接口层将服务指标参数封装到SOAP数据包或HTTP数据包;The service requester encapsulates the service indicator parameters into SOAP data packets or HTTP data packets through the presentation layer, session layer, service layer and interface layer of the data service protocol stack;服务请求方将封装后的SOAP数据包或HTTP数据包发送给服务提供方,以使服务提供方将所述SOAP数据包或HTTP数据包进行解析处理后获得服务查询指令,自数据库中获取服务数据。The service requester sends the encapsulated SOAP data packet or HTTP data packet to the service provider, so that the service provider parses the SOAP data packet or HTTP data packet to obtain a service query instruction and obtain service data from the database .2.根据权利要求1所述的方法,其特征在于,服务提供方将所述SOAP数据包或HTTP数据包进行解析后获得服务查询指令,自数据库中获取服务数据的步骤包括:2. The method according to claim 1, wherein the service provider obtains a service query instruction after parsing the SOAP packet or the HTTP packet, and the step of obtaining service data from the database comprises:服务提供方通过数据服务协议栈的接口层、服务层、会话层和表示层对所述SOAP数据包或HTTP数据包进行解析后获得所述服务指标参数;The service provider obtains the service index parameter after parsing the SOAP data packet or the HTTP data packet through the interface layer, service layer, session layer and presentation layer of the data service protocol stack;服务提供方通过数据服务协议栈的模型映射层和连接层根据所述服务指标参数组成服务查询指令提交到数据库中执行,自数据库中获取服务数据。The service provider composes a service query instruction according to the service index parameters through the model mapping layer and connection layer of the data service protocol stack, submits it to the database for execution, and obtains service data from the database.3.根据权利要求1所述的方法,其特征在于,将服务指标参数封装到SOAP数据包或HTTP数据包的步骤包括:3. The method according to claim 1, wherein the step of encapsulating the service index parameter into a SOAP packet or an HTTP packet comprises:将服务指标参数通过数据服务协议栈的表示层封装成可扩展标记语言数据,根据服务的交互类型通过数据服务协议栈的会话层发起会话请求;Encapsulate the service indicator parameters into Extensible Markup Language data through the presentation layer of the data service protocol stack, and initiate a session request through the session layer of the data service protocol stack according to the interaction type of the service;通过数据服务协议栈的服务层将可扩展标记语言数据封装到SOAP数据包或HTTP数据包的包体中;Encapsulate the Extensible Markup Language data into the body of a SOAP data packet or HTTP data packet through the service layer of the data service protocol stack;通过数据服务协议栈的接口层对SOAP数据包或HTTP数据包的包头进行服务版本、路由、请求源和认证鉴权的封装操作。Through the interface layer of the data service protocol stack, the encapsulation operation of the service version, route, request source and authentication is performed on the header of the SOAP data packet or HTTP data packet.4.根据权利要求1所述的方法,其特征在于,在将服务指标参数封装到SOAP数据包或HTTP数据包的步骤与将封装后的SOAP数据包或HTTP数据包发送给服务提供方的步骤之间还包括:4. The method according to claim 1, characterized in that, in the step of encapsulating the service index parameters into SOAP packets or HTTP packets and the step of sending the encapsulated SOAP packets or HTTP packets to the service provider Between also include:通过数据服务协议栈的接口层对所述SOAP数据包或HTTP数据包进行数字签名的操作。The operation of digitally signing the SOAP data packet or the HTTP data packet through the interface layer of the data service protocol stack.5.根据权利要求4所述的方法,其特征在于,对所述SOAP数据包或HTTP数据包进行解析后获得所述服务指标参数的步骤包括:5. The method according to claim 4, wherein the step of obtaining the service index parameter after parsing the SOAP packet or the HTTP packet comprises:通过数据服务协议栈的接口层对SOAP数据包或HTTP数据包进行数字签名认证和数据解密;Perform digital signature authentication and data decryption on SOAP data packets or HTTP data packets through the interface layer of the data service protocol stack;通过数据服务协议栈的接口层对SOAP数据包或HTTP数据包的包头进行解析,进行认证鉴权、请求源、路由和服务版本的控制操作,获取SOAP数据包或HTTP数据包的包体;Through the interface layer of the data service protocol stack, analyze the header of the SOAP data packet or HTTP data packet, perform authentication, request source, routing and service version control operations, and obtain the body of the SOAP data packet or HTTP data packet;通过数据服务协议栈的服务层对SOAP数据包或HTTP数据包的包体进行解析,获取所述可扩展标记语言数据;Analyzing the body of the SOAP data packet or the HTTP data packet through the service layer of the data service protocol stack to obtain the extensible markup language data;通过数据服务协议栈的会话层,获知服务的交互类型,根据服务的交互类型将所述可扩展标记语言数据转发至数据服务协议栈的表示层;Through the session layer of the data service protocol stack, the interaction type of the service is known, and the extensible markup language data is forwarded to the presentation layer of the data service protocol stack according to the interaction type of the service;通过数据服务协议栈的表示层对所述可扩展标记语言数据进行解析,获取服务指标参数。The extensible markup language data is parsed through the presentation layer of the data service protocol stack to obtain service index parameters.6.根据权利要求2所述的方法,其特征在于,根据所述服务指标参数组成服务查询指令提交到数据库中执行,自数据库中获取服务数据的步骤具体包括:6. The method according to claim 2, characterized in that, according to the service index parameters, the service query instruction is composed and submitted to the database for execution, and the step of obtaining service data from the database specifically includes:通过数据服务协议栈的模型映射层将服务指标参数组装成服务查询指令;Assemble service indicator parameters into service query instructions through the model mapping layer of the data service protocol stack;通过数据服务协议栈的连接层将所述服务查询指令提交到数据库中执行,自数据库中获取服务数据。The service query instruction is submitted to the database for execution through the connection layer of the data service protocol stack, and the service data is obtained from the database.7.一种数据服务应答方法,其特征在于,包括:7. A data service response method, characterized in that, comprising:服务提供方通过数据服务协议栈的连接层自数据库中获取服务数据,通过数据服务协议栈的模型映射层、表示层、会话层、服务层和接口层将所述服务数据封装成SOAP数据包或HTTP数据包;The service provider obtains service data from the database through the connection layer of the data service protocol stack, and encapsulates the service data into SOAP data packets or HTTP packets;服务提供方将封装后的SOAP数据包或HTTP数据包发送给服务请求方,以使服务请求方通过数据服务协议栈的接口层、服务层、会话层和表示层对所述SOAP数据包或HTTP数据包进行解析后,获取所述服务数据。The service provider sends the encapsulated SOAP data packet or HTTP data packet to the service requester, so that the service requester passes the interface layer, service layer, session layer and presentation layer of the data service protocol stack to the SOAP data packet or HTTP data packet. After the data packet is parsed, the service data is obtained.8.根据权利要求7所述的方法,其特征在于,将服务数据封装成SOAP数据包或HTTP数据包的步骤包括:8. The method according to claim 7, wherein the step of encapsulating service data into a SOAP packet or an HTTP packet comprises:将所述服务数据通过数据服务协议栈的模型映射层转换为关系型数据,并将该关系型数据通过数据服务协议栈的表示层封装成可扩展标记语言数据;Converting the service data into relational data through the model mapping layer of the data service protocol stack, and encapsulating the relational data into Extensible Markup Language data through the presentation layer of the data service protocol stack;通过数据服务协议栈的会话层,获知服务的交互类型,根据服务的交互类型将所述可扩展标记语言数据转发至数据服务协议栈的服务层;Through the session layer of the data service protocol stack, the interaction type of the service is known, and the extensible markup language data is forwarded to the service layer of the data service protocol stack according to the interaction type of the service;将所述可扩展标记语言数据通过数据服务协议栈的服务层封装到SOAP数据包或HTTP数据包的包体中;Encapsulating the extensible markup language data into the body of a SOAP data packet or an HTTP data packet through the service layer of the data service protocol stack;通过数据服务协议栈的接口层对所述SOAP数据包或HTTP数据包的包头进行应答结果、应答时间、应答编码和应答描述的控制信息的封装操作。Through the interface layer of the data service protocol stack, the encapsulation operation of the response result, the response time, the response coding and the control information described in the response is performed on the header of the SOAP data packet or the HTTP data packet.9.一种数据服务协议栈,其特征在于,包括:9. A data service protocol stack, characterized in that, comprising:表示层,用于将服务指标参数封装成可扩展标记语言数据,对可扩展标记语言数据进行解析,获取服务指标参数;The presentation layer is used to encapsulate the service indicator parameters into XML data, analyze the XML data, and obtain the service indicator parameters;会话层,用于根据服务的交互类型发起会话请求,获知服务的交互类型,根据服务的交互类型将所述可扩展标记语言数据转发至表示层;The session layer is configured to initiate a session request according to the interaction type of the service, obtain the interaction type of the service, and forward the extensible markup language data to the presentation layer according to the interaction type of the service;服务层,用于将可扩展标记语言数据封装到SOAP数据包或HTTP数据包的包体中,对SOAP数据包或HTTP数据包的包体进行解析,获取所述可扩展标记语言数据;The service layer is used to encapsulate the extensible markup language data into the body of the SOAP data packet or the HTTP data packet, analyze the body of the SOAP data packet or the HTTP data packet, and obtain the extensible markup language data;接口层,用于对SOAP数据包或HTTP数据包的包头进行服务版本、路由、请求源和认证鉴权的封装操作,对SOAP数据包或HTTP数据包的包头进行解析,进行认证鉴权、请求源、路由和服务版本的控制操作,获取SOAP数据包或HTTP数据包的包体;The interface layer is used for encapsulating the service version, routing, request source and authentication authentication on the header of SOAP data packet or HTTP data packet, parsing the header of SOAP data packet or HTTP data packet, performing authentication authentication, request Source, route and service version control operations, get the body of SOAP data packet or HTTP data packet;模型映射层,用于将服务指标参数组装成服务查询指令;The model mapping layer is used to assemble service index parameters into service query instructions;连接层,用于将所述服务查询指令提交到数据库中执行,自数据库中获取服务数据。The connection layer is used to submit the service query instruction to the database for execution, and obtain service data from the database.10.根据权利要求9所述的协议栈,其特征在于,还包括:10. The protocol stack according to claim 9, further comprising:接口层,还用于对所述SOAP数据包或HTTP数据包进行数字签名的操作,对SOAP数据包或HTTP数据包进行数字签名认证和数据解密。The interface layer is also used for digitally signing the SOAP data packet or HTTP data packet, and performing digital signature authentication and data decryption on the SOAP data packet or HTTP data packet.11.根据权利要求9所述的协议栈,其特征在于,还包括:11. The protocol stack according to claim 9, further comprising:接口层,还用于将数据服务对外发布,提供给服务请求方调用,并且通过企业服务总线控制数据服务的访问,实现数据服务的集成和统一控制。The interface layer is also used to publish data services to the outside world, provide them to the service requester to call, and control the access of data services through the enterprise service bus, so as to realize the integration and unified control of data services.12.根据权利要求9所述的协议栈,其特征在于,还包括:12. The protocol stack according to claim 9, further comprising:模型映射层,还用于实现数据服务的数据模型与数据库数据模型的映射。The model mapping layer is also used to realize the mapping between the data model of the data service and the data model of the database.13.一种数据服务协议栈,其特征在于,包括:13. A data service protocol stack, characterized in that, comprising:连接层,用于自数据库中获取服务数据;The connection layer is used to obtain service data from the database;模型映射层,用于将所述服务数据转换为关系型数据;a model mapping layer, configured to convert the service data into relational data;表示层,用于将所述关系型数据封装成可扩展标记语言数据;A presentation layer, configured to encapsulate the relational data into Extensible Markup Language data;会话层,用于获知服务的交互类型,根据服务的交互类型将所述可扩展标记语言数据转发至服务层;The session layer is used to learn the interaction type of the service, and forward the extensible markup language data to the service layer according to the interaction type of the service;服务层,用于将所述可扩展标记语言数据封装到SOAP数据包或HTTP数据包的包体中;The service layer is used to encapsulate the extensible markup language data into the body of a SOAP data packet or an HTTP data packet;接口层,用于对所述SOAP数据包或HTTP数据包的包头进行应答结果、应答时间、应答编码和应答描述的控制信息的封装操作。The interface layer is used for encapsulating the response result, response time, response encoding and control information described in the response to the header of the SOAP data packet or HTTP data packet.
CN201110362878.6A2011-11-162011-11-16 Data service request response method and design method of data service protocol stackActiveCN103117983B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201110362878.6ACN103117983B (en)2011-11-162011-11-16 Data service request response method and design method of data service protocol stack

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201110362878.6ACN103117983B (en)2011-11-162011-11-16 Data service request response method and design method of data service protocol stack

Publications (2)

Publication NumberPublication Date
CN103117983Atrue CN103117983A (en)2013-05-22
CN103117983B CN103117983B (en)2015-11-04

Family

ID=48416258

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201110362878.6AActiveCN103117983B (en)2011-11-162011-11-16 Data service request response method and design method of data service protocol stack

Country Status (1)

CountryLink
CN (1)CN103117983B (en)

Cited By (20)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN103577590A (en)*2013-11-122014-02-12北京润乾信息系统技术有限公司Data query method and system
CN103139234B (en)*2011-11-232016-01-20中国移动通信集团公司A kind of device and method of data, services encapsulation
CN105631568A (en)*2014-10-302016-06-01博世包装技术(杭州)有限公司Communication method and device
CN105871979A (en)*2015-11-302016-08-17乐视致新电子科技(天津)有限公司Upgrade version detection method, device and system
CN106331080A (en)*2016-08-192017-01-11明算科技(北京)股份有限公司SOA (Service-oriented architecture)-based resource cooperation system and method
CN106850502A (en)*2015-12-042017-06-13阿里巴巴集团控股有限公司Service request retransmission method, storage method, apparatus and system based on connection long
CN107071058A (en)*2017-05-242017-08-18深圳市可可卓科科技有限公司Asynchronous data upload process method and system
CN107104932A (en)*2016-02-232017-08-29中兴通讯股份有限公司Key updating method, apparatus and system
CN107295007A (en)*2017-07-312017-10-24浪潮天元通信信息系统有限公司A kind of method of servicing for supporting various protocols, apparatus and system
CN107609424A (en)*2017-10-302018-01-19国网江苏省电力公司电力科学研究院A kind of intelligent substation data organization system for being adapted to more producer's configuration tool accesses
CN109117152A (en)*2018-07-262019-01-01新华三大数据技术有限公司Service creation system and method
CN109542816A (en)*2018-10-292019-03-29中国电子科技集团公司第二十九研究所A kind of service bus building method based on distributed system
CN109710675A (en)*2018-12-262019-05-03深圳乐信软件技术有限公司 A storage database switching method, device, server and storage medium
CN109857379A (en)*2019-01-182019-06-07广州九尾信息科技有限公司A kind of method and device of data service encapsulation
WO2019184801A1 (en)*2018-03-292019-10-03中兴通讯股份有限公司Network management method and apparatus
WO2019228515A1 (en)*2018-05-312019-12-05华为技术有限公司Remote procedure call protocol self-adaptation method, related device, and server
CN111683148A (en)*2020-06-092020-09-18吉林亿联银行股份有限公司Service processing system and method, service publishing method
CN115017128A (en)*2022-05-262022-09-06上海介方信息技术有限公司Lightweight log service design method and system based on CORBA middleware
CN117436053A (en)*2023-12-202024-01-23永鼎行远(南京)信息科技有限公司Data service bus system and data authentication transmission method
CN117494163A (en)*2023-11-062024-02-02深圳市马博士网络科技有限公司Data service method and device based on security rules

Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20050027871A1 (en)*2003-06-052005-02-03William BradleyInteroperable systems and methods for peer-to-peer service orchestration
CN101964739A (en)*2009-07-222011-02-02中国移动通信集团公司Data transmission method, device and system
CN102081605A (en)*2009-11-302011-06-01中国移动通信集团上海有限公司Data warehouse-based data encapsulation device and service data acquisition method
CN102110110A (en)*2009-12-282011-06-29中国移动通信集团公司Method and device for data access based on SOA (Service-Oriented Architecture)

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20050027871A1 (en)*2003-06-052005-02-03William BradleyInteroperable systems and methods for peer-to-peer service orchestration
CN101964739A (en)*2009-07-222011-02-02中国移动通信集团公司Data transmission method, device and system
CN102081605A (en)*2009-11-302011-06-01中国移动通信集团上海有限公司Data warehouse-based data encapsulation device and service data acquisition method
CN102110110A (en)*2009-12-282011-06-29中国移动通信集团公司Method and device for data access based on SOA (Service-Oriented Architecture)

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
SHUJUN PEI 等: "Implementation of Web Services Composition System Based on SOA", 《2011 INTERNATIONAL CONFERENCE ON UNCERTAINTY REASONING AND KNOWLEDGE ENGINEERING (URKE)》*
高岩 等: "基于SOA架构的Web服务组合系统", 《小型微型计算机系统》*

Cited By (29)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN103139234B (en)*2011-11-232016-01-20中国移动通信集团公司A kind of device and method of data, services encapsulation
CN103577590A (en)*2013-11-122014-02-12北京润乾信息系统技术有限公司Data query method and system
CN105631568A (en)*2014-10-302016-06-01博世包装技术(杭州)有限公司Communication method and device
CN105871979A (en)*2015-11-302016-08-17乐视致新电子科技(天津)有限公司Upgrade version detection method, device and system
CN106850502A (en)*2015-12-042017-06-13阿里巴巴集团控股有限公司Service request retransmission method, storage method, apparatus and system based on connection long
CN107104932A (en)*2016-02-232017-08-29中兴通讯股份有限公司Key updating method, apparatus and system
CN106331080A (en)*2016-08-192017-01-11明算科技(北京)股份有限公司SOA (Service-oriented architecture)-based resource cooperation system and method
CN107071058A (en)*2017-05-242017-08-18深圳市可可卓科科技有限公司Asynchronous data upload process method and system
CN107295007A (en)*2017-07-312017-10-24浪潮天元通信信息系统有限公司A kind of method of servicing for supporting various protocols, apparatus and system
CN107609424A (en)*2017-10-302018-01-19国网江苏省电力公司电力科学研究院A kind of intelligent substation data organization system for being adapted to more producer's configuration tool accesses
WO2019184801A1 (en)*2018-03-292019-10-03中兴通讯股份有限公司Network management method and apparatus
CN110324837A (en)*2018-03-292019-10-11中兴通讯股份有限公司A kind of network management and device
CN110324837B (en)*2018-03-292022-03-08中兴通讯股份有限公司Network management method and device
WO2019228515A1 (en)*2018-05-312019-12-05华为技术有限公司Remote procedure call protocol self-adaptation method, related device, and server
CN109117152B (en)*2018-07-262022-02-25新华三大数据技术有限公司Service generation system and method
CN109117152A (en)*2018-07-262019-01-01新华三大数据技术有限公司Service creation system and method
CN109542816A (en)*2018-10-292019-03-29中国电子科技集团公司第二十九研究所A kind of service bus building method based on distributed system
CN109542816B (en)*2018-10-292021-05-18中国电子科技集团公司第二十九研究所Service bus construction method based on distributed system
CN109710675A (en)*2018-12-262019-05-03深圳乐信软件技术有限公司 A storage database switching method, device, server and storage medium
CN109857379B (en)*2019-01-182023-09-05广州九尾信息科技有限公司Method and device for packaging data service
CN109857379A (en)*2019-01-182019-06-07广州九尾信息科技有限公司A kind of method and device of data service encapsulation
CN111683148A (en)*2020-06-092020-09-18吉林亿联银行股份有限公司Service processing system and method, service publishing method
CN111683148B (en)*2020-06-092023-01-31吉林亿联银行股份有限公司Service processing system and method, service publishing method
CN115017128A (en)*2022-05-262022-09-06上海介方信息技术有限公司Lightweight log service design method and system based on CORBA middleware
CN115017128B (en)*2022-05-262023-02-10上海介方信息技术有限公司Lightweight log service design method and system based on CORBA middleware
CN117494163A (en)*2023-11-062024-02-02深圳市马博士网络科技有限公司Data service method and device based on security rules
CN117494163B (en)*2023-11-062024-05-31深圳市马博士网络科技有限公司Data service method and device based on security rules
CN117436053A (en)*2023-12-202024-01-23永鼎行远(南京)信息科技有限公司Data service bus system and data authentication transmission method
CN117436053B (en)*2023-12-202024-02-23永鼎行远(南京)信息科技有限公司 A data service bus system and data authentication transmission method

Also Published As

Publication numberPublication date
CN103117983B (en)2015-11-04

Similar Documents

PublicationPublication DateTitle
CN103117983B (en) Data service request response method and design method of data service protocol stack
US10957326B2 (en)Device identifier dependent operation processing of packet based data communication
CN103139234B (en)A kind of device and method of data, services encapsulation
US11070626B2 (en)Managing messages sent between services
CN108306877B (en)NODE JS-based user identity information verification method and device and storage medium
US8255566B2 (en)System and method for routing messages between applications
US8738689B2 (en)Method, system, and computer program product for managing interchange of enterprise data messages
US9503447B2 (en)Secure communication between processes in cloud
CN102082771B (en)Service management middleware based on ESB (enterprise service bus) technology
US7603469B2 (en)Provisioning aggregated services in a distributed computing environment
CN102082992B (en)Mobile office system and implementation method thereof
US12095872B2 (en)Framework for dynamic brokerage and management of topics and data at the service layer
US20080301320A1 (en)Method And System For Managing Communication Protocol Data Based On MIME Types
EP3364631A1 (en)Dynamic orchestration of microservices
CN102255914B (en)Android network application program information verification method
CN104717647B (en)Professional ability method for authenticating, equipment and system
CN111552568A (en)Cloud service calling method and device
CN112134915A (en) A general network processing system with application layer protocol decoupling
CN105959385A (en)Information communication method, device and system
US10817351B1 (en)Method and apparatus for hybrid service event
CN114422558A (en)Data message conversion self-description protocol MQTT method based on container edge proxy
US12387113B1 (en)Systems and methods for processing electronic requests
TW201437838A (en)Management method and system for intelligent type component library
CN118646727A (en) Instant messaging method and system, instant messaging service and storage medium
CN118264702A (en)Logistics control full-type dynamic sensing data transmission method and device

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
C14Grant of patent or utility model
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp