Multi-protocol map information service adaptive adaptation method

Through the multi-protocol map information service adaptive adaptation method, the central controller and request interceptor modes are used to adapt to different map data specifications, which solves the problems of high map service development cost and specification diversity, and achieves simplified data access process and Multi-format request adaptation improves development efficiency and adaptability.

CN118535666APending Publication Date: 2024-08-23CHINESE PEOPLES LIBERATION ARMY UNIT 61363
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410689961.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-30
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

At this stage, map services have high development costs, long development cycles, poor code portability and reusability, and are troubled by different protocols and standardized request formats, resulting in heavy workloads for R&D personnel and an inconvenient development environment.

Method used

Adopting a multi-protocol map information service adaptive adaptation method, through the central controller and request interceptor mode, the adaptation to different map data specifications and access link formats is realized, and the interceptor chain and converter are used for request matching and format conversion. Simplify map data access process.

Benefits of technology

It reduces R&D costs, simplifies map data access service design and calling logic, improves program adaptability and testability, and supports the adaptation and subsequent expansion of multiple map data request specifications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118535666A
    Figure CN118535666A
Patent Text Reader

Abstract

The invention discloses a multi-protocol map information service adaptive adaptation method, and belongs to the technical field of information services. The method comprises the following steps of: firstly, constructing a map data access calling process based on any map data specification and access link format, then defining a request interceptor, inserting the interceptor in front of a control layer by utilizing a section-oriented principle, defining a filtering condition and processing logic for a map access request in the interceptor, and executing the map access calling process according to the filtering condition and the processing logic. And converting parameters of the access request into a parameter format required by a control layer so as to realize multi-format map data request adaptation processing based on an interceptor mode. According to the method, the design, implementation and flow of the traditional map data access service are simplified, the calling logic is optimized, the research and development cost is reduced, and the program adaptability, testability, reliability and other performance are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of information services, and in particular relates to a multi-protocol map information service self-adaptation method. Background Art

[0002] Geographic Information System (GIS) is a system that processes geographic location and collects, stores, manages, analyzes, expresses, shares and assists in decision-making. The main functions that are widely used at this stage include mapping and query, data collection, distribution and dissemination of geographic information, and geospatial analysis.

[0003] Several major GIS manufacturers at home and abroad are actively developing WebGIS systems based on Web technology. According to the different functions provided by various WebGIS systems, different map service specifications need to be followed, such as WMS, WMTS, WFS, WCS, WPS, WMSC, TMS, etc., among which WMTS and TMS are more common. WMTS service is specified by the Open Geographic Information Consortium (OGC), and TMS service is specified by the Open Geospatial Information Foundation (OSGEO). TMS is a pure RESTful style, and the tiles are square; WMTS has three styles: KVP, SOAP, and RESTful, and the tiles are rectangular. The two types of data specifications are in opposite directions in the vertical axis direction.

[0004] Most software systems use the MVC three-tier architecture model, which divides the software system into the view layer (View), the control layer (Controller) and the model layer (Model). Its purpose is to achieve dynamic programming, simplify subsequent expansion and modification work, and make it possible to reuse certain parts of the program. Among them, the view layer is responsible for forwarding requests and processing requests.

[0005] At present, the commonly used server-side frameworks for map services are SpringMVC, SpringBoot and other architectures. When requesting map data, callers will request various service URLs according to different specifications and protocols. Developers need to develop complete control layer and model layer service codes according to different specifications, resulting in high development costs, long development cycles, and poor code portability and reuse capabilities. In addition, when map service users or secondary developers call map service interfaces of different specifications, they need to face the trouble of multiple request formats brought about by different protocols and specifications. Summary of the invention

[0006] To solve the above technical problems, the present invention provides a multi-protocol map information service adaptive adaptation method, which supports the adaptation of current map data access requests and subsequent extended map data request specifications, and then solves the inconvenience in research and development and use caused by map service data request specifications in multiple formats.

