Service construction method, device, medium and server

By classifying and modeling ship entity data, a unified ship data directory and database are generated, and application program interface is provided, the problem of data cannot be shared between different systems of ship enterprises is solved, and efficient sharing and secure access of data is achieved.

CN113986884BActive Publication Date: 2025-06-13JIANGNAN SHIPYARD (GRP) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111294455.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-03
Publication Date
2025-06-13
Estimated Expiration
2041-11-03

AI Technical Summary

Technical Problem

Data cannot be shared between different systems of marine enterprises, mainly due to the different granularity of the same data object and the inconsistent data encoding, which leads to difficulty in data interaction and data integration between services.

Method used

By obtaining the input parameters and output parameters of the application program interface, classification and modeling are carried out, hierarchical models are generated, and a tree-like ship data directory and ship data files are generated based on the hierarchical model, a unified ship entity database is established, and application program interfaces are provided for other system calls.

Benefits of technology

It realizes data sharing between different systems, improves the consistency of similar ship data, enhances data accuracy and access security, and simplifies the construction and access of application services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113986884B_ABST
    Figure CN113986884B_ABST
Patent Text Reader

Abstract

The present invention provides a service construction method, device, medium and server based on multi-level ship data. The service construction method based on multi-level ship data includes: obtaining ship entity data, input parameters and output parameters of an application programming interface; classifying and modeling the ship entity data to generate a hierarchical model of the ship entity data; generating a tree-structured ship data directory according to the hierarchical model, where the ship data directory includes a ship entity directory, and the ship entity directory conforms to the topological relationship of the hierarchical model; generating ship data files under the corresponding ship data directory; generating a ship entity database for data sharing and maintenance among multiple systems; and creating an application programming interface for the ship entity database based on the ship data files. This method can improve the accuracy and accessibility of ship data and meet the data sharing requirements between different ship systems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a service construction method, in particular to a service construction method, device, medium and server based on multi-level ship data. Background Art

[0002] With the increasing digitalization of ship enterprises year by year, ship system services are becoming more and more numerous and complex. During the construction of ship services, due to different data granularities and inconsistent data encodings of the same data object, data interaction and data integration between services are extremely difficult. For example, for ship number information, some system services only define the ship number code and ship name, while some system services need to define the ship number code, ship name, ship status, affiliated classification society, start date, etc. Due to reasons such as different data models established for the same data object by different system services and non-standard input of data content, data cannot be shared between different systems of ship enterprises. Summary of the Invention

[0003] In view of the above-mentioned disadvantages of the prior art, the purpose of the present invention is to provide a service construction method, device, medium and server based on multi-level ship data, which is used to solve the problem that data cannot be shared between different systems of ship enterprises in the prior art.

[0004] To achieve the above object and other related objects, the first aspect of the present invention provides a service construction method based on multi-level ship data. The service construction method based on multi-level ship data includes: obtaining ship entity data, input parameters and output parameters of an application program interface; classifying and modeling the ship entity data to generate a hierarchical model of the ship entity data; generating a tree-structured ship data directory according to the hierarchical model, where the ship data directory includes a ship entity directory, and the ship entity directory conforms to the topological relationship of the hierarchical model; generating ship data files under the corresponding ship data directory, where the ship data files include the ship entity data, the input parameters, the output parameters and entity attribute specification information; generating a ship entity database, where the ship entity database is used for data sharing and maintenance among multiple systems; creating an application program interface of the ship entity database based on the ship data files, and the application program interface of the ship entity database is used to provide services to other systems.

[0005] In an embodiment of the first aspect, the service construction method based on multi-level ship data further includes: obtaining test cases for detecting the hierarchical model; using the test cases to detect the hierarchical model to determine whether the hierarchical model is available; when the hierarchical model is not available, generating an error prompt message and jumping to the step of generating the ship data directory.

[0006] In an embodiment of the first aspect, the service construction method based on multi-level ship data further includes: obtaining configuration information of the application programming interface; assigning corresponding parameters of the application programming interface according to the configuration information to implement the configuration of the application programming interface.

[0007] In an embodiment of the first aspect, the ship data directory includes a ship comprehensive data directory, a ship design data directory, a ship production data directory, and a ship management data directory.

[0008] In an embodiment of the first aspect, the method for creating the application programming interface includes: creating a theme library application programming interface project under the directory path of the application programming interface; receiving the compiled theme library application programming interface project and generating an access base address; generating a theme library application programming interface address accessible by other systems; and publishing the application programming interface address.

[0009] In an embodiment of the first aspect, the service construction method based on multi-level ship data further includes: testing the application programming interface address.

[0010] In an embodiment of the first aspect, the service construction method based on multi-level ship data further includes: generating a key for the application programming interface, where the key is used to determine the access rights of the system.

[0011] A second aspect of the present invention provides a service construction device based on multi-level ship data, including: a data acquisition module, configured to acquire ship entity data, input parameters, and output parameters of an application programming interface; a model construction module, connected to the data acquisition module, configured to classify and model the ship entity data to generate a hierarchical model of the ship entity data; a directory generation module, connected to the model construction module, configured to generate a tree-structured ship data directory according to the hierarchical model, where the ship data directory includes a ship entity directory, and the ship entity directory conforms to the topological relationship of the hierarchical model; a file generation module, connected to the data acquisition module and the directory generation module, configured to generate ship data files under the corresponding ship data directory, where the ship data files include the ship entity data, the input parameters, the output parameters, and entity attribute specification information; a database generation module, configured to generate a ship entity database for data sharing and maintenance among multiple systems; and an interface creation module, connected to the file generation module and the database generation module, configured to create an application programming interface for the ship entity database based on the ship data files, where the application programming interface of the ship entity database is used to provide services to other systems.

[0012] The third aspect of the present invention provides a computer-readable storage medium. When the computer program is executed by a processor, it implements the method for constructing services based on multi-level ship data according to any one of the first aspects of the present invention.

[0013] The fourth aspect of the present invention provides a server, which includes: a memory on which a computer program is stored; a processor communicatively connected to the memory, and when the computer program is called, it executes the method for constructing services based on multi-level ship data according to any one of the first aspects of the present invention.

[0014] The method for constructing services based on multi-level ship data is conducive to establishing the same data model for the same data object and ensuring the consistency and standardization of the data format, data type, and data content of similar data by generating a unified ship data catalog and a unified ship entity database, thereby improving data accuracy and data access security, and can quickly construct and access application program services according to the input parameters, output parameters, and interface services of the application program interface, so as to achieve data sharing between different systems. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 It shows a flowchart of the method for constructing services based on multi-level ship data according to the present invention in a specific embodiment.

[0016] Figure 2 It shows a flowchart of the method for constructing services based on multi-level ship data according to the present invention in a specific embodiment.

[0017] Figure 3 It shows a flowchart of the method for constructing services based on multi-level ship data according to the present invention in a specific embodiment.

[0018] Figure 4 It shows a flowchart of the implementation method for creating the application program interface in a specific embodiment of the method for constructing services based on multi-level ship data according to the present invention.

[0019] Figure 5 It shows a flowchart of the method for constructing services based on multi-level ship data according to the present invention in a specific embodiment.

[0020] Figure 6 It shows a schematic structural diagram of the device for constructing services based on multi-level ship data according to the present invention in a specific embodiment.

[0021] Figure 7 It shows a schematic structural diagram of the server according to the present invention in a specific embodiment.

[0022] Description of Component Labels

[0023] 600 Service Construction Device

[0024] 610 Data Acquisition Module

[0025] 620 Model Construction Module

[0026] 630 Directory Generation Module

[0027] 640 File Generation Module

[0028] 650 Database Generation Module

[0029] 660 Interface Creation Module

[0030] 700 Server

[0031] 710 Memory

[0032] 720 Processor

[0033] Steps S11 - S16

[0034] Steps S21 - S23

[0035] Steps S31 - S32

[0036] Steps S41 - S44

[0037] Steps S51 - S57 Specific Embodiments

[0038] The following describes the embodiments of the present invention through specific examples. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments. Various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that, without conflict, the following embodiments and the features in the embodiments can be combined with each other.

[0039] It should be noted that the diagrams provided in the following embodiments only illustrate the basic concept of the present invention schematically. Therefore, only the components related to the present invention are shown in the diagrams, rather than being drawn according to the number, shape, and size of the components in actual implementation. The type, quantity, and ratio of each component in actual implementation can be arbitrarily changed, and the component layout type may also be more complex.

[0040] In the existing ship system services, due to the complexity of the system and the great difficulty in communication between development teams, data interaction between services and data integration between systems are extremely difficult. Since different system services establish different data models for the same data object, it will lead to problems such as difficult maintenance of the database due to excessive tables, difficult to guarantee data quality, and inability to share data between system services.

[0041] In view of the above problems, the present invention provides a service construction method based on multi-level ship data. The service construction method based on multi-level ship data includes classifying ship data, generating a corresponding tree-like ship directory and generating files under the corresponding ship directory for storing the ship data, establishing a theme database for storing the classified ship data, and providing APIs (Application Programming Interfaces) related to the theme database for other services to call. Since the ship data is classified and stored at multiple levels, the consistency of the same type of ship data in data format, data content, and data type is improved, the accuracy of the ship data is improved, and the access security of the ship data is enhanced.

[0042] In an embodiment of the present invention, the service construction method based on multi-level ship data is applied to a server. Specifically, please refer to Figure 1 , the service construction method based on multi-level ship data includes:

[0043] S11, obtaining ship entity data, input parameters and output parameters of the application programming interface. For example, the ship entity data may include: the defined name, type, field attribute name, field attribute type, and field attribute length of the ship entity object. The types of the input parameters and output parameters of the application programming interface may include: character, array, entity object, collection, and / or any combination of the above types.

[0044] S12. Classify and model the ship entity data to generate a hierarchical model of the ship entity data. Specifically, the ship entity data can be classified and modeled through algorithms and corresponding software. For example, the ship entity data can be divided into major categories such as comprehensive data, design data, production data, and management data, as well as corresponding sub-categories under the major categories, according to information such as the field attributes and defined names of the ship entity data. The number of layers of the major categories and their corresponding sub-categories can be set according to actual needs, and this number of layers is, for example, 6 layers. The hierarchical model of the ship entity data is a data model that organizes data in a tree structure. There is one and only one node in the hierarchical model that has no parent node, and this node is called the root node. Other nodes except the root node have one and only one parent node. Nodes in the hierarchical model that do not have sub-structures are used to store specific ship entity object information, and other nodes are used to store data category information such as comprehensive data and design data.

[0045] S13. Generate a tree-structured ship data directory according to the hierarchical model. The ship data directory includes a ship entity directory, and the ship entity directory conforms to the topological relationship of the hierarchical model. Specifically, the parent directories in the ship entity directory correspond one-to-one with the nodes in the hierarchical model that are used to store data category information, and the directory names are consistent with the category information. In addition, the ship data directory can be generated in sequence according to the sequential topological relationship of the hierarchical model.

[0046] S14. Generate ship data files under the corresponding ship data directory. The ship data files include the ship entity data, the input parameters, the output parameters, and entity attribute specification information. Specifically, the ship data files correspond one-to-one with the nodes in the hierarchical model that are used to store specific ship entity object information. The data structures that the ship entity data is used to store can include structured two-dimensional tables, wide tables, and hash tables, etc. The entity attribute specification information can include attribute length, attribute coding standard, attribute default value, attribute data format conversion, attribute description, etc. In addition, the input parameters and the output parameters included in the ship data files are used to implement the functions of the application program interface to add, modify, delete, and query ship data in the corresponding database. The data types of the input parameters and the output parameters can include any one of characters, arrays, objects, and sets. It should be noted that the above descriptions of the data structure, the entity attribute specification information, and the data types of the input parameters and output parameters are only optional solutions of this embodiment, but the present invention is not limited thereto.

[0047] Optionally, the ship data files include binary files that can cross hardware platforms and operating systems.

[0048] S15. Generate a ship entity database, which is used for data sharing and maintenance among multiple systems. Specifically, in this embodiment, the process of generating the ship entity database includes creating a ship entity data table, and the fields of the ship entity data table correspond one by one to the ship field attributes in S11.

[0049] In addition, due to the fact that some data in the ship industry is relatively long, there will be a problem of low database operation efficiency after being stored in the database. Therefore, in this embodiment, it is preferably to optimize the database by converting the storage field type of the ship entity data table. For example, a relatively long string that can be converted into an integer can be converted into an integer. Further, in practical applications, there will also be a problem that the length of some ship data is too long, even exceeding the length of the database text field, which seriously affects the database efficiency. To solve this problem, step S15 can first compress the ship data through the gzip (Compressed File Archive) compression algorithm, and then continue to compress it through the database compression algorithm, and finally store the ship entity data in the database binary large object type. This method can effectively reduce the size of the stored data and improve the operation efficiency of the ship entity database.

[0050] S16. Create an application program interface of the ship entity database based on the ship data file, and the application program interface of the ship entity database is used to provide services to other systems. Specifically, create an application program interface of the ship entity database under the corresponding ship data directory according to the ship data file, and generate an application program project according to the application program interface. Then, the server can provide services to other systems through the application program interface. Among them, the generation framework of the application program project includes the WEBAPI (World Wide Web Application Programming Interface) framework based on the NETCore technology.

[0051] According to the above description, it can be known that the service construction method based on multi-level ship data described in this instance classifies and models the ship entity data, establishes a tree-shaped ship data directory, and realizes the service sharing between different service systems and the improvement of data quality and other effects through operations such as generating ship data files, generating a ship entity database, and creating an application program interface of the ship entity database under the corresponding ship data directory. And by optimizing the fields of the ship entity data, the storage quality of the ship entity data and the operation efficiency of the ship entity database are improved.

[0052] Please refer to Figure 2, in an embodiment of the present invention, the service construction method based on multi-level ship data further includes:

[0053] S21, obtaining the test cases for the hierarchical model; for example, the server can directly obtain the test cases according to the user's input, or obtain the test cases from the corresponding test case database, or generate the test cases in an automatically generated manner by the device. The present invention does not limit this.

[0054] S22, using the test cases to detect the hierarchical model to determine whether the hierarchical model is available; specifically, it can be determined whether the hierarchical model is available by instantiating the test cases related to the hierarchical model and according to the instantiation result.

[0055] S23, when the hierarchical model is not available, generating an error prompt message and jumping to the step of generating the ship data directory, that is, Figure 1 step S13 in. Specifically, when an error occurs in the instantiation result, it is necessary to modify the ship entity object information included in the hierarchical model and regenerate the ship data directory.

[0056] According to the above description, it can be known that the service construction method based on multi-level ship data described in this embodiment can ensure the storage quality of the ship entity data by detecting the ship entity object information included in the hierarchical model.

[0057] Please refer to Figure 3 , in an embodiment of the present invention, the service construction method based on multi-level ship data further includes:

[0058] S31, obtaining the configuration information of the application program interface. Specifically, the configuration information of the application program interface may include interface name, interface description, interface routing, access security policy, request method, request parameters, response parameters, etc. Among them, the request method only supports the POST request method and the GET request method.

[0059] Optionally, the configuration information of the application interface may further include database connection information, such as database type, database service address, database name, database account, database password, etc.

[0060] S32, assigning corresponding parameters to the application program interface according to the configuration information to implement the configuration of the application program interface. Specifically, for example, the application program interface can be associated with the input parameters and output parameters included in the ship data file to implement the configuration of the application program interface. By configuring the application program interface, the operation of the ship entity database can be realized through the application program interface.

[0061] As can be seen from the above description, in this embodiment, by configuring the application programming interface and associating the application programming interface with the input parameters and output parameters included in the ship data file, it is possible to operate on the ship entity database through the application programming interface.

[0062] Please refer to Figure 4 , in an embodiment of the present invention, the implementation method for creating the application programming interface includes:

[0063] S41, create a theme library application programming interface project under the directory path of the application programming interface. Specifically, a corresponding theme library application programming interface project can be automatically generated under the path of the application programming interface according to the application programming interface.

[0064] S42, receive the compiled theme library application programming interface project and generate an access base address. Specifically, after the theme library application programming interface project is compiled, it is deployed on a formal server, and the access base address can be generated according to the corresponding server domain name and IP (Internet Protocol) address.

[0065] Optionally, the base address can be used, when separating the front end and the back end, to solve the situation of being restricted by the back-end call during the front-end service containerization process by dynamically inserting the base address of the application programming interface, thereby effectively reducing the workload of building the image.

[0066] S43, generate a theme library application programming interface address that can be accessed by other systems. Based on the base address, generate a theme library application programming interface address that can be accessed by other systems.

[0067] Optionally, the implementation method for creating the application programming interface in this embodiment may further include: testing the theme library application programming interface address. Specifically, the application programming interface is tested by assigning values to the application programming interface parameters to check whether the application programming interface executes normally.

[0068] S44, publish the application programming interface address. Specifically, the tested application programming interface address is published, and the published application programming interface address can be accessed by other service systems.

[0069] Optionally, the implementation method for creating the application programming interface in this embodiment may further include: generating a call document for the application programming interface for use by other service systems.

[0070] According to the above description, in this embodiment, by generating and publishing the application programming interface address, the theme library application programming interface can be called by other service systems, thereby satisfying the sharing of the theme library interface service and theme library data by different service systems.

[0071] In an embodiment of the present invention, the service construction method based on multi-level ship data further includes generating a key for the application programming interface, and the key is used to determine the access permission of the system. Specifically, the key includes a key name and key information, and the key information includes encrypted information such as an authorized domain name and an authorized time. When the application programming interface is accessed by other service systems, the other service systems need to obtain the key to successfully access, thereby playing a role in improving the security of the application programming interface service.

[0072] Please refer to Figure 5 , in an embodiment of the present invention, the service construction method based on multi-level ship data includes:

[0073] S51, obtaining ship entity data, input parameters and output parameters of the application programming interface. Specifically, the ship entity data may include: the defined name, type, field attribute name, field attribute type, and field attribute length of the ship entity object. The types of the input parameters and output parameters of the application programming interface may include: character, array, entity object, collection, and / or any combination of the above types. The defined name of the ship entity object and the field attribute name need to meet the specifications. For example, the first letter before each syllable word of the defined name of the ship entity object is capitalized, and the field attribute name is different according to different data categories. For example, when the field data is static data, all letters are capitalized, and when the field data is basic data, the first letter of the first word is lowercase. The name specifications of the input parameters and output parameters of the application programming interface are the same as those of the basic data of the field data, which will not be elaborated here.

[0074] S52. Classify and model the ship entity data to generate a hierarchical model of the ship entity data. Specifically, classify and model the ship entity data through algorithms and corresponding software. According to information such as the field attributes and defined names of the ship entity data, the ship entity data is divided into major categories such as comprehensive data, design data, production data, and management data, as well as sub-categories defined under the major categories. In this embodiment, the major categories and their corresponding sub-categories can support up to 6 layers at most. The hierarchical model of the ship entity data is a data model that organizes data in a tree structure. In the hierarchical model, there is one and only one node without a parent node, and this node is called the root node. Other nodes except the root node have one and only one parent node. Nodes in the hierarchical model that do not have sub-structures are used to store specific ship entity object information, and other nodes are used to store data category information such as comprehensive data and design data.

