Cloud platform-based logistics data sharing method, device and equipment, and storage medium
By using a cloud-based logistics data sharing method, the problem of heterogeneous data not being able to be shared was solved, enabling data interoperability between different systems, reducing costs and improving security and integrity.
Patent Information
- Application Number
- CN202110420567.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-19
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2041-04-19
AI Technical Summary
The inability to connect and share heterogeneous data between different logistics systems creates information silos, increasing the difficulty and cost of data sharing.
By using a cloud-based logistics data sharing method, the system receives data upload requests from terminals, separates and converts initial logistics data into structure and content metadata, stores the data in a cache library using a pre-built cloud platform interface and data conversion protocol, and performs data conversion and transmission according to the retrieval request, thereby achieving data interoperability between different systems.
It effectively reduces the cost of sharing heterogeneous logistics data, reduces redundant development resources and time, realizes data interoperability and sharing between different systems, and improves the security and integrity of data transmission.
Smart Images

Figure CN113190360B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of cloud technology, and in particular to a data sharing method, apparatus, device, and storage medium based on a cloud platform. Background Technology
[0002] In recent years, cloud platforms have evolved into a general-purpose platform capable of providing users with a wide variety of resources. Simultaneously, cloud platforms have demonstrated their applicability across a broad range of fields. The continuous development of cloud platforms has provided new opportunities for the development of logistics informatization. A key aspect of information sharing in logistics cloud computing is the exchange and sharing of heterogeneous data existing in various logistics centers.
[0003] Currently, in the era of big data, the integration and sharing of information will bring huge incremental value to data. However, since each logistics center application platform is built independently, the implementation methods and execution standards of the data system are not uniform. Based on different application systems, the data used is diverse, which will also lead to the generation of various heterogeneous data in each subsystem, forming information silos and causing great inconvenience to the sharing of data information. Summary of the Invention
[0004] The main objective of this invention is to solve the problem of the inability to connect and share heterogeneous logistics data between different systems.
[0005] The first aspect of this invention provides a cloud platform-based logistics data sharing method, comprising: receiving a data upload request sent by a first terminal, the data upload request carrying a first identifier, the first identifier indicating initial logistics data to be uploaded by the first terminal; obtaining the initial logistics data from the first terminal according to the first identifier and transmitting the initial logistics data to a cache library of the cloud platform, the initial logistics data including a first file and a second file, the first file storing structural metadata of the initial logistics data, and the second file storing content metadata of the initial logistics data; calling a preset cloud platform interface to perform data conversion on the initial logistics data in the cache library according to a preset data conversion protocol to obtain an intermediate file, and transmitting the intermediate file to a shared database of the cloud platform; receiving a data acquisition request sent by a second terminal, the data acquisition request carrying a second identifier, the second identifier indicating target logistics data to be acquired by the second terminal; calling the cloud platform interface to obtain candidate logistics data matching the second identifier from the shared database; performing data conversion on the candidate logistics data according to the preset data conversion protocol to obtain the target logistics data, and sending the target logistics data to the second terminal.
[0006] Optionally, in a first implementation of the first aspect of the present invention, after receiving the data upload request sent by the first terminal and before obtaining the initial logistics data from the first terminal according to the first identifier and transmitting the initial logistics data to the cache library of the cloud platform, the method further includes: reading an interface configuration file in a preset configuration information database, the interface configuration file including input data type information and response result data type information; configuring the cloud platform interface based on the interface configuration file; establishing a data mapping relationship between the cloud platform interface and the shared database of the cloud platform according to a preset data item description file, and determining a data conversion protocol.
[0007] Optionally, in a second implementation of the first aspect of the present invention, the step of establishing a data mapping relationship between the cloud platform interface and the shared database of the cloud platform according to a preset data item description file, and determining a data conversion protocol, includes: scanning the preset data item description file to obtain preset data item type information; performing type matching on a first data item in the interface configuration file according to the preset data item type information to obtain a first data item type; determining whether there is a second data item in the interface configuration file that does not match the preset data item type information; if there is a second data item, setting the data type of the second data item to an unknown data item type; establishing a data mapping relationship between the cloud platform interface and the shared database of the cloud platform according to the first data item type and the unknown data item type to obtain a data mapping relationship file; determining the data conversion protocol according to the data mapping relationship file, and sending the data conversion protocol to the interface database of the cloud platform interface.
[0008] Optionally, in a third implementation of the first aspect of the present invention, the step of establishing a data mapping relationship between the cloud platform interface and the shared database of the cloud platform based on the first data item type and the unknown data item type, and obtaining a data mapping relationship file, includes: reading the first data item type, constructing a first data conversion relationship between the first data item type and the data item type in the data item type information, and generating a first data mapping relationship file; reading the unknown data item type, constructing a second data conversion relationship between the unknown data item type and the data item type in the data item type information, and generating a second data mapping relationship file; and merging the first data mapping relationship and the second data mapping relationship to obtain a data mapping relationship file between the cloud platform interface and the shared database of the cloud platform.
[0009] Optionally, in the fourth implementation of the first aspect of the present invention, the step of calling a preset cloud platform interface to perform data conversion on the initial logistics data in the cache library according to a preset data conversion protocol to obtain an intermediate file, and transmitting the intermediate file to the shared database of the cloud platform includes: parsing the data conversion protocol through the cloud platform interface to obtain the data mapping relationship file; transposing the data items to be processed corresponding to the initial logistics data based on the data mapping relationship file to obtain the intermediate file; and transmitting the intermediate file to the shared database.
[0010] Optionally, in a fifth implementation of the first aspect of the present invention, the step of transposing the data items to be processed in the initial logistics data based on the data mapping relationship file to obtain the intermediate file includes: scanning the initial logistics data, reading the structural information metadata in the first file and the content information metadata in the second file; generating a first target data item corresponding to the structural information metadata and a second target data item corresponding to the content information metadata according to the data mapping relationship file; merging the first target data item and the second target data item into a data item to be processed; and calling the preset mapping conversion function of the cloud platform interface to perform mapping processing on the data item to be processed to obtain the intermediate file.
[0011] Optionally, in a sixth implementation of the first aspect of the present invention, the step of obtaining the initial logistics data from the first terminal according to the first identifier and transmitting the initial logistics data to the cache of the cloud platform includes: scanning the first identifier to obtain the permission verification information in the first identifier; when the permission verification information meets a preset condition, reading the transmission configuration file of the first identifier; reading the initial logistics data according to the transmission configuration file and sending the initial logistics data to the cache of the cloud platform.
[0012] A second aspect of the present invention provides a cloud-based logistics data sharing device, comprising: a first receiving module, configured to receive a data upload request sent by a first terminal, the data upload request carrying a first identifier, the first identifier indicating initial logistics data to be uploaded by the first terminal; a data transmission module, configured to obtain the initial logistics data from the first terminal according to the first identifier and transmit the initial logistics data to a cache library of the cloud platform, the initial logistics data including a first file and a second file, the first file storing structural metadata of the initial logistics data, the second file storing content metadata of the initial logistics data; and a data conversion module, configured to call a preset cloud... The platform interface performs data conversion on the initial logistics data in the cache library according to a preset data conversion protocol to obtain an intermediate file, and transmits the intermediate file to the shared database of the cloud platform; the second receiving module is used to receive a data acquisition request sent by the second terminal, the data acquisition request carrying a second identifier, the second identifier being used to indicate the target logistics data to be acquired by the second terminal; the data acquisition module is used to call the cloud platform interface to acquire candidate logistics data matching the second identifier from the shared database; the data sending module is used to perform data conversion on the candidate logistics data according to the preset data conversion protocol to obtain the target logistics data and send the target logistics data to the second terminal.
[0013] Optionally, in a first implementation of the second aspect of the present invention, the cloud-based logistics data sharing device further includes:
[0014] The data reading module is used to read the interface configuration file in the preset configuration information library. The interface configuration file includes input data type information and response data type information. The interface configuration module is used to configure the cloud platform interface based on the interface configuration file. The protocol determination module is used to establish the data mapping relationship between the cloud platform and the cloud platform's shared database according to the preset data item description file, and determine the data conversion protocol.
[0015] Optionally, in a second implementation of the second aspect of the present invention, the protocol determination module includes: a scanning unit, configured to scan the preset data item description file to obtain preset data item type information; a matching unit, configured to perform type matching on the first data item in the interface configuration file according to the preset data item type information to obtain a first data item type; a judging unit, configured to judge whether there is a second data item in the interface configuration file that does not match the preset data item type information; a setting unit, configured to set the data type of the second data item to an unknown data item type if the second data item exists; an establishment unit, configured to establish a data mapping relationship between the cloud platform interface and the shared database of the cloud platform according to the first data item type and the unknown data item type to obtain a data mapping relationship file; and a sending unit, configured to determine the data conversion protocol according to the data mapping relationship file and send the data conversion protocol to the interface database of the cloud platform interface.
[0016] Optionally, in a third implementation of the second aspect of the present invention, the establishing unit is specifically used for: reading the first data item type, constructing a first data conversion relationship between the first data item type and the data item type in the data item type information, and generating a first data mapping relationship file; reading the unknown data item type, constructing a second data conversion relationship between the location data item type and the data item type in the data item type information, and generating a second data mapping relationship file; merging the first data mapping relationship and the second data mapping relationship to obtain a data mapping relationship file between the cloud platform interface and the shared database of the cloud platform.
[0017] Optionally, in a fourth implementation of the second aspect of the present invention, the data conversion module includes: a parsing unit, configured to parse the data conversion protocol through the cloud platform interface to obtain the data mapping relationship file; a transposition unit, configured to transpose the data items to be processed corresponding to the initial logistics data based on the data mapping relationship file to obtain the intermediate file; and a transmission unit, configured to transmit the intermediate file to the shared database.
[0018] Optionally, in a fifth implementation of the second aspect of the present invention, the transpose unit is specifically used to: scan the initial logistics data, read the structural information metadata in the first file and the content information metadata in the second file; generate a first target data item corresponding to the structural information metadata and a second target data item corresponding to the content information metadata according to the data mapping relationship file; merge the first target data item and the second target data item into a data item to be processed; and call the preset mapping conversion function of the cloud platform interface to perform mapping processing on the data item to be processed to obtain the intermediate file.
[0019] Optionally, in a sixth implementation of the second aspect of the present invention, the data transmission module is specifically used to: scan the first identifier and obtain the permission verification information in the first identifier; when the permission verification information meets preset conditions, read the transmission configuration file of the first identifier; read the initial logistics data according to the transmission configuration file and send the initial logistics data to the cache library of the cloud platform.
[0020] A third aspect of the present invention provides a cloud-based logistics data sharing device, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor invokes the instructions in the memory to cause the cloud-based logistics data sharing device to execute the aforementioned cloud-based logistics data sharing method.
[0021] A fourth aspect of the present invention provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the above-described cloud-based logistics data sharing method.
[0022] In the technical solution provided by this invention, a data upload request is received from a first terminal, the data upload request carrying a first identifier, the first identifier being used to indicate the initial logistics data to be uploaded by the first terminal; the initial logistics data is obtained from the first terminal according to the first identifier and transmitted to the cache library of the cloud platform, the initial logistics data including a first file and a second file, the first file being used to store the structural information metadata of the initial logistics data, and the second file being used to store the content information metadata of the initial logistics data; a preset cloud platform interface is invoked to perform data conversion on the initial logistics data in the cache library according to a preset data conversion protocol to obtain an intermediate file, and the intermediate file is transmitted to the shared database of the cloud platform; a data acquisition request is received from a second terminal, the data acquisition request carrying a second identifier, the second identifier being used to indicate the target logistics data to be acquired by the second terminal; the cloud platform interface is invoked to obtain candidate logistics data matching the second identifier from the shared database; the candidate logistics data is performed to perform data conversion on the candidate logistics data according to the preset data conversion protocol to obtain the target logistics data, and the target logistics data is sent to the second terminal. In this embodiment of the invention, based on a cloud platform, computing resources are fully utilized, which can effectively reduce the development cost of exchange and sharing programs. The cloud platform interface configured in this embodiment of the invention reduces the resource and time costs of repeated development, reduces resource waste, and enables heterogeneous logistics data between different systems to achieve data interoperability and sharing. Attached Figure Description
[0023] Figure 1 This is a schematic diagram of an embodiment of the logistics data sharing method based on a cloud platform according to the present invention;
[0024] Figure 2 This is a schematic diagram of another embodiment of the logistics data sharing method based on a cloud platform according to the present invention;
[0025] Figure 3 This is a schematic diagram of one embodiment of the logistics data sharing device based on a cloud platform according to the present invention;
[0026] Figure 4 This is a schematic diagram of one embodiment of a cloud-based logistics data sharing device according to the present invention. Detailed Implementation
[0027] This invention provides a cloud-based method, apparatus, device, and storage medium for sharing logistics data. The terms "first," "second," "third," "fourth," etc. (if applicable) in the specification, claims, and accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" or "having" and any variations thereof are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.
[0028] For ease of understanding, the specific process of the embodiments of the present invention is described below. Please refer to [link / reference]. Figure 1 One embodiment of the logistics data sharing method based on a cloud platform in this invention includes:
[0029] 101. Receive a data upload request sent by the first terminal. The data upload request carries a first identifier, which is used to indicate the initial logistics data that the first terminal is about to upload.
[0030] It is understood that the executing entity of this invention can be a cloud-based logistics data sharing device or a server; the specific implementation is not limited here. This embodiment of the invention will be described using a server as an example.
[0031] In this embodiment, the first terminal can be a logistics data processing terminal in a logistics center. The server receives an upload data request from the logistics data processing terminal. This upload request carries a first identifier, which specifically refers to the transmission protocol configuration file corresponding to the upload request and the data index file of the data to be uploaded by the logistics data terminal. The transmission protocol configuration file is a configuration file used by the server to initiate a data transmission channel to the logistics data processing terminal. For example, after configuring the transmission protocol according to the transmission protocol configuration file, the transmission method defaults to using the User Datagram Protocol (UDP) for transmission. UDP is a connectionless protocol, and when transmission is interrupted, it automatically switches to the Transmission Control Protocol (TCP) for transmission. TCP is a connection-oriented, reliable, byte-stream-based transport layer communication protocol.
[0032] 102. Obtain initial logistics data from the first terminal according to the first identifier and transmit the initial logistics data to the cache library of the cloud platform. The initial logistics data includes a first file and a second file. The first file is used to store the structural information metadata of the initial logistics data, and the second file is used to store the content information metadata of the initial logistics data.
[0033] Specifically, after obtaining the transmission protocol configuration file, the server initiates a data channel from its own data port to the logistics data processing terminal. Based on the data index file in the first identifier, the server retrieves the initial logistics data in XML file format required for uploading from the initial logistics data processing terminal. This initial logistics data is related to receiving goods, such as the quantity (units) of goods received, the number of orders, the vehicle's loading capacity, the area of the receiving area, the receiving operation time, and the number of SKUs received daily. In this embodiment, the initial logistics data is stored in two parts: the first file and the second file mentioned above. The structure information metadata refers to data such as field names and types, while the content information metadata refers to the values of sub-elements in each row and sub-elements in each column of the initial logistics data information. This ensures the integrity of the initial logistics data information and avoids data loss during the upload process.
[0034] Optionally, step 102 includes:
[0035] Scan the first identifier to obtain the permission verification information within it;
[0036] When the permission verification information meets the preset conditions, read the transmission configuration file of the first identifier;
[0037] The initial logistics data is read according to the transmission configuration file and sent to the cloud platform's cache.
[0038] Specifically, the server obtains the identity and permission verification information of the logistics data processing terminal with the first identifier. This permission verification information includes a verification command or the username and password of the logistics data processing terminal. The server determines whether the data processing terminal has the corresponding permissions by verifying the verification command or the username and password. If the verification fails, an error message is returned and a prompt for re-verification is sent to the first terminal. If the verification is successful, a connection is established with the first terminal, and based on the first identifier, the initial logistics data is read through the data transmission channel and sent to the cache of the cloud platform. This can improve the security of data sharing and reduce the risk of data leakage.
[0039] 103. Call the preset cloud platform interface to convert the initial logistics data in the cache library according to the preset data conversion protocol to obtain an intermediate file, and then transfer the intermediate file to the shared database of the cloud platform.
[0040] Specifically, the pre-built cloud platform interface is described using Web Services Description Language (WSDL). WSDL describes cloud services and access methods, specifying service locations and operation methods. The pre-built cloud platform interface encapsulates a data conversion protocol, which is determined based on the initial logistics data type and the data types in the cloud platform. The server calls this interface to convert the initial logistics data, including the first and second files. For example, the server's data conversion module maps the value 2 of a sub-element of the content information metadata using a pre-built data conversion function, assuming this function is f(x) = x. 2 The result is 4, which is a simple example for easy understanding and does not limit the actual data conversion function used in this embodiment. The converted file of the initial logistics data is sent as an intermediate file to the shared database of the cloud platform.
[0041] 104. Receive a data acquisition request sent by the second terminal. The data acquisition request carries a second identifier, which is used to indicate the target logistics data that the second terminal wants to acquire.
[0042] Specifically, the second terminal can be a logistics data processing terminal of a logistics center. It can be the same terminal as the first terminal or a different terminal. The server receives a data acquisition request sent by the logistics data processing terminal. The data acquisition request carries a second identifier, which specifically refers to the transmission protocol configuration file corresponding to the data acquisition request and the data index file of the data to be acquired by the logistics data terminal. The transmission protocol configuration file is similar to the file described in step 101 above, so it will not be described again here.
[0043] 105. Call the cloud platform interface to retrieve candidate logistics data that matches the second identifier from the shared database;
[0044] Specifically, the server retrieves the required candidate logistics data from the initial logistics data processing terminal (second terminal) by calling the cloud platform interface and according to the data index file in the second identifier. In this embodiment, the data index file is also in XML format, where the candidate logistics data refers to the corresponding data after the initial logistics data has been converted.
[0045] 106. Perform data conversion on the candidate logistics data according to the preset data conversion protocol to obtain the target logistics data and send the target logistics data to the second terminal.
[0046] Specifically, the server uses a cloud platform interface described in WSDL language and a data conversion protocol to convert the candidate logistics data. This data conversion is performed according to the inverse function of the preset data conversion function to obtain the target logistics data. The target logistics data is then returned to the second terminal according to the data transmission protocol in the data acquisition request sent by the second terminal. Since the system type of the second terminal may not be the same as that of the first terminal, the data transmission protocol here will be customized according to the second terminal so that it can be adapted to and fully displayed after the second terminal obtains the target logistics data.
[0047] In this embodiment of the invention, the server receives an upload data request from the logistics data processing terminal, obtains the transmission protocol configuration file based on the upload request, initiates a data channel from its own data port to the logistics data processing terminal, and retrieves the initial logistics data in XML file format to be uploaded from the initial logistics data processing terminal according to the data index file in the first identifier. The initial logistics data is then divided into two parts and saved as the first file and the second file mentioned above. The structural information metadata refers to data such as field names and types, while the content information metadata refers to the values of sub-elements in each row and subordinate sub-elements in each column of the initial logistics data information. The data is then converted according to the data conversion protocol. The initial logistics data in XML format is converted into an intermediate file and transmitted to the shared library. Then, the server obtains the corresponding candidate logistics data according to the data acquisition request of the second terminal, converts it, and returns the target logistics data to the second terminal. In this embodiment of the invention, the initial logistics data is saved in two files, which can greatly reduce the probability of data loss or format errors during transmission or conversion. The interface for data conversion and transmission developed based on the cloud platform can make full use of computing resources, effectively reduce the development cost of the exchange and sharing program, reduce the resource and time costs of repeated development, reduce resource waste, and thus enable data interoperability and sharing of heterogeneous logistics data between different systems.
[0048] Please see Figure 2 Another embodiment of the logistics data sharing method based on a cloud platform in this invention includes:
[0049] 2001. Receive a data upload request sent by the first terminal. The data upload request carries a first identifier, which is used to indicate the initial logistics data that the first terminal is about to upload.
[0050] In this embodiment, the specific implementation of step 2001 is similar to that of step 101 described above, and will not be repeated here.
[0051] 2002. Read the interface configuration file from the preset configuration information database. The interface configuration file includes input data type information and response result data type information.
[0052] Specifically, the interface configuration file refers to an XML file that includes field name information for different text field tags. In this embodiment, the XML file includes input data type information and response result data type corresponding to the input data type. Furthermore, the interface configuration file also includes the data connection format, including the interactive control and data transmission methods.
[0053] 2003. Configure cloud platform interfaces based on interface configuration files;
[0054] Specifically, after reading the interface configuration file, the server parses the configuration file to identify the connection methods between the cloud platform and various target terminals, as well as the interaction control and data transmission methods. The server then configures the cloud platform interface according to these interaction control and data transmission methods.
[0055] 2004. Based on the pre-defined data item description document, establish the data mapping relationship between the cloud platform interface and the cloud platform's shared database, and determine the data conversion protocol;
[0056] Specifically, the data item description file includes the data item name, data item meaning description, alias, data type, length, value range, and value meaning. Based on the specific content of the data item description file, the server matches the detailed content of the data item description for both the input data type information and the response result data type information, and calculates the data conversion function to obtain the data mapping relationship. This allows the server to determine the data conversion protocol that matches the data mapping relationship. In this embodiment, the data conversion function can be calculated based on the conversion relationship between the input data and the response result according to the description file, enabling accurate data conversion and reducing the risk of conversion failure.
[0057] Optionally, step 2004 specifically includes:
[0058] Scan the preset data item description file to obtain the preset data item type information;
[0059] Based on the preset data item type information, the first data item in the interface configuration file is matched to obtain the type of the first data item.
[0060] Determine whether a second data item exists in the interface configuration file that does not match the preset data item type information;
[0061] If a second data item exists, then set the data type of the second data item to an unknown data item type;
[0062] Based on the first data item type and the unknown data item type, establish a data mapping relationship between the cloud platform interface and the cloud platform's shared database to obtain a data mapping relationship file;
[0063] The data conversion protocol is determined based on the data mapping relationship file, and the data conversion protocol is sent to the interface database of the cloud platform interface.
[0064] Specifically, the server scans the data item description file to obtain the preset data item type information, such as A, B, and C. It then scans the data item type information in the interface configuration file, such as D, E, and F. Assuming A corresponds to D, B to E, and C to F, a corresponding mapping is established. Next, it checks if any data items in the interface configuration file do not match the preset data item type. If type G exists in the interface configuration file and cannot be mapped to the preset data item type, it is set as an unknown data item type. When converting the data type format of this unknown data item type, it integrates different data types from various databases with the listed data types. A mapping relationship is established between the integrated data type and the cloud platform to determine the data conversion protocol, thereby avoiding incomplete data conversion due to mismatched data items.
[0065] Optionally, based on the first data item type and the unknown data item type, a data mapping relationship is established between the cloud platform interface and the cloud platform's shared database, resulting in a data mapping relationship file that further includes:
[0066] Read the first data item type, construct the first data conversion relationship between the first data item type and the data item type in the data item type information, and generate the first data mapping relationship file;
[0067] Read the unknown data item type, construct a second data conversion relationship between the unknown data item type and the data item type in the data item type information, and generate a second data mapping relationship file;
[0068] The first and second data mapping relationships are merged to obtain a data mapping relationship file between the cloud platform interface and the cloud platform's shared database.
[0069] Specifically, the server analyzes the values of at least one attribute other than the primary key in the initial logistics data from multiple rows of data, and analyzes the attribute values of specific attributes other than the primary key in the shared database of the cloud platform from multiple rows of data. In other words, it obtains the attribute values of at least one attribute other than the primary key and its corresponding primary key value set from the multiple rows of data in the initial logistics data, and obtains the attribute values of specific attributes other than the primary key and their corresponding primary key value set from the multiple rows of data in the shared database. Specifically, in this step, for each of the at least one attribute other than the primary key in the initial logistics data, all different attribute values of that attribute are obtained from the multiple rows of data in the initial logistics data, and the primary key value set corresponding to each different attribute value of that attribute is obtained. Similarly, for a specific attribute other than the primary key in the shared database, all different attribute values of that specific attribute are obtained from the multiple rows of data in the shared database, and the primary key value set corresponding to each different attribute value of that specific attribute is obtained. Based on the primary key value set, corresponding data mapping relationship files are constructed.
[0070] 2005. Obtain initial logistics data from the first terminal according to the first identifier and transmit the initial logistics data to the cache library of the cloud platform. The initial logistics data includes a first file and a second file. The first file is used to store the structural information metadata of the initial logistics data, and the second file is used to store the content information metadata of the initial logistics data.
[0071] In this embodiment, the specific implementation of step 2005 is similar to that of step 102 described above, and will not be repeated here.
[0072] 2006. Parse the data conversion protocol through the cloud platform interface to obtain the data mapping relationship file;
[0073] Specifically, the server scans the data conversion protocol to obtain the data mapping relationship, so as to facilitate subsequent data conversion processing of the data items to be processed.
[0074] 2007. Based on the data mapping relationship file, the data items to be processed corresponding to the initial logistics data are transposed to obtain an intermediate file;
[0075] Specifically, after obtaining the data mapping relationship file, the server matches the data items of the initial logistics data with the data items in the data mapping relationship file according to the corresponding relationship in the data mapping relationship file. Then, the data item to be processed can be obtained. According to the mapping relationship, the data item to be processed is transposed to obtain the intermediate file, which is convenient for other terminals to process when they need to obtain data.
[0076] Optionally, step 2007 further includes:
[0077] Scan the initial logistics data and read the structural information metadata from the first file and the content information metadata from the second file.
[0078] Based on the data mapping relationship file, generate the first target data item corresponding to the structural information metadata and the second target data item corresponding to the content information metadata;
[0079] Merge the first target data item and the second target data item into a data item to be processed;
[0080] The data items to be processed are mapped by calling the preset mapping and transformation function of the cloud platform interface to obtain an intermediate file.
[0081] Specifically, since the initial logistics data consists of two files, the server matches the first file and the second file separately. First, it matches the structural information metadata in the first file, such as field names and types, and matches the data items corresponding to this structural information metadata. At the same time, it matches the content information metadata in the second file, such as the values of subordinate elements in each column of the content information metadata. Then, it concatenates the matching data items from the first and second files to obtain the data item to be processed, and then transposes the data item to be processed.
[0082] 2008. Transfer the intermediate files to the shared database;
[0083] The server sends intermediate files to the cloud platform's shared database via the cloud platform interface. This completes the data upload phase for heterogeneous logistics data. Subsequently, based on data acquisition or retrieval requests from different terminals, the intermediate files stored in the cloud platform's shared database will be converted to facilitate viewing by different terminals.
[0084] 2009. Receive a data acquisition request sent by the second terminal. The data acquisition request carries a second identifier, which is used to indicate the target logistics data that the second terminal wants to acquire.
[0085] 2010. Call the cloud platform interface to retrieve candidate logistics data that matches the second identifier from the shared database;
[0086] 2011. The candidate logistics data is converted according to the preset data conversion protocol to obtain the target logistics data and the target logistics data is sent to the second terminal.
[0087] In this embodiment, the specific implementation of steps 2009-2011 is similar to that of steps 104-106 above, and will not be repeated here.
[0088] In this embodiment of the invention, the server receives a data upload request sent by a first terminal. The server obtains initial logistics data from the first terminal and saves it in two parts, namely a first file and a second file, to ensure the integrity of the initial logistics data information and avoid data loss during the upload process. The server reads the interface configuration file and configures the cloud platform interface according to the interface configuration file. Based on the specific content of the data item description file, the server matches the detailed content of the data item descriptions of the input data type information and the response result data type information, calculates the data conversion function, obtains the data mapping relationship, determines the conversion protocol based on the mapping relationship, and then obtains the initial logistics data from the first terminal and transmits it to the cache. The system stores data in a shared database. It parses the data conversion protocol through the cloud platform interface to obtain a data mapping file. Based on this mapping file, it transposes the initial logistics data to obtain an intermediate file, which is then transmitted to the shared database. Subsequently, based on data acquisition or retrieval requests from different terminals, the intermediate file stored in the shared cloud platform database is converted to facilitate access by different terminals, thereby enabling the circulation and sharing of logistics data. If the interface configuration file contains data items whose types do not match the preset data item types, their types are set to unknown data item types. This ensures the integrity of the data conversion by selecting the appropriate target data type based on the actual application situation when a new data type cannot be identified.
[0089] Please see Figure 3 One embodiment of the cloud platform-based logistics data sharing device of the present invention includes:
[0090] The first receiving module 301 is used to receive a data upload request sent by the first terminal. The data upload request carries a first identifier, which is used to indicate the initial logistics data to be uploaded by the first terminal.
[0091] The data transmission module 302 is used to obtain the initial logistics data from the first terminal according to the first identifier and transmit the initial logistics data to the cache library of the cloud platform. The initial logistics data includes a first file and a second file. The first file is used to store the structural information metadata of the initial logistics data, and the second file is used to store the content information metadata of the initial logistics data.
[0092] The data conversion module 303 is used to call a preset cloud platform interface to convert the initial logistics data in the cache library according to a preset data conversion protocol, obtain an intermediate file, and transmit the intermediate file to the shared database of the cloud platform.
[0093] The second receiving module 304 is used to receive a data acquisition request sent by the second terminal. The data acquisition request carries a second identifier, which is used to indicate the target logistics data that the second terminal wants to acquire.
[0094] Data acquisition module 305 is used to call the cloud platform interface to obtain candidate logistics data that matches the second identifier from the shared database;
[0095] The data sending module 306 is used to perform data conversion on the candidate logistics data according to the preset data conversion protocol, obtain the target logistics data, and send the target logistics data to the second terminal.
[0096] Optionally, the cloud-based logistics data sharing device further includes:
[0097] Data reading module 307 is used to read interface configuration files in a preset configuration information library. The interface configuration files include input data type information and response data type information.
[0098] Interface configuration module 308 is used to configure the cloud platform interface based on the interface configuration file;
[0099] The protocol determination module 309 is used to establish a data mapping relationship between the cloud platform and the shared database of the cloud platform according to the preset data item description file, and to determine the data conversion protocol.
[0100] Optionally, the protocol determination module 309 includes:
[0101] Scanning unit 3091 is used to scan the preset data item description file to obtain preset data item type information;
[0102] The matching unit 3092 is used to perform type matching on the first data item in the interface configuration file according to the preset data item type information to obtain the first data item type;
[0103] The judgment unit 3093 is used to determine whether there is a second data item in the interface configuration file that does not match the preset data item type information;
[0104] Setting unit 3094 is used to set the data type of the second data item to an unknown data item type if the second data item exists.
[0105] Establishment unit 3095 is used to establish a data mapping relationship between the cloud platform interface and the shared database of the cloud platform according to the first data item type and the unknown data item type, and obtain a data mapping relationship file;
[0106] The sending unit 3096 is used to determine the data conversion protocol according to the data mapping relationship file and send the data conversion protocol to the interface database of the cloud platform interface.
[0107] Optionally, the creation unit can also be specifically used for:
[0108] Read the first data item type, construct a first data conversion relationship between the first data item type and the data item type in the data item type information, and generate a first data mapping relationship file;
[0109] Read the unknown data item type, construct a second data conversion relationship between the location data item type and the data item type in the data item type information, and generate a second data mapping relationship file;
[0110] The first data mapping relationship and the second data mapping relationship are merged to obtain a data mapping relationship file between the cloud platform interface and the shared database of the cloud platform.
[0111] Optionally, the data conversion module 303 includes:
[0112] Parsing unit 3031 is used to parse the data conversion protocol through the cloud platform interface to obtain the data mapping relationship file;
[0113] The transpose unit 3032 is used to transpose the data items to be processed corresponding to the initial logistics data based on the data mapping relationship file to obtain the intermediate file;
[0114] The transmission unit 3033 is used to transmit the intermediate file to the shared database.
[0115] Optionally, the transpose unit 3033 can also be specifically used for:
[0116] Scan the initial logistics data and read the structural information metadata from the first file and the content information metadata from the second file;
[0117] Based on the data mapping relationship file, generate a first target data item corresponding to the structural information metadata and a second target data item corresponding to the content information metadata;
[0118] The first target data item and the second target data item are merged into a data item to be processed;
[0119] The preset mapping and conversion function of the cloud platform interface is called to perform mapping processing on the data items to be processed, thereby obtaining the intermediate file.
[0120] Optionally, the data transmission module 302 can also be specifically used for:
[0121] Scan the first identifier to obtain the permission verification information in the first identifier;
[0122] When the permission verification information meets the preset conditions, the transmission configuration file of the first identifier is read;
[0123] The initial logistics data is read according to the transmission configuration file and sent to the cache library of the cloud platform.
[0124] Figure 4 This is a schematic diagram of a cloud-based logistics data sharing device 400 provided in an embodiment of the present invention. The cloud-based logistics data sharing device 400 can vary significantly due to different configurations or performance. It may include one or more central processing units (CPUs) 410 (e.g., one or more processors) and a memory 420, and one or more storage media 430 (e.g., one or more mass storage devices) for storing application programs 433 or data 432. The memory 420 and storage media 430 can be temporary or persistent storage. The program stored in the storage media 430 may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the cloud-based logistics data sharing device 400. Furthermore, the processor 410 may be configured to communicate with the storage media 430 and execute the series of instruction operations in the storage media 430 on the cloud-based logistics data sharing device 400.
[0125] The cloud-based logistics data sharing device 400 may also include one or more power supplies 440, one or more wired or wireless network interfaces 450, one or more input / output interfaces 460, and / or one or more operating systems 431, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will understand that... Figure 4 The illustrated structure of the cloud-based logistics data sharing equipment does not constitute a limitation on cloud-based logistics data sharing equipment. It may include more or fewer components than illustrated, or combine certain components, or have different component arrangements.
[0126] The present invention also provides a cloud platform-based logistics data sharing device, which includes a memory and a processor. The memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor performs the steps of the cloud platform-based logistics data sharing method in the above embodiments.
[0127] The present invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when the instructions are executed on a computer, cause the computer to perform the steps of the cloud-based logistics data sharing method.
[0128] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0129] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A cloud-based logistics data sharing method, characterized in that, The cloud-based logistics data sharing method includes: Receive a data upload request sent by a first terminal, the data upload request carrying a first identifier, the first identifier being used to indicate the initial logistics data to be uploaded by the first terminal; The initial logistics data is obtained from the first terminal according to the first identifier and transmitted to the cache library of the cloud platform. The initial logistics data includes a first file and a second file. The first file is used to store the structural information metadata of the initial logistics data, and the second file is used to store the content information metadata of the initial logistics data. The system calls a pre-defined cloud platform interface to convert the initial logistics data in the cache library according to a preset data conversion protocol, obtains an intermediate file, and then transmits the intermediate file to the shared database of the cloud platform. Receive a data acquisition request sent by a second terminal, the data acquisition request carrying a second identifier, the second identifier being used to indicate the target logistics data that the second terminal wants to acquire; Call the cloud platform interface to retrieve candidate logistics data that matches the second identifier from the shared database; The candidate logistics data is converted according to the inverse function of the preset data conversion protocol to obtain the target logistics data, and the target logistics data is sent to the second terminal.
2. The cloud-based logistics data sharing method according to claim 1, characterized in that, After receiving the data upload request sent by the first terminal, and before obtaining the initial logistics data from the first terminal according to the first identifier and transmitting the initial logistics data to the cache of the cloud platform, the method further includes: Read the interface configuration file from the preset configuration information database. The interface configuration file includes input data type information and response result data type information. Configure the cloud platform interface based on the interface configuration file; Based on the pre-defined data item description document, establish the data mapping relationship between the cloud platform interface and the shared database of the cloud platform, and determine the data conversion protocol.
3. The cloud-based logistics data sharing method according to claim 2, characterized in that, The step of establishing a data mapping relationship between the cloud platform interface and the shared database of the cloud platform based on the preset data item description document, and determining the data conversion protocol, includes: Scan the preset data item description file to obtain preset data item type information; Based on the preset data item type information, the first data item in the interface configuration file is matched to obtain the first data item type; Determine whether there is a second data item in the interface configuration file that does not match the preset data item type information; If the second data item exists, then set the data type of the second data item to an unknown data item type; Based on the first data item type and the unknown data item type, establish a data mapping relationship between the cloud platform interface and the shared database of the cloud platform to obtain a data mapping relationship file; The data conversion protocol is determined based on the data mapping relationship file, and the data conversion protocol is sent to the interface database of the cloud platform interface.
4. The cloud-based logistics data sharing method according to claim 3, characterized in that, The step of establishing a data mapping relationship between the cloud platform interface and the shared database of the cloud platform based on the first data item type and the unknown data item type, and obtaining a data mapping relationship file, includes: Read the first data item type, construct a first data conversion relationship between the first data item type and the data item type in the data item type information, and generate a first data mapping relationship file; Read the unknown data item type, construct a second data conversion relationship between the unknown data item type and the data item type in the data item type information, and generate a second data mapping relationship file; The first data mapping relationship file and the second data mapping relationship file are merged to obtain the data mapping relationship file between the cloud platform interface and the shared database of the cloud platform.
5. The cloud-based logistics data sharing method according to claim 4, characterized in that, The step of calling a pre-set cloud platform interface to convert the initial logistics data in the cache library according to a preset data conversion protocol to obtain an intermediate file, and then transmitting the intermediate file to the shared database of the cloud platform, includes: The data conversion protocol is parsed through the cloud platform interface to obtain the data mapping relationship file; Based on the data mapping relationship file, the data items to be processed corresponding to the initial logistics data are transposed to obtain the intermediate file; The intermediate file is transferred to the shared database.
6. The cloud-based logistics data sharing method according to claim 5, characterized in that, The intermediate file obtained by transposing the unprocessed data items in the initial logistics data based on the data mapping relationship file includes: Scan the initial logistics data and read the structural information metadata from the first file and the content information metadata from the second file; Based on the data mapping relationship file, generate a first target data item corresponding to the structural information metadata and a second target data item corresponding to the content information metadata; The first target data item and the second target data item are merged into a data item to be processed; The preset mapping and conversion function of the cloud platform interface is called to perform mapping processing on the data items to be processed, thereby obtaining the intermediate file.
7. The cloud-based logistics data sharing method according to claim 1, characterized in that, The step of obtaining the initial logistics data from the first terminal based on the first identifier and transmitting the initial logistics data to the cache library of the cloud platform includes: Scan the first identifier to obtain the permission verification information in the first identifier; When the permission verification information meets the preset conditions, the transmission configuration file of the first identifier is read; The initial logistics data is read according to the transmission configuration file and sent to the cache library of the cloud platform.
8. A cloud-based logistics data sharing device, characterized in that, The cloud-based logistics data sharing device includes: The first receiving module is used to receive a data upload request sent by the first terminal. The data upload request carries a first identifier, which is used to indicate the initial logistics data to be uploaded by the first terminal. The data transmission module is used to obtain the initial logistics data from the first terminal according to the first identifier and transmit the initial logistics data to the cache library of the cloud platform. The initial logistics data includes a first file and a second file. The first file is used to store the structural information metadata of the initial logistics data, and the second file is used to store the content information metadata of the initial logistics data. The data conversion module is used to call a preset cloud platform interface to convert the initial logistics data in the cache library according to a preset data conversion protocol, obtain an intermediate file, and transmit the intermediate file to the shared database of the cloud platform. The second receiving module is used to receive a data acquisition request sent by the second terminal. The data acquisition request carries a second identifier, which is used to indicate the target logistics data that the second terminal wants to acquire. The data acquisition module is used to call the cloud platform interface to obtain candidate logistics data that matches the second identifier from the shared database; The data transmission module is used to perform data conversion on the candidate logistics data according to the inverse function of the preset data conversion protocol, obtain the target logistics data, and send the target logistics data to the second terminal.
9. A cloud-based logistics data sharing device, characterized in that, The cloud-based logistics data sharing device includes: a memory and at least one processor, wherein the memory stores instructions; The at least one processor invokes the instructions in the memory to cause the cloud-based logistics data sharing device to execute the cloud-based logistics data sharing method as described in any one of claims 1-7.
10. A computer-readable storage medium storing instructions thereon, characterized in that, When the instruction is executed by the processor, it implements the cloud-based logistics data sharing method as described in any one of claims 1-7.
Citation Information
Patent Citations
Data sharing method and device based on cloud platform, sharing platform and storage medium
CN109669790A
Data sharing method and device based on forestry data sharing service platform
CN111125228A