Interface Design Method for Ship Knowledge Middle Platform
Through interface naming specifications, signature mechanisms and distributed service framework optimization interface design, the maintenance problems caused by high interface frequency and inconsistent format are solved, and flexible interface management and efficient and accurate data analysis are achieved.
Patent Information
- Application Number
- CN202310345643.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-03
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2043-04-03
AI Technical Summary
In the prior art, the interface is used at a high frequency and time-consuming maintenance and management, so the accuracy and stability of the interface are difficult to ensure. Especially when the document format is inconsistent, the maintenance and management of the interface are time-consuming, and the accuracy and stability of the interface are difficult to ensure.
Establish a unified naming specification through the interface naming principle, clean redundant fields, adopt an interface signature mechanism and a distributed service framework, provide remote service call solutions, perform secure checksum management of the interface, ensure the unified format and data standardization of the interface, establish an API classification model for data integration and redundancy elimination, and optimize the interface's internal processing logic to improve flexibility and control capabilities.
It realizes the flexibility and easy control of the interface call process, improves data analysis capabilities and query efficiency, ensures the accuracy and stability of the interface, simplifies interface management, reduces redundant data, and enhances the diversity and accuracy of data integration.
Smart Images

Figure CN116467375B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of ship knowledge middle platform, and particularly to a method for designing ship knowledge middle platform interfaces. Background Art
[0002] The business middle platform is an ideological system for an enterprise to achieve the connection and collaboration between various business segments, continuously improve the efficiency of business innovation, and ensure the stable, efficient, economical and balanced key business links. It includes two major parts: technology and organization, and is realized through "method + tool + business understanding". Regarding the ship knowledge middle platform, there are already related patents; for example, the Chinese patent with the publication number CN112148261A discloses a method for designing a data middle platform of an intelligent shipyard digital service platform, which adopts a data middle platform design method with an access layer, a storage layer, a business layer and an application layer architecture, integrates a coding system of the data middle platform between different levels, designs and manages the system through unified data standards and calibers, realizes the collection, calculation, storage and processing of massive data, forms a big data asset layer, and realizes data services, model services and algorithm services.
[0003] Although the above patents have effectively improved the planning and design quality of intelligent shipyards, there are still the following problems in the design of middle platform interfaces:
[0004] In the prior art, for simple data queries, complex data queries, and real-time data queries, corresponding services need to be provided through interfaces. Therefore, the interfaces are used frequently, and when the interfaces receive inconsistent document formats, it is very time-consuming to maintain and manage the interfaces, and it is difficult to ensure the correctness and stability of the interfaces. Summary of the Invention
[0005] The purpose of the present invention is to provide a method for designing ship knowledge middle platform interfaces, which is a platform for providing services, interface management, and interface user population management in the form of interfaces, with the priority of providing data support, so as to solve the problems raised in the above background art.
[0006] To achieve the above purpose, the present invention provides the following technical solutions:
[0007] A method for designing ship knowledge middle platform interfaces, the method comprising the following steps:
[0008] Step 1: Interface naming: Based on the interface naming principle, maintain a unified naming specification for the interfaces, clean and remove redundant fields in the interface naming, establish a unified field and format for the interfaces, and identify the common business parameters carried by the interfaces, wherein the parameters and return values of the interfaces are widely supported and relatively simple data types;
[0009] Step 2: Data Sorting: By accessing the data source, different data types, data structures, and data generation logics are encapsulated into different APIs, and the APIs are classified. The received data is sorted according to the unified fields and formats of the interfaces.
[0010] Step 3: Common Encryption Parameters: Specifically transmit the parameters required for security verification such as signatures, simplify the parameters, and establish an association relationship between the parameters and the corresponding parameters.
[0011] Step 4: Service Interface First: Specify in detail the content and form of the docking between the service interface and the client, form strong constraints and guarantees for both parties, and establish the priorities of each interface.
[0012] Step 5: Common Return: After the interface receives the common return instruction code, analyze the instruction code, determine the common return instruction category, determine the business error information, and handle the problems between the client and the server. Among them, the return data of each interface can be directly represented by the common return instruction code.
[0013] Step 6: Service Interface Downward Compatibility: Perform refactoring management after the service is publicly released, provide reasonable isolation measures, obtain refactoring management permissions and constraints, and perform upgrade operations in combination with downward compatibility during service upgrades.
[0014] Furthermore, for Step 1, based on the interface naming principle, maintain a unified naming specification for the interfaces, clean and remove redundant fields in the interface naming. Specifically:
[0015] Establish an interface naming database based on the interface naming principle. The interface naming database includes interface names, interface types, and interface descriptions.
[0016] Obtain the common business parameters carried by the access party based on the interface naming principle, and determine the interface type of the access party in the interface according to the common business parameters.
[0017] Determine the description features corresponding to the common business parameters included in the access party based on the interface type, extract words from the description features, and splice them with the maximum length in the smallest text unit to obtain the spliced words.
[0018] Clean the spliced words according to the part-of-speech statistical features to obtain the interface name and give feedback.
[0019] Furthermore, before establishing the interface naming principle, it also includes: establishing an interface signature mechanism. Based on the interface signature mechanism, each access party calls according to the agreed method, establishes a call table, and records the call data.
[0020] Furthermore, for the data sorting in Step 2, its specific process includes:
[0021] Read the ship knowledge data obtained from the interface of the service corresponding to the selection event, and determine the data source and data type of the ship knowledge data corresponding to the interface;
[0022] Match the corresponding data samples in the ship knowledge database according to the data type of the interface of the service corresponding to the selection event, and generate simulated data;
[0023] Obtain the data characteristics of the simulated data, and determine the data classification identifier based on the data characteristics. At the same time, input the data classification identifier into a preset neural network for learning to determine the classification expression of the data classification identifier;
[0024] Construct an API classification model based on the classification expression. At the same time, input the ship knowledge data obtained from the interface of the service corresponding to the event into the API classification model for classification to obtain multiple API interfaces.
[0025] Further, the data collation further includes:
[0026] Determine the standard data format of the ship knowledge data obtained from the service interface based on the interface signature mechanism and naming rules, and standardize the ship knowledge data obtained from the service interface according to the standard data format to obtain the ship knowledge data obtained from the standard service interface;
[0027] Extract the important fields of the ship knowledge data obtained from the service interface, and perform semantic association analysis on the important fields to determine the target important fields with high similarity, and extract and remove redundant duplicate data corresponding to the target important fields from the ship knowledge data obtained from the service interface;
[0028] Establish corresponding data integration requirements based on the data type of the ship knowledge data obtained from the service interface. According to multiple data integration requirements, determine multiple different data integration rules for the ship knowledge data obtained from the service interface, and establish dynamic data integration instructions based on the different data integration rules;
[0029] Based on the dynamic data integration instructions, perform dynamic integration on the verified ship knowledge data obtained from the standard service interface to obtain multiple groups of integrated data, and generate a ship knowledge data set based on the multiple groups of integrated data.
[0030] Further, for the public encryption parameters in step three, it further includes a distributed service framework for providing remote service call solutions and SOA service governance solutions;
[0031] During the call, put the public encryption parameters into the temporary status recorder of the distributed service framework for simplification operations;
[0032] The parameter naming rule of the distributed service framework is that for simple queries, fields are directly passed, and for complex queries, they need to be encapsulated into the target model structure for query operations. Among them, the naming of the target model structure is executed based on the model naming specification.
[0033] Furthermore, for the parameters and return values of the interfaces described in step one, which are widely supported and relatively simple data types, it also includes:
[0034] Establish a design specification, which includes that all enumerations in the input parameters use standard values, do not use the enumeration type, and only the primary key is returned in the return value of the save method in the interface.
[0035] Furthermore, after obtaining multiple API interfaces, it also includes calling the API. The specific process includes:
[0036] The service resolver in the call common unit parses the interface information of the service corresponding to the selected event and displays the parsing result in the interface display unit;
[0037] Adjust the rule order of the internal processing logic of the target interface among the multiple interfaces, set the start and stop of events and rules for the internal processing logic of the target interface, and perform rule change processing on the internal processing logic of the target interface;
[0038] Based on the internal processing logic of the target interface, establish a misuse situation prediction, and based on the prediction result, establish a misuse situation list and corresponding processing strategies.
[0039] Compared with the prior art, the beneficial effects of the present invention are:
[0040] 1. By establishing an interface signature mechanism before the interface naming principle and having each access party call according to the agreed method based on the interface signature mechanism, it ensures the secure call of the interface. The role of introducing sign, in addition to improving the interface security, also facilitates the statistics of the call situations of each access party. Cleansing the concatenated words according to the statistical features of parts of speech facilitates narrowing the data processing scope, simplifies the interface naming, makes it convenient for the interface to maintain a unified naming specification, avoids the space occupation caused by many label fields, is convenient for querying, manages with the interface as the smallest unit, and makes distinctions according to the type and scope of the interface, making the interface call process more flexible and easy to control.
[0041] 2. By classifying ship knowledge data, multiple API interfaces are established according to the classification model to standardize the ship knowledge data, improving the analysis ability and efficiency of ship data, facilitating the maintenance and management of the interfaces, ensuring the correctness and stability of the interfaces, removing redundancy from the data in the ship knowledge data, providing an accurate data basis for the streamlined matching between data, improving the query efficiency, and ensuring the diversity of the integration methods of the data integrated in the data set. Thus, when subsequently relying on the ship knowledge to extract and query data, the efficiency and accuracy of data analysis are guaranteed.
[0042] 3. A remote service call solution and an SOA service governance solution are provided through a distributed service framework, avoiding the need to specify common parameters for each interface, adjusting the rule order of the internal processing logic of the target interface among multiple interfaces, setting the start and stop of events and rules for the internal processing logic of the target interface, and handling rule changes for the internal processing logic of the target interface, so that the middleware service device can orchestrate data according to this interface to achieve interface call, thereby achieving the purpose of dynamic interface orchestration, making the interface call process more flexible and easy to control. After obtaining multiple API interfaces, considering various misuses of the API and corresponding handling strategies, the correct use of the API interface is ensured. Brief Description of the Drawings
[0043] Figure 1 It is a flowchart of the ship knowledge middleware interface design method of the present invention. Detailed Embodiments
[0044] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0045] To solve the technical problem in the prior art that for simple data queries, complex data queries, and real-time data queries, corresponding services need to be provided through interfaces, and interface calls are not easy to control, please refer to Figure 1 , this embodiment provides the following technical solutions:
[0046] A ship knowledge middleware interface design method, the method includes the following steps:
[0047] Step 1: Interface Naming: Maintain a unified naming convention for interfaces based on interface naming principles, clean and remove redundant fields in the interface naming, establish unified fields and formats for the interfaces, and identify the common business parameters carried by the interfaces. Among them, the parameters and return values of the interfaces are data types that are widely supported and relatively simple.
[0048] Before establishing the interface naming principle, it also includes establishing an interface signature mechanism. Based on the interface signature mechanism, each access party calls according to the agreed method, establishes a call table and records the call data; establish an interface naming database based on the interface naming principle. The interface naming database includes interface names, interface types, and interface descriptions; obtain the common business parameters carried by the access party based on the interface naming principle, and determine the interface type of the access party in the interface according to the common business parameters; determine the description features corresponding to the common business parameters included in the access party based on the interface type, extract words from the description features and perform maximum-length splicing with the smallest text units to obtain spliced words; clean the spliced words according to the part-of-speech statistical features to obtain the interface name and give feedback.
[0049] Step 2: Data Sorting: By accessing data sources, encapsulate different data types, data structures, and data generation logics into different APIs, classify the APIs, and sort the received data according to the unified fields and formats of the interfaces.
[0050] Establish a design specification. The design specification includes that all enums in the input parameters use standard values, do not use enum types, and only return the primary key in the return value of the saved method in the interface.
[0051] Step 3: Common Encryption Parameters: Specifically transmit the parameters required for security verification such as signatures, simplify the parameters, and establish an association relationship between the parameters and the corresponding parameters.
[0052] Step 4: Service Interface First: Specify in detail the content and form of the docking between the service interface and the client, form strong constraints and guarantees for both parties, and establish the priorities of each interface.
[0053] Step 5: Common Return: After the interface receives the common return instruction code, analyze the instruction code, determine the common return instruction category, determine the business error information, and handle the problems between the client and the server. Among them, the return data of each interface can be directly represented by the common return instruction code.
[0054] Step 6: Service Interface Downward Compatibility: Conduct refactoring management after the service is publicly released, provide reasonable isolation measures, obtain refactoring management permissions and constraints, and perform upgrade operations in combination with downward compatibility when the service is upgraded.
[0055] Specifically, by establishing an interface signature mechanism before establishing the interface naming principle, and based on the interface signature mechanism, each access party calls according to the agreed method to ensure the secure call of the interface. The role of introducing sign is not only to improve the security of the interface, but also to facilitate the statistics of the call situations of each access party. According to the statistical features of parts of speech, the concatenated words are cleaned to facilitate narrowing the data processing scope, simplify the interface naming, facilitate the interface to maintain a unified naming specification, avoid the space occupation caused by many label fields, and facilitate querying. A platform for providing services, interface management, and interface user population management in the form of an interface, with the priority of providing data support, manages with the interface as the smallest unit, and makes distinctions according to the type and scope of the interface, making the interface call process more flexible and easy to control.
[0056] To solve the technical problem in the prior art that when the interface receives documents with inconsistent formats, the maintenance and management of the interface are very time-consuming, and it is very difficult to ensure the correctness and stability of the interface, please refer to Figure 1 , this embodiment provides the following technical solutions:
[0057] Regarding the data sorting in the second step, the specific process includes: reading the ship knowledge data obtained by the interface of the service corresponding to the selected event, and determining the data source and data type of the ship knowledge data corresponding to the interface; matching the corresponding data samples in the ship knowledge database according to the data type of the interface of the service corresponding to the selected event to generate simulated data; obtaining the data characteristics of the simulated data, and determining the data classification identifier based on the data characteristics. At the same time, input the data classification identifier into a preset neural network for learning to determine the classification expression of the data classification identifier; construct an API classification model based on the classification expression, and at the same time, input the ship knowledge data obtained by the interface of the service corresponding to the event into the API classification model for classification to obtain multiple API interfaces;
[0058] Determine the standard data format of the ship knowledge data obtained by the service interface based on the interface signature mechanism and naming rules, and standardize the ship knowledge data obtained by the service interface according to the standard data format to obtain the ship knowledge data obtained by the standard service interface; extract the important fields of the ship knowledge data obtained by the service interface, and perform semantic association analysis on the important fields to determine the target important fields with high similarity, and extract and eliminate redundant duplicate data corresponding to the target important fields from the ship knowledge data obtained by the service interface; establish corresponding data integration requirements based on the data types of the ship knowledge data obtained by the service interface, determine multiple different data integration rules for the ship knowledge data obtained by the service interface according to the multiple data integration requirements, and establish dynamic data integration instructions based on the different data integration rules; based on the dynamic data integration instructions, perform dynamic integration on the verified ship knowledge data obtained by the standard service interface to obtain multiple sets of integrated data, and generate a ship knowledge data set based on the multiple sets of integrated data.
[0059] Specifically, by classifying the ship knowledge data, establishing multiple API interfaces according to the classification model, determining the standard data format of the ship knowledge data obtained by the service interface based on the interface signature mechanism and naming rules, and standardizing the ship knowledge data, the analysis ability and efficiency of ship data are improved, which is convenient for the maintenance and management of the interfaces, ensures the correctness and stability of the interfaces, eliminates redundancy in the data of the ship knowledge data, provides an accurate data basis for the streamlined matching between data, improves the query efficiency, and through multiple different integrations of the ship knowledge data according to multiple data integration requirements, multiple sets of integrated data are obtained, and finally a ship knowledge data set is generated, ensuring the diversity of the integration methods of the integrated data in the data set, so as to ensure the efficiency and accuracy of data analysis when subsequently relying on the ship knowledge to extract and query data.
[0060] To solve the technical problem in the prior art that after establishing multiple API interfaces, it is impossible to ensure the correct use of the API interfaces, and misuse is likely to occur, affecting the use of the middleware, please refer to Figure 1 , this embodiment provides the following technical solutions:
[0061] For the public encryption parameters in step three, there is also a distributed service framework for providing remote service call solutions and SOA service governance solutions; when calling, put the public encryption parameters into the temporary status recorder of the distributed service framework for simplified operations; the parameter naming rule of the distributed service framework is that for simple query usage fields, directly pass them, and for complex queries, they need to be encapsulated into a target model structure for query operations, where the naming of the target model structure is executed based on the model naming specification;
[0062] After obtaining multiple API interfaces, it further includes invoking the APIs. The specific process includes: the service parser in the invocation common unit parses the interface information of the service corresponding to the selected event and displays the parsing result in the interface display unit; adjusting the rule order of the internal processing logic of the target interface among the multiple interfaces, setting the start / stop of events and rules for the internal processing logic of the target interface, and performing rule change processing on the internal processing logic of the target interface; establishing a misuse situation prediction based on the internal processing logic of the target interface, and establishing a misuse situation list and corresponding processing strategies based on the prediction result.
[0063] Specifically, a remote service invocation solution and an SOA service governance solution are provided through a distributed service framework, avoiding the need to specify common parameters for each interface. The rule order of the internal processing logic of the target interface among the multiple interfaces is adjusted, the start / stop of events and rules for the internal processing logic of the target interface is set, and rule change processing is performed on the internal processing logic of the target interface, so that the middleware service device can arrange data according to this interface to achieve interface invocation, thereby achieving the purpose of dynamic arrangement of interfaces, making the interface invocation process more flexible and easy to control. After obtaining multiple API interfaces, considering various misuse situations of APIs and corresponding processing strategies, it ensures the correct use of API interfaces.
[0064] As mentioned above, it is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention, according to the technical solution and inventive concept of the present invention, makes equivalent substitutions or changes, and all should be covered within the protection scope of the present invention.
Claims
1. Method for designing interface of ship knowledge middleware, characterized in that: The method includes the following steps: Step 1: Interface naming: Based on the interface naming principle, maintain a unified naming specification for the interfaces, clean and remove redundant fields in the interface naming, establish a unified field and format for the interfaces, and identify the public service parameters carried by the interfaces. Among them, the parameters and return values of the interfaces are widely supported and relatively simple data types; Step 2: Data arrangement: By accessing data sources, encapsulate different data types, data structures, and data generation logics into different APIs, classify the APIs, and arrange the received data according to the unified fields and formats of the interfaces; Step 3: Public encryption parameters: Specifically transmit the parameters required for signature security verification, simplify the parameters, and establish an association relationship between the parameters and the corresponding parameters; Step 4: Service interface first: Specify in detail the content and form of the docking between the service interface and the client, form strong constraints and guarantees for both parties, and establish the priority of each interface; Step 5: Public return: After the interface receives the public return instruction code, analyze the instruction code, determine the public return instruction category, determine the business error information, and handle the problems between the client and the server. Among them, the return data of each interface is directly represented by the public return instruction code; Step 6: Service interface downward compatibility: Conduct refactoring management after the service is publicly released, provide reasonable isolation measures, obtain refactoring management permissions and constraints, and perform upgrade operations in combination with downward compatibility when the service is upgraded; Regarding maintaining a unified naming specification for the interfaces based on the interface naming principle in Step 1, cleaning and removing redundant fields in the interface naming, specifically: Establish an interface naming database based on the interface naming principle. The interface naming database includes interface names, interface types, and interface descriptions; Before establishing the interface naming principle, it also includes: establishing an interface signature mechanism, and each access party calls according to the agreed method based on the interface signature mechanism, establishing a call table and recording call data; Obtain the public service parameters carried by the access party based on the interface naming principle, and determine the interface type of the access party in the interface according to the public service parameters; Determine the description features corresponding to the public service parameters included in the access party based on the interface type, extract words from the description features and perform maximum-length splicing with the smallest text units to obtain spliced words; Clean the spliced words according to the part-of-speech statistical features to obtain the interface name and give feedback; Regarding the data arrangement in Step 2, its specific process includes: Read the ship knowledge data obtained from the interface of the service corresponding to the selected event, and determine the data source and data type of the ship knowledge data corresponding to the interface; Match the corresponding data samples in the ship knowledge database according to the data type of the interface of the service corresponding to the selected event to generate simulated data; Obtain the data features of the simulated data, and determine the data classification identifier based on the data features. At the same time, input the data classification identifier into a preset neural network for learning to determine the classification expression of the data classification identifier; Construct an API classification model based on the classification expression. At the same time, input the ship knowledge data obtained from the interfaces of the services corresponding to the events into the API classification model for classification to obtain multiple API interfaces.
2. The ship knowledge middle platform interface design method according to claim 1, characterized in that: The data collation further includes: Determine the standard data format of the ship knowledge data obtained from the service interfaces based on the interface signature mechanism and naming rules, and standardize the ship knowledge data obtained from the service interfaces according to the standard data format to obtain the ship knowledge data obtained from the standard service interfaces; Extract the important fields of the ship knowledge data obtained from the service interfaces, perform semantic association analysis on the important fields, determine the target important fields with high similarity, and extract and eliminate redundant duplicate data corresponding to the target important fields from the ship knowledge data obtained from the service interfaces; Establish corresponding data integration requirements based on the data types of the ship knowledge data obtained from the service interfaces. According to multiple data integration requirements, determine multiple different data integration rules for the ship knowledge data obtained from the service interfaces, and establish dynamic data integration instructions based on the different data integration rules; Based on the dynamic data integration instructions, perform dynamic integration on the verified ship knowledge data obtained from the standard service interfaces to obtain multiple groups of integrated data, and generate a ship knowledge data set based on the multiple groups of integrated data.
3. The ship knowledge middle platform interface design method according to claim 2, characterized in that: For the public encryption parameters in step three, a distributed service framework is further included, which is used to provide a remote service call solution and an SOA service governance solution; During the call, put the public encryption parameters into the temporary status recorder of the distributed service framework for simplified operations; The parameter naming rule of the distributed service framework is that for simple query, the fields are directly passed, and for complex queries, they need to be encapsulated into a target model structure for query operations, where the naming of the target model structure is executed based on the model naming specification.
4. The ship knowledge middle platform interface design method according to claim 3, characterized in that: For the parameters and return values of the interfaces in step one, which are widely supported and relatively simple data types, it further includes: Establish a design specification, which includes that the enums in the input parameters all use standard values and do not use enum types, and only the primary key is returned in the return value of the save method in the interface.
5. The ship knowledge mid-office interface design method according to claim 4, characterized in that: After obtaining the multiple API interfaces, it further includes calling the API, and the specific process includes: The service resolver in the call common unit resolves the interface information of the service corresponding to the selected event, and displays the resolution result in the interface display unit; Adjust the rule order of the internal processing logic of the target interface among the multiple interfaces, set the event start / stop and rule start / stop for the internal processing logic of the target interface, and perform rule change processing on the internal processing logic of the target interface; Establish a misuse situation prediction based on the internal processing logic of the target interface, and establish a misuse situation list and corresponding processing strategies based on the prediction results.
Citation Information
Patent Citations
Data middle platform design method of intelligent shipyard digital service platform
CN112148261A
Data center coding method of intelligent shipyard digital service platform
CN112148262A
System, Program, and Method for Representation, Utilization, and Maintenance of Regulatory Knowledge
US20100280977A1