[0075] S53. Generate a tree-structured ship data directory according to the hierarchical model. The ship data directory includes a ship entity directory, and the ship entity directory conforms to the topological relationship of the hierarchical model. Specifically, the parent directories in the ship entity directory correspond one-to-one with the nodes in the hierarchical model used to store data category information, and the directory names are consistent with the category information. In addition, when generating the ship data directory, it can be generated in sequence according to the topological relationship of the hierarchical model. In addition, in this embodiment, the name of the ship data directory needs to meet the specification, and the letters of each word are in lowercase.

[0076] S54. Generate ship data files under the corresponding ship data directory. The ship data files include the ship entity data, the input parameters, the output parameters, and entity attribute specification information. Specifically, the ship data files correspond one-to-one with the nodes in the hierarchical model used to store specific ship entity object information. The data structures that the ship entity data can be used to store can include structured two-dimensional tables, wide tables, and hash tables, etc. The entity attribute specification information can include: attribute length, attribute coding standard, attribute default value, attribute data format conversion, attribute description, etc. In addition, the input parameters and the output parameters included in the ship data files are used to implement the functions of the application program interface to add, modify, delete, and query ship data in the corresponding database. The data types used to store the input parameters and the output parameters can include any one of characters, arrays, objects, and sets.

[0077] Optionally, the ship data files include binary files that can cross hardware platforms and operating systems.

[0078] S55. Detect the hierarchical model information of the ship entity data. Specifically, the implementation method for detecting the hierarchical model information of the ship entity data includes: obtaining the test cases related to all specific ship entity object information in the hierarchical model; instantiating the test cases related to the hierarchical model; judging whether the hierarchical model is available according to the instantiation result. When an error occurs in the instantiation result, modify the ship entity object information included in the hierarchical model and regenerate the ship data directory. When the instantiation result is correct, execute step S56.

[0079] S56. Generate a ship entity database, which is used for data sharing and maintenance of multiple systems. Specifically, the process of generating the ship entity database includes creating a ship entity data table, and the fields of the ship entity data table correspond one by one to the ship field attributes in S51. In addition, the process of generating the ship entity database also includes the login test of the database connection and the generation of the database table. The login test of the database refers to testing whether the database connection can be logged in normally by obtaining information such as the type, server address, name, account, and password of the database. The generation of the database table refers to completing the generation operation of the database table by receiving a computer instruction, and the computer instruction includes information about the ship entity database, the ship entity database table, and the fields related to the ship entity database table.

[0080] S57, an application programming interface for creating the ship entity database based on the ship data file, and the application programming interface of the ship entity database is used to provide services to other systems. The implementation method of the application programming interface for creating the ship entity database based on the ship data file includes: obtaining the configuration information of the application programming interface; assigning corresponding parameters of the application programming interface according to the configuration information to implement the configuration of the application programming interface; creating a theme library application programming interface project under the directory path of the application programming interface; receiving the compiled theme library application programming interface project and generating an access base address; generating a theme library application programming interface address that can be accessed by other systems; generating a key for the application programming interface, and the key is used to determine the access permission of the system; publishing the application programming interface address; testing the application programming interface address. Specifically, associating the application programming interface with the input parameters and output parameters included in the ship data file and receiving relevant code instructions can realize the operation of the ship entity database through the application programming interface. Secondly, generating a corresponding application programming interface project according to the application programming interface, and the generation framework of the application project includes a WEBAPI framework based on the NETCore technology, and then completing the creation and configuration of the application programming interface project, and deploying it on the formal server by compiling, debugging, publishing to a determined path. Generating an access base address according to the domain name and IP address of the server, and generating a theme library application programming interface address that can be accessed by other systems according to the base address. In addition, in order to ensure that the application programming interface project is not maliciously accessed, it is also necessary to generate a key for the application programming interface to determine the access permission of the system. Finally, publishing the application programming interface address and testing, and generating a call description document for other systems to view at the same time. When other systems call the application programming interface, they need to obtain the address and key information of the application programming interface to normally call the application programming interface. When the application can be normally called, it means that the test is successful. The configuration information of the application programming interface includes interface name, interface description, interface route, access security policy, request method, request parameters, response parameters, etc. The request method only supports the POST request method and the GET request method. Optionally, the configuration information of the application interface also includes database connection information, such as database type, database service address, database name, database account, database password, etc.

