CN105760532B - Resource sharing system and method based on Web Service - Google Patents

Resource sharing system and method based on Web Service Download PDF

Info

Publication number
CN105760532B
CN105760532B CN201610122447.5A CN201610122447A CN105760532B CN 105760532 B CN105760532 B CN 105760532B CN 201610122447 A CN201610122447 A CN 201610122447A CN 105760532 B CN105760532 B CN 105760532B
Authority
CN
China
Prior art keywords
data
module
layer
file
xml
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610122447.5A
Other languages
Chinese (zh)
Other versions
CN105760532A (en
Inventor
张健
刘斌
台宪青
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangsu IoT Research and Development Center
Original Assignee
Jiangsu IoT Research and Development Center
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jiangsu IoT Research and Development Center filed Critical Jiangsu IoT Research and Development Center
Priority to CN201610122447.5A priority Critical patent/CN105760532B/en
Publication of CN105760532A publication Critical patent/CN105760532A/en
Application granted granted Critical
Publication of CN105760532B publication Critical patent/CN105760532B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems

Abstract

The invention relates to a resource sharing system and method based on Web Service, which comprises a storage layer and an interface layer, wherein the interface layer comprises a Web Service interface module for receiving a data operation request in XML format, and the interface layer verifies and analyzes the data operation request received by the Web Service interface module to obtain a corresponding domain object after analysis; and the interface layer transmits the analyzed field object to the service logic layer, the service logic layer performs required access operation processing on the storage layer through the data access layer according to the type of the field object, and generates an execution operation result in a corresponding XML format according to the access operation processing result of the data stored in the storage layer through the interface layer. The invention can effectively realize the sharing of resources, ensure the effectiveness and the safety of the resources and improve the sequence and the effectiveness of reading and writing the files.

Description

Resource sharing system and method based on Web Service
Technical Field
The invention relates to a resource sharing system and a method, in particular to a resource sharing system and a method based on Web Service, belonging to the technical field of data processing.
Background
With the advent of the big data era, it has become a trend to aggregate data of a plurality of independent systems for uniform data exchange, data mining, and data analysis. However, different systems often adopt different database management systems and file systems, and in order to uniformly manage and process data and promote resource sharing, these distributed heterogeneous data sources need to be integrated.
At present, a representative resource sharing method is to provide access rights of a system database or a file system to other systems, and the other systems directly access the database system or the file system through the access rights. However, there are some problems in doing so, other systems are not easy to access and import shared data, and need to acquire access rights first, and there is a certain security problem. In addition, the method cannot verify the data to be imported, and the safety and the validity of the data are ensured. When the access pressure to the file system is high, the validity and the sequence of storage cannot be guaranteed, and the specified file is not easy to be inquired.
Disclosure of Invention
The invention aims to overcome the defects in the prior art, and provides a resource sharing system and method based on Web Service, which have compact structure, can effectively realize resource sharing, ensure the effectiveness and safety of resources, improve the sequence and effectiveness of file reading and writing, and are safe and reliable.
According to the technical scheme provided by the invention, the resource sharing system based on Web Service comprises a storage layer for storing relational data and file data and an interface layer for receiving a data operation request, wherein the interface layer comprises a Web Service interface module for receiving the XML format data operation request, and the interface layer verifies and analyzes the data operation request received by the Web Service interface module so as to obtain a corresponding domain object after analysis; and the interface layer transmits the analyzed field object to the service logic layer, the service logic layer performs required access operation processing on the storage layer through the data access layer according to the type of the field object, and generates an execution operation result in a corresponding XML format according to the access operation processing result of the data stored in the storage layer through the interface layer.
The interface layer also comprises an XML verification module, an XML analysis module and an XML generation module, wherein the XML verification module carries out XSD inspection on the data operation request in the XML format received by the Web Service interface module, after the data operation request in the XML format is verified, the data operation request in the XML format is analyzed by the XML analysis module to obtain a corresponding field object, and the XML generation module generates the required operation processing data in the XML format according to the access operation processing result returned by the Service logic layer.
The business logic layer comprises a structured data import module, a structured data query module, a structured data export module, a file data import module, a file data query module and a file data export module;
the data access layer comprises a structured data access module for adding, deleting, modifying and searching the relational data, a local file access module for reading and writing the local file and an FTP file access module for reading and writing the remote file.
The domain objects obtained by analyzing the data operation request by the interface layer comprise import of relational data, query of the relational data, export of the relational data, import of file data, query of the file data and export of the file data.
A resource sharing method based on Web Service provides a storage layer for storing relational data and file data and an interface layer for receiving a data operation request, wherein the interface layer comprises a Web Service interface module for receiving a data operation request in an XML format, and the interface layer verifies and analyzes the data operation request received by the Web Service interface module to obtain a corresponding domain object after analysis; and the interface layer transmits the analyzed field object to the service logic layer, the service logic layer performs required access operation processing on the storage layer through the data access layer according to the type of the field object, and generates an execution operation result in a corresponding XML format according to the access operation processing result of the data stored in the storage layer through the interface layer.
The domain objects obtained by analyzing the data operation request by the interface layer comprise import of relational data, query of the relational data, export of the relational data, import of file data, query of the file data and export of the file data.
The interface layer also comprises an XML verification module, an XML analysis module and an XML generation module, wherein the XML verification module carries out XSD inspection on the data operation request in the XML format received by the Web Service interface module, after the data operation request in the XML format is verified, the data operation request in the XML format is analyzed by the XML analysis module to obtain a corresponding field object, and the XML generation module generates the required operation processing data in the XML format according to the access operation processing result returned by the Service logic layer.
The business logic layer comprises a structured data import module, a structured data query module, a structured data export module, a file data import module, a file data query module and a file data export module;
the data access layer comprises a structured data access module for adding, deleting, modifying and searching the relational data, a local file access module for reading and writing the local file and an FTP file access module for reading and writing the remote file.
The invention has the advantages that: the system can provide Web Service for importing, inquiring and exporting the relational data and the file data, so that other systems can be called more easily, and the XML verification module verifies the data operation request in an XSD verification mode to ensure the validity and the safety of the exchanged data. The read-write pressure of the file system is relieved through the message queue in an asynchronous mode, the sequence and the effectiveness of the file read-write operation are ensured, and the method is wide in application range, safe and reliable.
Drawings
FIG. 1 is a block diagram of the present invention.
FIG. 2 is a flow chart of importing structured data according to the present invention.
FIG. 3 is a flowchart illustrating importing file data according to the present invention.
FIG. 4 is a flow chart of querying structured data in accordance with the present invention.
FIG. 5 is a flowchart of the present invention for querying file data.
FIG. 6 is a flow chart of structured data export according to the present invention.
FIG. 7 is a flow chart of exporting file data according to the present invention.
Detailed Description
The invention is further illustrated by the following specific figures and examples.
As shown in fig. 1: in order to effectively realize the sharing of resources, ensure the effectiveness and the safety of the resources, improve the sequence and the effectiveness of reading and writing of files, and be safe and reliable, the invention comprises a storage layer for storing relational data and file data and an interface layer for receiving data operation requests, wherein the interface layer comprises a Web Service interface module for receiving XML format data operation requests, and the interface layer verifies and analyzes the data operation requests received by the Web Service interface module so as to obtain corresponding domain objects after analysis; and the interface layer transmits the analyzed field object to the service logic layer, the service logic layer performs required access operation processing on the storage layer through the data access layer according to the type of the field object, and generates an execution operation result in a corresponding XML format according to the access operation processing result of the data stored in the storage layer through the interface layer.
Specifically, the storage layer can store the relational data and the file data, the storage layer can store the relational data through the relational database, and the file storage system can store the file data, and the storage layer can store the relational data and the file data specifically, which is well known to those skilled in the art and will not be described herein again.
The interface layer further comprises an XML verification module, an XML analysis module and an XML generation module, wherein the XML verification module performs XSD inspection on the data operation request in the XML format received by the Web Service interface module, after the data operation request in the XML format is verified, the data operation request in the XML format is analyzed by the XML analysis module to obtain a corresponding domain object, and the XML generation module generates the required operation processing data in the XML format according to the access operation processing result returned by the Service logic layer.
In the embodiment of the invention, a Web Service interface module receives a data operation request in an XML format, an XML verification module performs XSD inspection on the data format and the data content of the data operation request, and after the verification is successful, the data operation request is analyzed by an XML analysis module to obtain a corresponding domain object, and the domain object obtained by analyzing the data operation request by the interface layer comprises the import of relational data, the query of the relational data, the export of the relational data, the import of file data, the query of the file data and the export of the file data. The process of performing XSD check on the data operation request by the XML validation module, the process of analyzing the data operation request by the XML analysis module, and the process of generating operation processing data by the XML generation module are well known to those skilled in the art, and are not described herein again.
The business logic layer comprises a structured data import module, a structured data query module, a structured data export module, a file data import module, a file data query module and a file data export module;
the data access layer comprises a structured data access module for adding, deleting, modifying and searching the relational data, a local file access module for reading and writing the local file and an FTP file access module for reading and writing the remote file.
In the embodiment of the invention, a structured data import module realizes storage operation of structured data through a structured data access module, and a file data import module realizes an import function of file data through an FTP file access module and a local file access module (specifically, a memory is read through the FTP file access module and then is stored to the local through the local file access module); the structured data query module is responsible for realizing the business logic of specific data query, the file data query module is responsible for realizing the business logic of specific file query, and the structured data export module is responsible for realizing the business logic of specific structured data export. And the file data export module is responsible for business logic of exporting the specific file data. The local file refers to a file stored in a computer where the storage layer is located, such as a file stored in Linux or Windows by implementing the technical scheme of the present invention. The access process is to read the memory through the FTP file access module and then store the memory to the local through the local file access module, and the specific process is well known to those skilled in the art and is not described herein again.
The following describes specific procedures of importing relational data, querying relational data, exporting relational data, importing file data, querying file data, and exporting file data.
For the import of relational data, specifically: the method comprises the steps of sending a structured data import request in an XML format to a WebService interface, utilizing an XML verification module to verify the format and the content of the structured data import request, analyzing the structured data import request in the XML format by an XML analysis module after the verification is successful, sending a field object obtained by the analysis to a structured data import module in a business logic layer after the field object is analyzed into a corresponding field object, and storing required structured data into a relational database of a storage layer by a structured data access module according to the type of the field object by the structured data import module, wherein the type of the field object is shown in figure 2.
For the import of the file data, specifically, the file data in the XML format is imported into a WebService interface module of an interface layer, the format and the content of the file data import request are verified by using an XML verification module, after the verification is successful, the XML parsing module performs XML parsing on the file data import request in the XML format to parse a corresponding remote file path, and the XML parsing module sends a file name and the remote file path obtained by parsing to a message queue for importing the file data. The file data import module takes out the message from the message queue and analyzes the file operation type, the file name and the remote file path. And reading the corresponding file by using an FTP file access module of the data access layer and calling a local file access module to store the corresponding file to a local file system. The file path, where the file name and file path are stored locally, is then stored in a file index table in the database, as shown in fig. 3.
For queries of structured data, specifically: the method comprises the steps of importing a structured data query request in an XML format into a Web Service interface module of an interface layer, utilizing an XML verification module to verify the format and the content of the structured data query request, after the verification is successful, then utilizing an XML analysis module to conduct XML analysis on the structured data query request in the XML format so as to analyze the data type to be queried and the corresponding query condition, sending the data type to be queried and the corresponding query condition to a structured data query module in a Service logic layer, utilizing a structured data access module in a data access layer to query by the structured data query module, utilizing an XML generation module to generate a query result if the query result is obtained, and returning the query result to a client, otherwise, returning the query result to be absent, as shown in figure 4.
For the query of the file data, specifically, the file data query request in the XML format is imported into a Web Service interface module in an interface layer, the format and the content of the file data query request are verified by using an XML verification module, after the verification is successful, the file data query request in the XML format is subjected to XML parsing by using an XML parsing module so as to parse a file name to be queried, the parsed file name is sent to a file data query module in a Service logic layer, the file data query module queries a file index table in a storage layer by using a local file access module, if the query result is obtained, the query result is generated by using an XML generation module to feed back and output, otherwise, the query result is returned to be absent, as shown in fig. 5.
For exporting structured data, specifically, an export request of structured data in an XML format is imported into a Web Service interface module in an interface layer, the export request of structured data is subjected to format and content verification by using an XML verification module, after the verification is successful, the export request of structured data in the XML format is subjected to XML parsing by using an XML parsing module so as to parse export conditions, data is queried from a relational database according to the export conditions, XML format data is generated by using an XML generation module, and the generated XML format data is output, as shown in fig. 6.
For the export function of the file data, specifically, the file data export request in the XML format is imported into a Web Service interface module in an interface layer, the format and the content of the file data export request are verified by using an XML verification module, after the verification is successful, the file data export request in the XML format is subjected to XML parsing by using an XML parsing module so as to parse the file name and the exported remote file path, and the parsed file name and the exported remote file path are sent to a message queue. The file data export module fetches the message from the message queue, searches the local path of the file from the file index table in the storage layer by using the file name, fetches the file by using the local file access module, and uploads the file to a specified remote directory by using the FTP file access module, as shown in fig. 7.
To sum up, the resource sharing method based on Web Service of the invention specifically comprises: providing a storage layer for storing relational data and file data and an interface layer for receiving a data operation request, wherein the interface layer comprises a Web Service interface module for receiving the XML format data operation request, and the interface layer verifies and analyzes the data operation request received by the Web Service interface module to obtain a corresponding domain object after analysis; and the interface layer transmits the analyzed field object to the service logic layer, the service logic layer performs required access operation processing on the storage layer through the data access layer according to the type of the field object, and generates an execution operation result in a corresponding XML format according to the access operation processing result of the data stored in the storage layer through the interface layer.
The invention can provide Web Service for the import, query and export of relational data and file data, so that other systems can be called more easily. The read-write pressure of the file system is relieved through the message queue in an asynchronous mode, the sequence and the effectiveness of the file read-write operation are ensured, and the method is wide in application range, safe and reliable.

Claims (4)

1. A resource sharing system based on Web Service is characterized in that: the system comprises a storage layer for storing relational data and file data and an interface layer for receiving a data operation request, wherein the interface layer comprises a Web Service interface module for receiving the XML format data operation request, and the interface layer verifies and analyzes the data operation request received by the Web Service interface module to obtain a corresponding domain object after analysis; the interface layer transmits the analyzed field object to the service logic layer, the service logic layer performs required access operation processing on the storage layer through the data access layer according to the type of the field object, and generates an execution operation result corresponding to an XML format according to the access operation processing result of the data stored in the storage layer through the interface layer;
the business logic layer comprises a structured data import module, a structured data query module, a structured data export module, a file data import module, a file data query module and a file data export module;
the data access layer comprises a structured data access module for adding, deleting, modifying and searching the relational data, a local file access module for reading and writing local files and an FTP file access module for reading and writing remote files;
the interface layer also comprises an XML verification module, an XML analysis module and an XML generation module, wherein the XML verification module carries out XSD inspection on the data operation request in the XML format received by the Web Service interface module, after the data operation request in the XML format is verified, the data operation request in the XML format is analyzed by the XML analysis module to obtain a corresponding field object, and the XML generation module generates the required operation processing data in the XML format according to the access operation processing result returned by the Service logic layer.
2. The Web Service-based resource sharing system according to claim 1, wherein: the domain objects obtained by analyzing the data operation request by the interface layer comprise import of relational data, query of the relational data, export of the relational data, import of file data, query of the file data and export of the file data.
3. A resource sharing method based on Web Service is characterized in that: providing a storage layer for storing relational data and file data and an interface layer for receiving a data operation request, wherein the interface layer comprises a Web Service interface module for receiving the XML format data operation request, and the interface layer verifies and analyzes the data operation request received by the Web Service interface module to obtain a corresponding domain object after analysis; the interface layer transmits the analyzed field object to the service logic layer, the service logic layer performs required access operation processing on the storage layer through the data access layer according to the type of the field object, and generates an execution operation result corresponding to an XML format according to the access operation processing result of the data stored in the storage layer through the interface layer;
the business logic layer comprises a structured data import module, a structured data query module, a structured data export module, a file data import module, a file data query module and a file data export module;
the data access layer comprises a structured data access module for adding, deleting, modifying and searching the relational data, a local file access module for reading and writing local files and an FTP file access module for reading and writing remote files;
the interface layer also comprises an XML verification module, an XML analysis module and an XML generation module, wherein the XML verification module carries out XSD inspection on the data operation request in the XML format received by the Web Service interface module, after the data operation request in the XML format is verified, the data operation request in the XML format is analyzed by the XML analysis module to obtain a corresponding field object, and the XML generation module generates the required operation processing data in the XML format according to the access operation processing result returned by the Service logic layer.
4. The Web Service-based resource sharing method according to claim 3, wherein: the domain objects obtained by analyzing the data operation request by the interface layer comprise import of relational data, query of the relational data, export of the relational data, import of file data, query of the file data and export of the file data.
CN201610122447.5A 2016-03-03 2016-03-03 Resource sharing system and method based on Web Service Active CN105760532B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610122447.5A CN105760532B (en) 2016-03-03 2016-03-03 Resource sharing system and method based on Web Service

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610122447.5A CN105760532B (en) 2016-03-03 2016-03-03 Resource sharing system and method based on Web Service

Publications (2)

Publication Number Publication Date
CN105760532A CN105760532A (en) 2016-07-13
CN105760532B true CN105760532B (en) 2020-02-14

Family

ID=56332500

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610122447.5A Active CN105760532B (en) 2016-03-03 2016-03-03 Resource sharing system and method based on Web Service

Country Status (1)

Country Link
CN (1) CN105760532B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106713018B (en) * 2016-12-08 2020-01-03 天翼物联科技有限公司 Method for scheduling message queue service data and implementing message queue
CN109460912B (en) * 2018-10-31 2021-06-29 泰康保险集团股份有限公司 Data processing method, data processing device, storage medium and electronic equipment
CN111858596A (en) * 2020-07-22 2020-10-30 广东电网有限责任公司 Data acquisition method and device, computer equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101291337A (en) * 2008-05-30 2008-10-22 同济大学 Grid resource management system and method
CN102316169A (en) * 2011-09-29 2012-01-11 北京邮电大学 Method for realizing quick service convergence and general service platform
CN102609769A (en) * 2011-01-19 2012-07-25 上海中信信息发展股份有限公司 Data acquisition tool and data acquisition method
CN103577599A (en) * 2013-11-15 2014-02-12 北京邮电大学 Method and device for storing local data through mobile terminal
CN104809553A (en) * 2015-04-20 2015-07-29 广东工业大学 Multi-source electronic commerce data processing platform and method for heterogeneous data

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8732201B2 (en) * 2012-02-28 2014-05-20 Software Ag Systems and/or methods for automatically deriving web service permissions based on XML structure permissions

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101291337A (en) * 2008-05-30 2008-10-22 同济大学 Grid resource management system and method
CN102609769A (en) * 2011-01-19 2012-07-25 上海中信信息发展股份有限公司 Data acquisition tool and data acquisition method
CN102316169A (en) * 2011-09-29 2012-01-11 北京邮电大学 Method for realizing quick service convergence and general service platform
CN103577599A (en) * 2013-11-15 2014-02-12 北京邮电大学 Method and device for storing local data through mobile terminal
CN104809553A (en) * 2015-04-20 2015-07-29 广东工业大学 Multi-source electronic commerce data processing platform and method for heterogeneous data

Also Published As

Publication number Publication date
CN105760532A (en) 2016-07-13

Similar Documents

Publication Publication Date Title
CN108810006B (en) Resource access method, device, equipment and storage medium
US11403305B2 (en) Performing data mining operations within a columnar database management system
CN108536778B (en) Data application sharing platform and method
CN110162524B (en) Configuration data management method, device, computer equipment and storage medium
US20120203782A1 (en) Method and system for data provenance management in multi-layer systems
CN107092535B (en) Method and apparatus for data storage of test interface
US20100228794A1 (en) Semantic document analysis
US20180129712A1 (en) Data provenance and data pedigree tracking
CN105760532B (en) Resource sharing system and method based on Web Service
CN112860730A (en) SQL statement processing method and device, electronic equipment and readable storage medium
WO2017174013A1 (en) Data storage management method and apparatus, and data storage system
CN112328486A (en) Interface automation test method and device, computer equipment and storage medium
CN114297204A (en) Data storage and retrieval method and device for heterogeneous data source
CN113535677B (en) Data analysis query management method, device, computer equipment and storage medium
CN103440302B (en) The method and system of Real Data Exchangs
CN112417016B (en) Data exchange method, system, equipment and storage medium
CN112819617B (en) Data uplink method and device, electronic equipment and storage medium
CN116069725A (en) File migration method, device, apparatus, medium and program product
CN108959952B (en) Data platform authority control method, device and equipment
CN115168310A (en) Log management method, device, medium and system in LDAP system
CN115061851A (en) Data verification method and device, storage medium and electronic equipment
CN117171108B (en) Virtual model mapping method and system
CN113313540B (en) Contract generation method and device, electronic equipment and readable storage medium
CN115758475A (en) Resource data aggregation method and device, computer equipment and storage medium
CN117271478A (en) Data migration method and device, storage medium and electronic equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant