Platform management method based on enterprise alliance chain, platform and electronic equipment
By adopting a platform management method based on enterprise alliance chain on the logistics supply chain platform, independently storing business data of each enterprise and distinguishing query data storage areas, the data access security problem is solved and efficient data management and query is achieved.
Patent Information
- Application Number
- CN202510047074.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-13
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2045-01-13
AI Technical Summary
In the logistics supply chain platform based on shared chains, how to ensure the security of access to business data of each enterprise, especially when the on-chain data and platform data are stored uniformly, it is difficult to effectively manage the data of each enterprise.
Adopting a platform management method based on enterprise alliance chain, by independently storing the business data of each enterprise in the data storage area of each enterprise, and executing data query requests through the data proxy module, distinguishing the data under processing from the data that has been completed, and querying them separately Enterprise data storage area and chain data storage area.
It realizes the mutual isolation of business data of various enterprises on the platform, improves data access security, facilitates independent management of business data of various enterprises, improves data query efficiency, and limits users' access time to enterprise data storage areas, reducing the impact of Risk of attack.
Smart Images

Figure CN119474132A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of smart logistics technology, and in particular to a platform management method, platform, and electronic equipment based on an enterprise alliance chain. Background Art
[0002] With the rapid development of the logistics industry, the division of labor in the industry has gradually become more refined, and the business collaboration between different enterprises in the logistics supply chain has become increasingly close. In order to achieve the smooth flow of process management data involved in cross-enterprise freight business among enterprises and realize data business data sharing, patent application CN118569756A discloses a logistics supply chain multi-enterprise collaboration method and platform based on a shared chain, so as to realize the business process management of the same business by different collaborating enterprises by creating a shared chain, and realize the visualization of business data on the chain.
[0003] In the process of realizing on-chain business data visualization, if on-chain data and platform data are stored uniformly, not only will the response efficiency be reduced, but it will also be difficult to effectively manage the data of each enterprise. Therefore, how to ensure the access security of each enterprise's business data on the platform has become an important product development direction. Summary of the Invention
[0004] In order to ensure the access security of business data of each enterprise on the platform, an embodiment of the present application provides a platform management method based on an enterprise alliance chain. The method is applied to the enterprise alliance chain management platform. The platform includes a chain management module, multiple business modules and a data proxy module. The business data generated in real time by each business module is stored in the enterprise data storage area of the corresponding enterprise user. The enterprise data storage areas are independent of each other. The method is executed by the data proxy module and includes the following steps: In response to a data query request initiated by a user for an on-chain business, the chain identifier, business identifier and query field in the data query request are extracted; based on the chain identifier and the business identifier, the proxy service table is queried to determine the first type of query field and the second type of query field contained in the query field; wherein, the first type of query field is used to request a query on the first business data currently being processed, and the second type of query field is used to request a query on the second business data currently having been processed; based on the first type of query field, the enterprise data storage area is queried to obtain the first business data; based on the second type of query field, the chain data storage area is queried to obtain the second business data; wherein, the chain data storage area is only used to store the on-chain business data that has been processed on each of the business modules; and the data query request is responded to based on the first business data and the second business data.
[0005] Based on the above technical solution, by independently storing the business data of each enterprise in each enterprise data storage area, the business data of each enterprise on the platform is isolated from each other, thereby improving data access security and facilitating the independent management of each enterprise's business data. In addition, by backing up the processed on-chain data to the on-chain data storage area, it is possible to achieve separate management of the on-chain data. At the same time, for data query requests initiated by on-chain businesses, the data in process and the data that has been processed are distinguished and sent to different data storage areas for query. On the one hand, it can ensure that the obtained data in process is accurate and real-time, and on the other hand, it can improve data query efficiency. In particular, compared with the existing technology of storing platform data in a unified manner, it can significantly reduce data query time through asynchronous query and database lightweighting. Furthermore, by obtaining the second business data from the on-chain data storage area, it is also possible to limit the user's access time to the enterprise data storage area. That is, only when the enterprise is processing on-chain business can it access the data in the enterprise data storage area. This can further ensure the access security of the enterprise data storage area and reduce the risk of attack. In particular, for the application scenario of user-defined query, it can limit the user's query behavior to prevent the data in the enterprise data storage area from being excessively accessed.
[0006] In one embodiment, the proxy service table includes a chain identification field, a business identification field and a current processing node field, wherein the current processing node field is used to record the business module identification of the business module currently being processed; the updating method of the proxy service table includes: monitoring the task data sent by each of the business modules to the chain management module; when the task data indicates that the task creation is completed, the business module identification of the business module that sent the task data is added to the current processing node field of the data record corresponding to the chain identification and business identification of the created task; when the task data indicates that the task processing is completed, the business module identification of the business module that sent the task data is deleted or marked for deletion in the current processing node field of the data record corresponding to the chain identification and business identification of the processed task.
[0007] Based on the above technical solution, by monitoring the task data sent by the business module to obtain the processing status of the business data in the business module, and then updating the proxy service table, it is possible to ensure the real-time and accuracy of the data in the proxy service table, providing an effective data foundation for subsequent query field analysis, thereby improving the accuracy of request processing. Furthermore, by adding a pending deletion mark to the intermediate node business data that currently needs to be deleted according to the field value, the storage is extended to cope with the different business processing times of each business module, and to avoid premature deletion and the misjudgment of the proxy service table record being empty.
[0008] In one embodiment, the querying of the proxy service table based on the chain identifier and the business identifier to determine the first type of query field and the second type of query field contained in the query field includes: determining the target business module identifier corresponding to each of the query fields; querying the proxy service table based on the chain identifier and the business identifier to obtain a query result; judging whether the query result is empty; if the query result is displayed as empty, responding to the data query request to indicate that the business on the chain has not yet been initiated; if the query result is displayed as not empty, determining whether the current processing node field value in the query result is an empty value, and in the case of an empty value, determining that each of the query fields is a second type of query field; in the case of a non-empty value, determining that the query field corresponding to the target business module identifier that is the same as the current processing node field value is the first type of query field, and determining that the query field corresponding to the target business module mark whose indicated chain position is located before the current processing node field value is the second type of query field.
[0009] Based on the above technical solution, by obtaining the query results and combining them with the position of the business module on the chain, the first-category query fields and the second-category query fields can be quickly determined, which can further improve the efficiency of data query processing.
[0010] In one implementation, the method further includes triggering a timer task while adding the mark to be deleted, the timer task being used to record the waiting time for the new identifier to be written, and when the waiting time exceeds the waiting threshold, sending an exception confirmation instruction to the chain management module, so that the chain management module determines whether the next node of the business module indicated by the mark to be deleted has completed the task creation based on the exception confirmation instruction; if the confirmation result shows that the next node has completed the task creation, it is determined that an exception has occurred in the data monitoring; if the confirmation result shows that the next node has not completed the task creation, it is determined that an exception has occurred in the business module corresponding to the next node.
[0011] Based on the above technical solution, by monitoring the waiting time, business flow anomalies can be discovered, and further confirmation can be carried out through the chain management module to locate the cause of the anomaly, thereby assisting operation and maintenance personnel to quickly handle the anomaly and improve the stability of system operation.
[0012] In one embodiment, the method further includes: when adding, deleting, or marking the value in the current processing node field for deletion, determining whether there is any abnormality in the order of business flow on the chain based on the node position relationship indicated by the field value to be processed and other field values.
[0013] Based on the above technical solution, it is possible to monitor the flow of on-chain business while updating the proxy service table, thereby ensuring the smooth flow of on-chain business.
[0014] In one embodiment, the updating method of the chain data storage area includes: when an operation of deleting the current processing node field value is detected in the proxy service table, the corresponding business data is queried from the enterprise data storage area corresponding to the deleted field value according to the chain identifier and the business identifier, and written into the chain data storage area.
[0015] Based on the above technical solution, the chain data storage area can be updated by updating the proxy service table at the same time, thereby ensuring that the processed business data can be written into the chain data storage area in a timely manner, while ensuring that the storage status of the proxy service table and the data storage area is consistent, ensuring the accuracy of the determined first-category query fields and second-category query fields.
[0016] In one implementation, if the query field includes a third-type query field, the data query request is determined to be an illegal request, wherein the business module indicated by the third-type query field does not belong to the consortium chain indicated by the chain identifier.
[0017] Based on the above technical solution, data access requests that pose security risks can be directly identified based on the classification results of the query fields, thereby protecting the platform from attacks caused by illegal access.
[0018] In one implementation, before querying the proxy service table based on the chain identifier and the business identifier, it also includes: determining whether the user has access rights to the on-chain data corresponding to the chain identifier and the business identifier, as well as access rights to the query field, based on the alliance chain data authorization table; if so, executing the step of querying the proxy service table; if not, returning an error prompt.
[0019] Another embodiment of the present application further provides an enterprise alliance chain management platform, which is used to implement the above method.
[0020] In addition, an embodiment of the present application also provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction implements the above method when executed by the processor. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The drawings that constitute a part of this application are used to provide further understanding of this application. The illustrative embodiments of this application and their descriptions are used to explain this application and do not constitute improper limitations on this application.
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0023] Figure 1 A schematic diagram illustrating the structure of the enterprise alliance chain management platform provided in an embodiment of the present application is shown.
[0024] Figure 2 A flow chart of a platform management method based on an enterprise alliance chain provided in an embodiment of the present application is shown.
[0025] Figure 3 A flow chart of a method for updating a proxy service table provided in an embodiment of the present application is shown.
[0026] Figure 4 A flow chart of a method for determining a first-category query field and a second-category query field provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0027] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0028] In the description of the embodiments of the present application, unless otherwise specified, "multiple" means two or more, and "first", "second" and various numerical numbers are only distinctions for the convenience of description and are not used to limit the scope of the embodiments of the present application.
[0029] The features, structures, or characteristics of this application may be combined in any suitable manner in one or more embodiments. In the various embodiments of this application, the order of the sequence numbers of the processes does not necessarily indicate the order of execution. The order of execution of the processes should be determined by their functions and inherent logic, and should not constitute any limitation on the implementation of the embodiments of this application.
[0030] Some optional features in the embodiments of the present application can be implemented independently in some scenarios without relying on other features to solve corresponding technical problems and achieve corresponding effects. They can also be combined with other features in some scenarios according to needs.
[0031] In this application, unless otherwise specified, the same or similar parts between the various embodiments can refer to each other. In the various embodiments of this application, unless otherwise specified and there is no logical conflict, the terms and / or descriptions between different embodiments are consistent and can be referenced to each other. The technical features in different embodiments can be combined to form new embodiments based on their inherent logical relationships. The implementation methods of this application do not constitute a limitation on the scope of protection of this application.
[0032] The following describes the embodiments of the present application in detail with reference to the accompanying drawings.
[0033] Please refer to Figure 1 The enterprise alliance chain management platform provided in the embodiment of the present application includes a chain management module 11, multiple business modules 12 and a data proxy module 13.
[0034] Among them, the business module 12 is a general term for the functional modules used to implement specific business management on the platform. In specific applications, the business module 12 can be any one of the procurement management module, warehouse management module, transportation management module, and sales management module. The basic functions that can be implemented can refer to the relevant management software in the existing technology. Developers can implement relevant business modules on the platform according to the actual application scope and business needs. This application does not limit this. Each business module 12 is respectively communicated with the chain management module 11. Enterprise users can configure multiple business modules 12 according to their own business scope. These business modules are at least partially used to execute on-chain business. The real-time business data generated by all business modules belonging to the same enterprise user is stored in the corresponding enterprise data storage area. The enterprise data storage areas are independent of each other to achieve data isolation between enterprises, thereby improving the access security of each enterprise user's data on the platform. In one example, each enterprise data storage area corresponds to a different disk partition, or a different database, so as to achieve independent management of different enterprise data.
[0035] Chain management module 11 is used to manage enterprise alliance chains (also known as shared chains), including the creation, modification, and deletion of alliance chains, as well as the management and control of businesses on the alliance chains, including the acquisition and sharing of business processing data and the monitoring of business processing flows. The specific data processing methods between chain management module 11 and business module 12 can be found in the disclosure of patent application CN118569756A and will not be further described.
[0036] The chain management module 11 can also provide a data query interface for users to query and access the business data on the chain. In practice, the query interface can be provided by the platform or developed and generated by the user.
[0037] Specifically, to accommodate the query needs of different users, the platform can provide a programmable interface for users to implement on-chain business query functions. In one example, a custom query engine can be established, allowing users to define query rules using a graphical interface or scripting language, including but not limited to conditional filtering, field mapping, data aggregation, and other functions.
[0038] The user initiates a data query request for the on-chain business through the data query entry on the chain management module 11. The data query request is intercepted and processed by the data proxy module.
[0039] Please refer to Figure 2 , an embodiment of the present application provides a platform management method based on an enterprise alliance chain, which is implemented by a data proxy module and specifically includes the following steps.
[0040] S201, in response to a data query request initiated by a user for an on-chain business, extract the chain identifier, business identifier and query field in the data query request.
[0041] Platform users can access relevant business data through various query portals, including access to on-chain business data and access to non-on-chain business data. The data proxy module intercepts data query requests issued by users based on the chain management module to obtain data query requests initiated for on-chain businesses.
[0042] The intercepted data query request includes a chain identifier and a business identifier. The chain identifier is used to identify the consortium chain, and the business identifier is used to identify the business. The combination of the chain identifier and the business identifier can be used to uniquely identify a business on the chain. It is understandable that users can initiate different businesses based on the same consortium chain. For example, transporting batch 1 of goods from warehouse A to warehouse B can be marked as business 1, while transporting batch 2 of goods from warehouse A to warehouse B can be marked as business 2.
[0043] In one implementation, the query statement carried in the query request may be parsed, and the link identifier and the business identifier may be extracted from the where clause.
[0044] In order to ensure data access security and implement sharing restrictions on on-chain business data, the user's query permissions must be verified in the data proxy module to ensure that the user has the authority to access each query field.
[0045] In one example, the consortium chain data authorization table can be used to determine whether the user has access to the on-chain business data indicated by the chain ID and business ID, as well as access to each query field. If so, the subsequent steps will be executed; if not, an error message will be returned, denying the user access. The consortium chain data authorization table records the data operation permissions assigned by the creator of the consortium chain to each user on the chain.
[0046] S202: query the proxy service table based on the chain identifier and the service identifier to determine the first type query field and the second type query field included in the query field.
[0047] The first type of query field is used to request a query of first business data currently being processed on the target business module, and the second type of query field is used to request a query of second business data currently having been processed.
[0048] Specifically, the on-chain business process follows the transit of goods between different enterprises, processing and circulating relevant business data within the corresponding business modules. Therefore, data query requests for on-chain businesses can include queries for both completed and currently processed business data.
[0049] Taking the above-mentioned business 1 as an example, batch 1 of goods is transported from warehouse A to warehouse B. The business modules involved include the warehouse management module corresponding to enterprise A, the transportation management module corresponding to enterprise C, and the warehouse management module corresponding to enterprise B. When the freight is shipped out of warehouse A and transported by enterprise C, the business data in the warehouse management module of enterprise A has been processed, and the business data on the transportation management module of enterprise C is being processed.
[0050] The data proxy module records the processing progress of each business on each consortium chain based on the proxy service table. In one implementation, the proxy service table includes a chain identification field, a business identification field, and a current processing node field. The current processing node field is used to record the business module identifier of the business module currently being processed, such as the identifier of the transportation management module of enterprise C in the above example.
[0051] In order to achieve timely data update and keep the data in the agent service table synchronized with the actual business processing progress, please refer to Figure 3 ,The method for updating the proxy service table includes the following steps.
[0052] S301, monitoring the task data sent by each business module to the chain management module.
[0053] During implementation, the business module executes on-chain business-related task operations based on user operations and instructions sent by the chain management module. When a processing task is updated, the business module actively sends task data to the chain management module, and the chain management module receives the task data sent by each business module in real time. The task data includes task type, task status, and process data. The task type is determined by the business functions that can be implemented by the business module. The task status is used to indicate the progress of task processing, including creation, processing, processing completion, etc. Process data is used to record all data from the creation to completion of the processing task, including task content, processing person, processing time, processing content, etc. It can be understood that the task data also includes the chain identifier, business identifier, and business module identifier to which the task belongs.
[0054] The data proxy module obtains task data by monitoring and copying the task data sent by each task module to the chain management module, determines the processing progress of the business module on the chain business based on the task data, and then updates the proxy service table.
[0055] In implementation, the data proxy module may extract the chain identifier, service identifier, and task status from the task data, and determine a method for updating the content of the proxy service table according to the task status.
[0056] S302: When the task data indicates that the task creation is completed, the identifier of the business module that sent the task data is added to the current processing node field of the data record corresponding to the chain identifier and business identifier of the created task.
[0057] During implementation, if the proxy service table does not contain data records corresponding to the chain identifier and business identifier in the task data, the data record will be created; if there is a corresponding data record, the value in the current processing node field will be updated. The update method includes deleting the value carrying the to-be-deleted mark and adding the business module identifier of the business module that sends the task data.
[0058] S303, when the task data indicates that the task processing is completed, the business module identifier of the business module that sent the task data is deleted or marked for deletion in the current processing node field of the data record corresponding to the chain identifier and business identifier of the completed task.
[0059] It is worth noting that in order to maintain data consistency, when the task data indicates that the task processing is completed, the business module identifier of the business module that sent the task data can be determined as the field value that needs to be deleted from the proxy service table, and the node position of the business module that sent the task data on the chain can be further determined. If it is the end node, it means that the business module is the last processing node of the on-chain business, so the identifier can be deleted directly; if it is not the end node, first determine whether there are other business module identifiers on the chain that are located after the current processing node field. If so, it can be deleted. If not, a to-be-deleted mark is added to the identifier, and it can be deleted after a new identifier is written. Based on this, on the one hand, it can ensure that the current processing node field value in the proxy service table for on-chain businesses that have not been fully processed is not empty, and on the other hand, the flow progress of each on-chain business can be monitored during the update of the proxy service table.
[0060] Specifically, in one implementation, the data proxy module may also trigger a timer task while adding a mark to be deleted. The timer task is used to record the waiting time for the new identifier to be written, and determine whether to trigger an abnormal alarm based on the waiting time.
[0061] If the waiting time exceeds the waiting threshold, a task processing exception alarm is triggered and an exception confirmation instruction is sent to the chain management module. Based on the exception confirmation instruction, the chain management module determines whether the next node of the business module indicated by the to-be-deleted mark has completed task creation and returns a confirmation result. The waiting threshold can be determined based on the historical business flow time, for example, it can be the average flow time of the chain business on two adjacent nodes, or it can be customized by the operation and maintenance personnel.
[0062] The data proxy module can locate the fault based on the confirmation result. If the confirmation result shows that the next node has completed task creation, it is determined that there is an abnormality in the data monitoring; if the confirmation result shows that the next node has not completed task creation, it is determined that there is an abnormality in the business module corresponding to the next node.
[0063] In another implementation, when the data proxy module adds, deletes, or marks the value in the current processing node field for deletion, it can determine whether there is an abnormality in the order of business flow on the chain based on the node position relationship indicated by the field value to be processed and other field values, and generate a process exception notification when an abnormality occurs to remind the operation and maintenance personnel to handle the abnormal situation.
[0064] Specifically, when the field value to be processed is a newly added field value, it can be determined whether there is a value in the current processing node field value where the indicated node position is located after the newly added field value. If so, it is determined to be an abnormal value; when the field value to be processed is a deleted field value, it can be determined whether there is a value in the current processing node field value where the indicated node position is located before the deleted field value. If so, it is determined to be an abnormal value.
[0065] Based on this, the proxy service table can be updated promptly, ensuring the synchronization of the data within the table with the actual business processing progress. Furthermore, the proxy service table only records the business module identifiers of the business modules currently processing on-chain business on the platform, resulting in a small amount of data and fast query speeds. Furthermore, based on the updates to the proxy service table, the flow of on-chain business between business modules and data monitoring can be monitored for anomalies, allowing for timely detection and reporting of anomalies, allowing operations and maintenance personnel to promptly and quickly correct anomalies and ensure the stable operation of the platform.
[0066] In implementation, please refer to Figure 4 The method in which the data proxy module queries the proxy service table based on the chain identifier and the business identifier to determine the first type query field and the second type query field included in the query field specifically includes the following steps.
[0067] S401: Determine the target business module identifier corresponding to each query field.
[0068] In practice, the data proxy module can determine the business module to which each query field belongs based on the name of each query field, and use the business module identifier of each business module as the target business module identifier. In one example, the query field name includes the business module identifier and column name of the business module. This can be added during the design of the data storage table or during the implementation of the query interface. In this way, the data proxy module can determine the corresponding target business module identifier based on the name of the query field.
[0069] In order to ensure the legitimacy of the data query request, the data proxy module can also verify the identifiers of each target business module to determine whether the business module indicated by each target business module identifier belongs to the business module on the alliance chain indicated by the chain identifier. If it does, the data query request is determined to be legal. If it does not, the data query request is determined to be illegal, that is, the data query request for the on-chain business requests data outside the queryable range. Therefore, the data query request can be judged as illegal, and the response is directly rejected, and the reason for the illegality is prompted so that the user can adjust the query interface in time. In this way, it can prevent the situation where the data query range cannot be effectively controlled after the query interface is opened to users for customization, thereby improving the data security of the platform.
[0070] S402, querying the proxy service table based on the chain identifier and the service identifier to obtain a query result.
[0071] S403: Determine whether the query result is empty.
[0072] In practice, the query result is empty, indicating that there is no data record containing both the chain identifier and the business identifier in the proxy service table, that is, the corresponding on-chain business has not yet been initiated.
[0073] If the query result is empty, execute step S404; otherwise, execute step S405.
[0074] S404, responding to the data query request to indicate that the on-chain business has not yet been initiated.
[0075] S405, determine whether the current processing node field value in the query result is a null value. In the case of a null value, determine that each query field is a second-category query field; in the case of a non-null value, determine that the query field corresponding to the target business module identifier that is the same as the field value is a first-category query field, and determine that the query field corresponding to the target business module mark whose indicated on-chain position is before the field value is a second-category query field.
[0076] In practice, when the task processing of the end node on the chain is completed, the value in the current processing node field in the proxy service table will be deleted. Since the business has been fully processed, no new value will be written, and the field value will remain empty. Based on this, when the field value is empty, it can be determined that the business on the chain has completed processing of all business nodes.
[0077] When the field value is not empty, it means that the business on the necklace has not been fully processed. Based on the node position of the business module indicated by the field value on the chain, it can be determined that the business on the target business module before the node position indicated by the field value has been processed. Therefore, the corresponding query field can be determined as the second type of query field.
[0078] Based on this, the data proxy module can quickly and accurately determine the first and second query fields in the query field based on the query results of the proxy service table and the on-chain node position corresponding to the target business module identifier.
[0079] S203: Query the enterprise data storage area based on the first type of query field to obtain first business data.
[0080] In implementation, the data proxy module can determine the enterprise user to which the first business module belongs based on the first business module corresponding to the first-category query field, thereby obtaining the corresponding first enterprise data storage area. Then, based on the chain identifier, the business identifier, the first-category query field, the query conditions related to the first-category query field in the data query request, and the first enterprise data storage area information, the first query statement is constructed and sent to the first enterprise data storage area for data query, thereby obtaining the first business data.
[0081] S204: Query the chain data storage area based on the second type of query field to obtain second business data.
[0082] During implementation, a second query statement can be constructed based on the second type of query field, chain identifier, business identifier, query conditions related to the second type of query field in the data query request, and chain data storage area information, and sent to the chain data storage area for data query to obtain the second business data.
[0083] The chain data storage area is used only to store on-chain business data processed by each business module. The chain data storage area is updated by the data proxy module. It is worth noting that the business data available from each business module includes business data related to services initiated based on the consortium chain, as well as other business data unrelated to the consortium chain. In this embodiment of the application, the chain data storage area is used only to store on-chain business data, while the enterprise data storage area also stores all business data generated by the corresponding business module.
[0084] In one example, the updating method of the chain data storage area includes: when an operation of deleting the field value of the current processing node is detected in the proxy service table, the corresponding business data is queried from the enterprise data storage area corresponding to the deleted field value according to the chain identifier and the business identifier, and written into the chain data storage area.
[0085] Optionally, the chain data storage area includes a first storage area and a second storage area, wherein the data access rate of the first storage area is higher than the data access rate of the second storage area. In order to further improve the data access efficiency, in implementation, the data proxy module may first store the target business data in the first storage area, and when the data migration conditions are met, transfer the relevant business data in the first storage area to the second storage area.
[0086] In one implementation, the data migration condition includes that the current processing node field value is set to blank for a period exceeding a threshold, where the threshold can be determined based on the platform's access requirements for on-chain data that has been processed.
[0087] In one example, the platform can provide real-time monitoring of on-chain businesses, which requires access to on-chain business data. Therefore, the emptying period can be determined based on the platform's access requirements for data. Generally speaking, when a business on a consortium chain is not completed, the platform will regularly generate on-chain business progress according to the preset first period to monitor and display the business progress. When the business is completed, the platform can generate corresponding completion information based on all business data of the on-chain business and exit the periodic monitoring mode. Therefore, the emptying threshold can be determined based on the time point of the platform's unified analysis of the completed business data to ensure that the operations in the unified analysis are completed before the emptying threshold is reached.
[0088] In another example, the clearing threshold can be dynamically set based on the number of nodes included in the alliance chain and the activity of platform users within a preset period. Specifically, the platform can periodically calculate the average user activity and synchronize it to the data proxy module. The data proxy module multiplies the most recently received average user activity by the number of alliance chain nodes corresponding to each business whose current processing node field value is cleared in the first storage area, thereby obtaining the total user activity value of each alliance chain. All completed business data on the alliance chain whose total user activity value is less than the preset activity threshold is migrated to the second storage area.
[0089] S205: Respond to the data query request based on the first business data and the second business data.
[0090] Based on this, the real-time and accuracy of the data can be guaranteed by obtaining the first business data being processed from the enterprise data storage area. At the same time, by obtaining the second business data that has been processed from the chain data storage area, on the one hand, the data access volume of the enterprise data storage area can be reduced, thereby alleviating the data processing pressure of the enterprise data storage area. At the same time, it can avoid excessive access to the enterprise data storage area due to unreasonable user-defined query interfaces and reduce the negative impact of illegal access requests on the enterprise data storage area, thereby ensuring the security of each enterprise data storage area; on the other hand, it can realize the backup of the on-chain data that has been processed in the chain data storage area, and at the same time facilitate the classified management of on-chain business data and non-chain business data, thereby improving the query efficiency of on-chain business data.
[0091] In some embodiments of the present application, after processing the above-mentioned step S202, if there is a query field that does not belong to the first type of query field or the second type of query field, the business module indicated by the target business module identifier corresponding to the third type of query field does not belong to the alliance chain indicated by the chain identifier, or the node position is located after the node position indicated by the first type of query field.
[0092] Since the corresponding business data of the third type of query field has not been generated, in one example, the query result of the third type of query field can be returned to the user as a null value while executing step S205 to complete the processing of the data query request, and at the same time remind the user to optimize the query interface. In another example, the data query request can be directly identified as an illegal request and access can be denied, thereby ensuring data access security.
[0093] In addition, an embodiment of the present application also provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and runnable on the processor, wherein the program or instruction, when executed by the processor, implements a method as in any one of the implementation methods in the embodiments of the present application; wherein the processor can adopt a general central processing unit (CPU), a microprocessor, an application specific integrated circuit (ASIC), a graphics processing unit (GPU) or one or more integrated circuits to execute relevant programs to implement the method in any one of the implementation methods in the embodiments of the present application.
[0094] The processor may also be an integrated circuit electronic device with signal processing capabilities. In the implementation process, each step of the method in any of the implementation methods in the embodiments of the present application may be completed by hardware integrated logic circuits in the processor or software instructions.
[0095] The above-mentioned processor can also be a general-purpose processor, a digital signal processor, an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. The various methods, steps, and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor.
[0096] The software module can be located in a storage medium well-established in the art, such as a random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or register. The storage medium is located in the memory, and the processor reads the information in the memory and, in conjunction with its hardware, completes the functions required to be performed by the units included in the data processing apparatus of the embodiments of the present application, or executes the method of any implementation method of the embodiments of the present application.
[0097] Those skilled in the art will appreciate that all or part of the steps in the above-described embodiments can be implemented by instructing related hardware through a program. The program is stored in a storage medium and includes a number of instructions for causing a device (such as a microcontroller or chip) or a processor to execute all or part of the steps in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0098] The above are all preferred embodiments of the present application, and are not intended to limit the scope of protection of the present application. Therefore, any equivalent changes made based on the structure, shape, and principle of the present application should be included in the scope of protection of the present application.
Claims
1. A platform management method based on enterprise alliance chain, characterized in that: The method is applied to an enterprise alliance chain management platform, which includes a chain management module, multiple business modules and a data proxy module, wherein the business data generated in real time by each business module is stored in the enterprise data storage area of the corresponding enterprise user, and each enterprise data storage area is independent of each other. The method is executed by the data proxy module and includes the steps of: In response to a data query request initiated by a user for an on-chain service, extract the chain identifier, service identifier, and query field in the data query request; Based on the chain identifier and the service identifier, the proxy service table is queried to determine the first type of query field and the second type of query field included in the query field; wherein the first type of query field is used to request a query of the first service data currently being processed, and the second type of query field is used to request a query of the second service data currently being processed; Query the enterprise data storage area based on the first type of query fields to obtain the first business data; querying the chain data storage area based on the second type of query field to obtain the second business data; wherein the chain data storage area is only used to store the on-chain business data that has been processed on each of the business modules; The data query request is responded to based on the first business data and the second business data.
2. The method according to claim 1, characterized in that The proxy service table includes a chain identification field, a service identification field and a current processing node field, wherein the current processing node field is used to record the service module identification of the service module currently being processed; the updating method of the proxy service table includes: Monitoring the task data sent by each of the business modules to the chain management module; When the task data indicates that the task creation is completed, a business module identifier of the business module that sent the task data is added to the current processing node field of the data record corresponding to the chain identifier and business identifier of the task that has been created; When the task data indicates that task processing is completed, the business module identifier of the business module that sent the task data is deleted or marked for deletion in the current processing node field of the data record corresponding to the chain identifier and business identifier of the completed task.
3. The method according to claim 2, characterized in that The querying of the proxy service table based on the chain identifier and the service identifier to determine the first type of query field and the second type of query field included in the query field includes: Determine the target business module identifier corresponding to each of the query fields; Query the proxy service table based on the chain identifier and the service identifier to obtain a query result; Determine whether the query result is empty; If the query result is empty, respond to the data query request to indicate that the on-chain business has not yet been initiated; If the query result is not empty, determine whether the current processing node field value in the query result is an empty value. In the case of an empty value, determine that each query field is a second-category query field; in the case of a non-empty value, determine that the query field corresponding to the target business module identifier that is the same as the current processing node field value is the first-category query field, and determine that the query field corresponding to the target business module mark whose indicated on-chain position is before the current processing node field value is the second-category query field.
4. The method according to claim 2, characterized in that: The method further includes triggering a timer task while adding the mark to be deleted, the timer task being used to record the waiting time for waiting for the new identifier to be written, and sending an abnormal confirmation instruction to the chain management module when the waiting time exceeds the waiting threshold, so that the chain management module determines whether the next node of the business module indicated by the mark to be deleted has completed task creation based on the abnormal confirmation instruction; If the confirmation result shows that the next node has completed the task creation, it is determined that an abnormality occurs in the data monitoring; if the confirmation result shows that the next node has not completed the task creation, it is determined that an abnormality occurs in the business module corresponding to the next node.
5. The method according to claim 2, characterized in that: The method also includes: when adding, deleting or marking the value in the current processing node field for deletion, determining whether there is any abnormality in the order of business flow on the chain based on the node position relationship indicated by the field value to be processed and other field values.
6. The method according to claim 1, characterized in that The method for updating the chain data storage includes: When an operation of deleting the field value of the current processing node is detected in the proxy service table, the corresponding business data is queried from the enterprise data storage area corresponding to the deleted field value according to the chain identifier and the business identifier, and written into the chain data storage area.
7. The method according to claim 1, characterized in that If the query field includes a third-type query field, the data query request is determined to be an illegal request, wherein the business module indicated by the third-type query field does not belong to the alliance chain indicated by the chain identifier.
8. The method according to claim 1, characterized in that Before querying the proxy service table based on the chain identifier and the service identifier, the method further includes: According to the alliance chain data authorization table, determine whether the user has the access rights to the on-chain data corresponding to the chain identifier and the business identifier, as well as the access rights to the query field. If yes, execute the step of querying the proxy service table; if not, return an error prompt.
9. An enterprise alliance chain management platform, characterized in that: The platform is used to implement the method according to any one of claims 1 to 8.
10. An electronic device, characterized in that: The method comprises a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction implements the method according to any one of claims 1 to 8 when executed by the processor.
Citation Information
Patent Citations
Logistics supply chain multi-enterprise cooperation method and platform based on shared chain
CN118569756A
Business result query method and device of Ethereum alliance chain, equipment and medium
CN112612816A
Block chain transaction method and device, electronic equipment and storage medium
CN113225368A
Cross-block-chain data access method
CN113468581A
Data query method and device
CN113760948A