[0081] According to the above description, the service construction method based on multi-level ship data in this embodiment includes classifying and modeling ship entity data, generating a ship data catalog, generating a ship entity database, etc. Compared with the conventional service construction method, this method can construct a ship entity database based on a unified entity model under a unified ship data catalog, and construct an application program interface service according to input and output elements, so as to realize the rapid construction and access of ship application services, while ensuring the consistency of the same type of ship data in data format, data type, and data content, and improving data accuracy and access security.

[0082] Please refer to Figure 6 , the present invention also provides a service construction device 600 based on multi-level ship data, including: a data acquisition module 610, a model construction module 620, a catalog generation module 630, a file generation module 640, a database generation module 650, and an interface creation module 660. The data acquisition module 610 is used to acquire ship entity data, input parameters and output parameters of the application program interface; the model construction module 620 is connected to the data acquisition module 610 and is used to classify and model the ship entity data to generate a hierarchical model of the ship entity data; the catalog generation module 630 is connected to the model construction module 620 and is used to generate a tree-structured ship data catalog according to the hierarchical model, and the ship data catalog includes a ship entity catalog, and the ship entity catalog conforms to the topological relationship of the hierarchical model; the file generation module 640 is connected to the data acquisition module 610 and the catalog generation module 630 and is used to generate ship data files under the corresponding ship data catalog, and the ship data files include the ship entity data, the input parameters, the output parameters and entity attribute specification information; the database generation module 650 is used to generate a ship entity database, and the ship entity database is used for data sharing and maintenance of multiple systems; the interface creation module 660 is connected to the file generation module 640 and the database generation module 650 and is used to create an application program interface of the ship entity database based on the ship data file, and the application program interface of the ship entity database is used to provide services to other systems.

[0083] It should be noted that each module in the service construction system corresponds to Figure 1 the corresponding steps in the service method based on multi-level ship data shown, and for the sake of brevity of the specification, no further elaboration is made here.

[0084] Based on the above description of the service construction method based on multi-level ship data, the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it realizes Figure 1 orFigure 5 The service construction method based on multi-level ship data as shown

[0085] Based on the above description of the service construction method based on multi-level ship data, the present invention also provides a server. Please refer to Figure 7 , in an embodiment of the present invention, the server 700 includes: a memory 710, on which a computer program is stored; a processor 720, communicatively connected to the memory 710, for executing the computer program and implementing Figure 1 or Figure 5 the service construction method based on multi-level ship data as shown

[0086] The protection scope of the service construction method based on multi-level ship data of the present invention is not limited to the execution order of the steps listed in this embodiment. Any solution achieved by adding or subtracting steps of the prior art and replacing steps according to the principle of the present invention is included in the protection scope of the present invention.

[0087] In summary, the service construction method, device, medium and server based on multi-level ship data of the present invention are used to improve the accuracy and accessibility of ship data and meet the requirements of data sharing between different ship systems. Therefore, the present invention effectively overcomes various disadvantages in the prior art and has high industrial utilization value.

[0088] The above embodiments are only illustrative of the principles and effects of the present invention, and are not used to limit the present invention. Any person familiar with this technology can modify or change the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or changes made by those with ordinary knowledge in the technical field without departing from the spirit and technical idea disclosed by the present invention should still be covered by the claims of the present invention.