[0007] To achieve the above purpose, the technical solution adopted by the present invention is as follows: A multi-protocol map information service adaptive adaptation method, the method comprising the following steps: Step 1: Based on any map data specification and access link format, a map data access call process is constructed, wherein the call process includes: a) receiving a map data access request; b) calling a processor mapper through a central controller to determine a processor that matches the received request; c) calling the matching processor, i.e., the control layer, through a processor adapter and a processor name; d) the control layer performs business logic processing, returns a view, performs parsing, and returns the view to the requester; Step 2, define a request interceptor, and use the aspect-oriented principle to insert the request interceptor before the control layer. The request interceptor includes a scheduler, an interceptor chain and a converter. The scheduler schedules the interceptor chain after receiving a map data access request. The interceptor chain includes multiple interceptors. The multiple interceptors are used to specify the adapted map data specifications and access link formats. The converter is used to encode the map data service protocol and conversion logic that match the multiple interceptors, and convert the received access request into the parameter format required by the control layer.

[0008] Furthermore, after receiving the map data access request, the scheduler schedules the access request to pass through each interceptor in the interceptor chain in turn to match the map data access request with the map data specification, and when the match fails, determines whether the interceptor chain is completed, and when the match succeeds, notifies the converter to convert the access request format; The interceptor chain includes multiple interceptors, each of which has a matching rule for map service access requests adapted to it written in it according to the prescribed map data specification and access link format. Each interceptor makes a map service access request type judgment after receiving the access request. When the map data access request does not match the map data specification, the access request is intercepted and the judgment result is returned to the scheduler. The converter has format conversion logic for various types of map service access requests to existing control layer parameters, and performs format conversion of service request parameters according to the matching of the map service access requests received in the scheduler.

[0009] The beneficial effects of the present invention are: It simplifies the design, implementation, and process of traditional map data access services, optimizes the calling logic, reduces the workload of R&D personnel when facing multiple map service specifications, reduces R&D costs, and at the same time achieves adaptation to multiple types of map data requests and good support for subsequent expansion specifications; there is no need to connect to the user's real data, which solves the problem that the R&D environment does not have certain sensitive map data information, and increases the program's adaptability, testability, reliability and other performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Figure 1 A flowchart of a commonly used architecture request response in the prior art; Figure 2 This is a request response flow chart after the modification of the present invention; Figure 3 This is the internal structure diagram of the request interceptor of the present invention; Figure 4 This is a comparison diagram of the request response process before and after the transformation. DETAILED DESCRIPTION

[0011] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0012] like Figure 1 As shown in the figure, it is a common architecture request response flow chart in the prior art. The request enters the central controller, which matches the corresponding processor name from the processor mapper, and then uses the processor name to find the corresponding processor in the processor adapter and enter the control layer. Business logic processing is performed in the control layer. After a series of work processes such as control class, service class, and persistence class, the requested model view is returned and enters the view resolver. The view resolver then returns the resolved view to the service caller as a request response.

[0013] In order to be compatible with requests of various formats and simplify the code development workload of subsequent extended functions, this method introduces the interceptor pattern to transform the system process. The interceptor pattern is a design pattern that allows requests to be processed or controlled. It can intercept requests before they are sent to the actual control layer or during the request processing. The transformed request response process is as follows: Figure 2 As shown in the figure, this process can solve the problems of map data access request service reference protocols, diverse standards, long R&D environment cycle, large workload, and high adaptation cost to a certain extent. Through interceptor transformation, it is possible to moderately expand requests under different protocols and standards, and intercept, verify, filter, and normalize requests when receiving service requests, thereby reducing the problems of service resources being difficult to unify and R&D resources being easily wasted due to the development of multiple individual services, so as to realize this multi-protocol map information service adaptive adaptation method.

[0014] Specifically, we first need to implement the map data access call process based on a map data specification and access link format, then define the request interceptor, and insert the interceptor before the control layer using the aspect-oriented principle. Then define the filter conditions and processing logic for the access request in the interceptor, and convert the parameters of the access request into the parameter format required by the control layer, so as to realize the multi-format map data request adaptation processing based on the interceptor mode.

[0015] like Figure 3As shown, the request interceptor consists of a scheduler, an interceptor chain, and a converter, where: Scheduler: Responsible for scheduling the interceptor chain calling process. After the request interceptor receives the map data request, the scheduler will make the request pass through each interceptor in the interceptor chain in turn, and determine whether the interceptor chain is completed after the match fails. When the Nth interceptor in the interceptor chain successfully matches the map service request, it will notify the converter to convert the request format.

[0016] Interceptor chain: The interceptor chain includes multiple interceptors, which are responsible for intercepting requests. After receiving the interception request, each interceptor will make a judgment on the type of map service request and return the judgment result to the scheduler. It is necessary to write the matching rules of the adapted map service requests in each interceptor according to the attributes such as the type and access format of the adapted map data.

[0017] Converter: Write the format conversion logic of various service requests to the existing control layer parameters, convert the format of service request parameters according to the matching of map service requests received in the scheduler, and convert the map service request format determined by the interceptor into the input parameter format of the existing code.

[0018] After the external request access is converted internally by the request interceptor, the required map data can be obtained through the existing interface. When R&D personnel subsequently expand the map service access specifications or supported access formats, they only need to add corresponding matching rules to the interceptor chain and add conversion logic code to the converter to implement the request for map data, without the need to develop a complete set of control and business logic code.

[0019] like Figure 4 As shown in the figure, a comparison of the request response mode before and after optimization is given. Before optimization, in the request response process in the traditional mode, in order to implement map data access services based on protocols such as TMS and WMTS, R&D personnel need to develop a full set of control layer codes according to the request format and business logic adapted to each protocol, such as control classes, service classes, persistence classes, and database data models based on their own protocols. When there are new protocols that need to be matched, a full set of service code development and complex testing processes are also required according to the new protocol request format. After optimization, in the request response process in the interceptor mode, R&D personnel only need to implement a single set of service logic code, and when matching multi-format map data requests, they can adapt and support access to multi-format map data by overloading interceptors and rewriting conversion methods. To a certain extent, the difficulty of R&D personnel's work is reduced, and at the same time, it achieves good support for the adaptation of various types of map data requests and subsequent expansion specifications.

[0020] In addition, since the control class code is relatively fixed in the interceptor mode, it is easier to write a test class, in which the correctness of the converted parameters is verified to determine whether the interceptor and converter code is effective. When developers expand interceptors and converters, they can call the test class verification code without connecting to the user's real data, solving the problem that the development environment does not have some sensitive map data information.

[0021] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A multi-protocol map information service adaptive adaptation method, characterized in that: The method comprises the following steps: Step 1: Based on any map data specification and access link format, a map data access call process is constructed, wherein the call process includes: a) receiving a map data access request; b) calling a processor mapper through a central controller to determine a processor that matches the received request; c) calling the matching processor, i.e., the control layer, through a processor adapter and a processor name; d) the control layer performs business logic processing, returns a view, performs parsing, and returns the view to the requester; Step 2, define a request interceptor, and use the aspect-oriented principle to insert the request interceptor before the control layer. The request interceptor includes a scheduler, an interceptor chain and a converter. The scheduler schedules the interceptor chain after receiving a map data access request. The interceptor chain includes multiple interceptors. The multiple interceptors are used to specify the adapted map data specifications and access link formats. The converter is used to encode the map data service protocol and conversion logic that match the multiple interceptors, and convert the received access request into the parameter format required by the control layer.

2. A multi-protocol map information service adaptive adaptation method according to claim 1, characterized in that: After receiving a map data access request, the scheduler schedules the access request to pass through each interceptor in the interceptor chain in turn to match the map data access request with the map data specification, and when the match fails, determines whether the interceptor chain is completed, and when the match succeeds, notifies the converter to convert the access request format; The interceptor chain includes multiple interceptors, each of which has a matching rule for map service access requests adapted to it written in it according to the prescribed map data specification and access link format. Each interceptor makes a map service access request type judgment after receiving the access request. When the map data access request does not match the map data specification, the access request is intercepted and the judgment result is returned to the scheduler. The converter has format conversion logic for various types of map service access requests to existing control layer parameters, and performs format conversion of service request parameters according to the matching of the map service access requests received in the scheduler.