Claims

1. A method for constructing a service based on multi - level ship data, characterized in that, applied to a server, the method for constructing a service based on multi - level ship data includes: Obtain ship entity data, input parameters and output parameters of an application programming interface; Classify and model the ship entity data to generate a hierarchical model of the ship entity data; Generate a tree - structured ship data directory according to the hierarchical model, where the ship data directory includes a ship entity directory, and the ship entity directory conforms to the topological relationship of the hierarchical model; Generate ship data files under the corresponding ship data directory, where the ship data files include the ship entity data, the input parameters, the output parameters and entity attribute specification information; Generate a ship entity database, which is used for data sharing and maintenance of multiple systems; Create an application programming interface of the ship entity database based on the ship data file, and the application programming interface of the ship entity database is used to provide services to other systems; The method for creating the application programming interface includes: creating a theme library application programming interface project under the directory path of the application programming interface; receiving the compiled theme library application programming interface project and generating an access base address; generating a theme library application programming interface address accessed by other systems; publishing the application programming interface address.

2. The method for constructing a service based on multi - level ship data according to claim 1, characterized in that, further includes: Obtain test cases for the hierarchical model; Use the test cases to detect the hierarchical model to determine whether the hierarchical model is available; When the hierarchical model is not available, generate an error prompt message and jump to the step of generating the ship data directory.

3. The method for constructing a service based on multi - level ship data according to claim 1, characterized in that, further includes: Obtain the configuration information of the application programming interface; Assign corresponding parameters of the application programming interface according to the configuration information to implement the configuration of the application programming interface.

4. The method for constructing a service based on multi - level ship data according to claim 1, characterized in that: The ship data directory includes a ship comprehensive data directory, a ship design data directory, a ship production data directory, and a ship management data directory.

5. The method for constructing a service based on multi - level ship data according to claim 4, characterized in that, further includes: Test the application programming interface address.

6. The method for constructing a service based on multi - level ship data according to claim 4, characterized in that, further includes: Generate a key for the application programming interface, and the key is used to determine the access permission of the system.

7. A device for constructing a service based on multi - level ship data, characterized in that, includes: A data acquisition module for obtaining ship entity data, input parameters and output parameters of an application programming interface; A model construction module connected to the data acquisition module for classifying and modeling the ship entity data to generate a hierarchical model of the ship entity data; A directory generation module, connected to the model construction module, is used to generate a tree-structured ship data directory according to the hierarchical model. The ship data directory includes a ship entity directory, and the ship entity directory conforms to the topological relationship of the hierarchical model; A file generation module, connected to the data acquisition module and the directory generation module, is used to generate ship data files under the corresponding ship data directory. The ship data files include the ship entity data, the input parameters, the output parameters, and the entity attribute specification information; A database generation module is used to generate a ship entity database, and the ship entity database is used for data sharing and maintenance of multiple systems; An interface creation module, connected to the file generation module and the database generation module, is used to create an application program interface of the ship entity database based on the ship data file. The application program interface of the ship entity database is used to provide services to other systems; The implementation method of creating the application program interface includes: creating a theme library application program interface project under the directory path of the application program interface; receiving the compiled theme library application program interface project and generating an access base address; generating a theme library application program interface address accessed by other systems; and publishing the application program interface address.

8. A computer-readable storage medium, on which a computer program is stored, characterized in that: when the computer program is executed by a processor, it implements the service construction method based on ship multi-level data according to any one of claims 1-6.

9. A server, characterized in that, the server includes: a memory, on which a computer program is stored; a processor, communicatively connected to the memory, and when calling the computer program, executes the service construction method based on ship multi-level data according to any one of claims 1-6.

Citation Information

Patent Citations

  • Designing method of data sharing interface for vessel traffic management system

    CN102043620A

  • Directory tree structured data and simulation system for supporting simulation of ship construction process

    CN103440384A