Disclosure of Invention
The application aims to provide an update prompting method, an update prompting device, electronic equipment and a storage medium of an ERP system, which have the advantages of prompting a user data update state and improving data consistency and user experience.
In a first aspect, the present application provides an update prompting method for an ERP system, where the technical scheme is as follows:
the ERP system comprises a main system, a client and a cloud server, wherein the main system and the client perform data interaction through a local area network,
The cloud server is respectively connected with the main system and the client in an offline state through the Internet, and establishes and maintains a data update log in the cloud server for recording the data update state in the ERP system, and the method is applied to the cloud server and comprises the following steps:
receiving query metadata sent by the host system or the client in an offline state when executing a local query instruction;
Determining the update state of the query target information according to the query metadata and the data update log;
and when the update state is determined to be updated, sending update prompt information to the host system or the client side which sends the query metadata, so that the host system or the client side which executes the local query instruction displays the update state of the target information when obtaining a query result.
According to the update prompting method of the ERP system, the cloud server and the main system are respectively connected through the Internet, the client in the offline state is used, the data update log is built and maintained in the cloud server, the update states of all data objects in the ERP system are recorded, the problem that the client in the offline state faces synchronous data lag in the ERP system based on a local area network is effectively solved, and the cloud server enables a user to know whether target information is updated or not through displaying the data update states, so that use of outdated data is avoided, user experience is improved, and consistency and integrity of the data are ensured.
Further, in the present application, the query metadata includes at least a query object identifier for uniquely identifying target information of a query and a target timestamp for representing an update time of the target information locally;
The step of determining the update status of the query target information according to the query metadata and the data update log includes:
retrieving from the data update log a most recent update record of the target information that matches the query object identifier;
Comparing the timestamp of the latest update record with the target timestamp;
and when the time stamp of the latest update record is later than the target time stamp, determining the update state as updated.
And judging whether the data is updated or not by comparing the time stamp of the latest update record with the target time stamp, and sending update prompt information to the user when the data update state is determined to be updated, so that the user is helped to know whether the information checked by the user is latest or not, a decision based on the latest data is made, the work efficiency is improved, the data conflict is reduced, the bandwidth pressure of the local area network is reduced, and the instantaneity and the accuracy of the query data are ensured.
Further, in the application, when receiving a connection request sent by the client through the internet, verifying whether the client is in an offline state;
When the client is in an offline state, the client is connected with the client in the offline state through the Internet, and is used for receiving update information related to an update object and an update timestamp generated by the client executing operation in the offline state, updating the data update log and receiving the query metadata sent by the client in the offline state when executing the local query instruction.
Further, in the application, after the client in an offline state is connected with the client through the internet, the identity information of the client in the offline state is obtained;
Obtaining associated operation type information corresponding to the identity information according to the identity information;
the step of retrieving a latest update record of the target information matching the query object identifier from the data update log includes:
When the query metadata is sent by the main system, judging whether the target information belongs to the associated operation type information according to the query object identifier;
Retrieving, from the data update log, a latest update record of the target information that matches the query object identifier when the target information belongs to the associated operation type information;
And when the target information does not belong to the associated operation type information, determining an update state as not updated.
The data updating state can be obtained according to the associated operation type information, so that the consistency and the safety of the data can be ensured, the access authority of the data can be better controlled, only an authorized user can update the related data, meanwhile, the accurate data updating state information is provided, the user can know whether the data queried by the user is up-to-date, the decision based on the up-to-date data is made, the user is helped to improve the working efficiency, the safety and the accuracy are ensured, and the user experience is improved.
Further, in the present application, the step of retrieving, when the target information belongs to the associated operation type information, a latest update record of the target information matching the query object identifier from the data update log includes:
Verifying whether the corresponding client side which acquires the identity information is subjected to data synchronization with the main system;
And when the corresponding client is not subjected to data synchronization with the main system, if the target information belongs to the associated operation type information, retrieving the latest update record of the target information matched with the query object identifier from the data update log.
Further, in the present application, the step of determining the update status of the query target information according to the query metadata and the data update log includes:
when a plurality of inquiry metadata are received within a preset time, judging the dependency relationship of the plurality of inquiry metadata;
sequentially adjusting the requests corresponding to the plurality of inquiry metadata according to the dependency relationship;
and determining the update state of the query target information by using the corresponding query metadata and the data update log according to the adjusted sequence.
By judging the dependency relationship of the query metadata, the cloud server can ensure that the query requests are in correct sequence so as to ensure that the latest data update state is used for subsequent queries, thereby ensuring the accuracy and consistency of the data, being beneficial to improving the reliability and user experience of remote access of the ERP system, optimizing the data processing thread of the ERP system and avoiding data conflict.
Further, in the present application, the step of determining the update status of the query target information using the corresponding query metadata and the data update log according to the adjusted order includes:
According to the adjusted sequence, when two adjacent query metadata have a dependency relationship, after the update state of the query target information is determined by using the corresponding previous query metadata and the data update log, the update state of the query target information is determined by using the corresponding subsequent query metadata and the data update log after a preset time;
the method further comprises the steps of:
And sending waiting prompt information to the host system or the client corresponding to the update state of the query target information by using the corresponding query metadata and the data update log after the preset time is required.
The waiting prompt information is sent to inform the user that the data is being updated, so that unnecessary query requests are prevented from being repeatedly initiated, the user experience is improved, the system load can be reduced by reducing the unnecessary query requests, the system performance is improved, the later requests of the dependency relationship can be ensured to acquire the latest data by the waiting prompt information, the consistency of the data is ensured, the data conflict between the earlier requests of the dependency relationship and the later requests of the dependency relationship can be avoided by waiting for the preset time, the waiting prompt information can clearly inform the user of the progress of data update, the user can know the data update state, the remote access reliability of the ERP system is improved, and the user experience is improved.
In a second aspect, the present application provides an update-prompting device of an ERP system, where the ERP system includes a main system, a client, and a cloud server, the main system and the client perform data interaction through a local area network, the cloud server is connected with the main system and the client in an offline state through the internet, and establishes and maintains a data update log in the cloud server, and is used for recording a data update state in the ERP system, where the device includes:
The first module is used for receiving query metadata sent by the main system or the client in an offline state when executing a local query instruction;
the second module is used for determining the update state of the query target information according to the query metadata and the data update log;
And the third module is used for sending update prompt information to the main system or the client which sends the query metadata when the update state is determined to be updated, so that the main system or the client which executes the local query instruction displays the update state of the target information when the query result is obtained.
In a third aspect, there is provided an electronic device comprising a processor and a memory storing computer readable instructions which, when executed by the processor, perform the steps of the method as provided in the first aspect above.
In a fourth aspect, the present application provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the method as provided in the first aspect above.
As can be seen from the above, the update prompting method, the device, the electronic equipment and the storage medium of the ERP system provided by the application are characterized in that a cloud server is respectively connected with a main system and a client in an offline state through the internet, a data update log is established and maintained in the cloud server and is used for recording the data update state in the ERP system, receiving query metadata sent by the main system or the client in the offline state when executing a local query instruction;
the application has the following beneficial effects:
(1) The user experience is improved, namely, the user is enabled to know the updating state of the target information through updating the prompt information, the use of outdated data is avoided, the problem of lagging data query results in an offline state is solved, and the user experience is improved.
(2) And the complete data synchronization is performed based on the local area network, so that the cost is low and the safety is high.
Detailed Description
The following description of the embodiments of the present application will be made more apparent and fully hereinafter with reference to the accompanying drawings, in which some, but not all embodiments of the application are shown. The components of the present application, which are generally described and illustrated in the figures herein, may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the application, as presented in the figures, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by a person skilled in the art without making any inventive effort, are intended to be within the scope of the present application.
It should be noted that like reference numerals and letters refer to like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures. Meanwhile, in the description of the present application, the terms "first", "second", and the like are used only to distinguish the description, and are not to be construed as indicating or implying relative importance.
The ERP system is totally called an enterprise resource planning system (ENTERPRISE RESOURCE PLANNING), is a software system integrating various functions of enterprise management, can help enterprises to optimize resource allocation, improve operation efficiency, reduce cost and enhance market competitiveness. In the prior art, an ERP system based on the Internet provides a convenient remote access function, but the safety of data cannot be fully ensured, and an ERP system based on the local area network can ensure the high safety of data stored and processed in the local area network inside an enterprise, but has limited remote access capability. The enterprise uses the ERP system based on local area network to carry out production planning, material management, business management and other works, in the working scene that the staff needs to leave the office frequently or move between different office places, the need that the ERP system supports remote access is more prominent, as an informationized management tool for data storage and processing, the user expects the ERP system to ensure data security and facilitate remote access, and in order to achieve the expectation, the application provides an updating prompt method, device, electronic equipment and storage medium of the ERP system.
The ERP system can comprise a main system, a client, a cloud server and the like, wherein the main system can be arranged on an enterprise internal server and is responsible for storing and managing enterprise data, and processing a client request, the main system is a core component for data processing, the client can be arranged on an enterprise employee terminal and is used for accessing the main system to perform data operation, the data operation can comprise data query, data input, business processing and other operations, the enterprise employee terminal can be a desktop computer, a portable computer, a mobile phone or a tablet personal computer and the like, the main system and the client interact with each other through a local area network, the cloud server can be arranged on a public cloud or private cloud platform, the cloud server is respectively connected with the main system and the client in an offline state through the Internet and is responsible for maintaining a data update log and providing update prompt service, the data update state in the ERP system is recorded, the data update state comprises updated and not updated, and the client in the offline state can be in a state that the enterprise employee terminal leaves the enterprise local area network, and cannot be connected to data in the main system directly access system.
As shown in fig. 1, fig. 1 is a flowchart of an update prompting method of an ERP system provided by an embodiment of the present application, where the method is applied to a cloud server, and the update prompting method of an ERP system provided by the embodiment of the present application includes the following steps:
Step S101, receiving inquiry metadata sent by a main system or the client in an offline state when executing a local inquiry instruction;
Step S102, determining the update state of the query target information according to the query metadata and the data update log;
and step S103, when the update state is determined to be updated, update prompt information is sent to the main system or the client side which sends the query metadata, so that the main system or the client side which executes the local query instruction displays the update state of the target information when obtaining a query result.
Specifically, when a user performs local data query, a local data query instruction is executed by a main system or a client in an offline state to access locally stored data, so that the user can conveniently obtain a data query result at any time and any place, when the client is in the offline state, data interaction with the main system cannot be performed through a local area network, so that the data queried by the main system or the offline client may not be the latest data. The data update log can record update histories of all data in the ERP system, so that data tracing and analysis are convenient, and the update state of the query target information, such as whether updated, when updated and the like, can be judged according to the data update log.
For example, a manufacturing enterprise uses a local area network-based ERP system to conduct production planning, material management, quality management, etc., and employees often need to move between different office locations, such as from office to production shop. When a client in a production workshop is disconnected with a local network due to some reasons, the client in the production workshop is in an offline state, related information of the updated order A is not synchronized in time when the employee A is in the office, detailed information of the order A needs to be checked on the offline client in the production workshop, the employee B executes a local query instruction, the client in the offline state sends query metadata to a cloud server, the cloud server searches a data update log according to the query metadata, the cloud server returns update prompt information to the client, the client displays the update prompt information to the employee B, so that the employee B knows that the information of the order A is updated, wrong outdated data is avoided, the consistency and accuracy of the data are ensured, and the offline client is connected with the cloud server through the Internet, so that whether the data are updated is obtained.
In the prior art, a general ERP system adopts local area network communication or internet communication, because the ERP system usually involves confidential data inside an enterprise, the main current practice is to adopt local area network communication, which has high security and low cost of data synchronization, however, there is a great regional constraint on local area network communication, if the local area network communication leaves a certain range, the local area network connection is disconnected, in order to ensure that staff can work in a business trip state, a certain amount of data can be stored locally on a client, and the data can be accessed locally on the client, however, the disadvantage of this way is that if some data is updated, the client disconnected from the local area network cannot synchronize the data, and cannot know whether the data is updated, and in this case, the data used may appear when working.
Based on the above practical application scenario, the present application proposes that a cloud server is further provided on the basis of implementing data interaction between a client and a host system by using a local area network, wherein the cloud server is specifically connected with the host system through the internet, and the cloud server is specifically connected with the client in an offline state through the internet, wherein the client in the offline state specifically means that the client is disconnected from the local area network of the host system, and the cloud server is connected with the host system and the client in the offline state through the internet, so that the data update log can be maintained through the internet, specifically, in the cloud server, the data update log is established, and specifically, the data update log can include a data type name and a final update time, and when the host system or the client in the offline state changes data, the cloud server sends data to the cloud server through the internet, and the cloud server maintains the data update log after receiving the data.
It is noted that the cloud server only acquires which data is updated, but does not acquire the updated data, for example, the cloud server acquires the updated information of the price change of a service, and at this time, the cloud server only acquires the service type and the updated time information, and does not know the updated content, and because the cloud server does not acquire the updated content, the load of the cloud server is very small, and meanwhile, because the cloud server is not involved in transmitting the updated content, the security is very high, and the situation of data leakage does not occur.
The core technical concept of the application is that the cloud server is used as a lightweight data update prompt center, which is the most remarkable innovation of the scheme. While conventional ERP systems typically rely on a host system to directly manage all data synchronization and update notifications, the present solution introduces a cloud server as a separate middle layer, specifically handles monitoring and notification of data update status. The design greatly lightens the burden of the main system and simultaneously improves the response speed and the flexibility of the system. In addition, the method combines the offline operation with the real-time update prompt, so that the conventional ERP system is generally difficult to effectively treat the problem of inconsistent data caused by the offline operation. According to the scheme, seamless combination of offline operation and real-time update prompt is realized through the cloud server, so that a user can timely acquire the data update state even in an offline state, and the availability and data consistency of the system are greatly improved. The separated connection mechanism is used for processing the data transmission of the local area network and the monitoring of the Internet state separately, so that the safety and the efficiency of the data transmission are improved, the reliability and the flexibility of the system are enhanced, and the cost of data synchronization is reduced.
Specifically, in some embodiments, the query metadata includes at least a query object identifier for uniquely identifying the target information of the query and a target timestamp for representing an update time of the target information locally;
in the ERP system, the query metadata is auxiliary information for describing a query target and query conditions, and is used for optimizing a query process so as to acquire target information expected by a user. The query object identifier is used to uniquely identify the target information of the query and may be a unique order number, customer ID, material code, or any other field that uniquely identifies a particular data item. For example, if a user wants to query the latest status of an order, the order number of that order may be provided as a query object identifier when executing a local data query, each order having its unique order number, so the order number may be used as a field uniquely identifying a different order. The target time stamp is used to represent the update time of the target information locally, and reflects the last update time of the recorded data of the user in the local system. For example, if the user updates an order status in the local system, the last modified timestamp of the order is recorded as the target timestamp.
Further, the step of determining the update status of the query target information according to the query metadata and the data update log includes:
Retrieving a latest update record of the target information matched with the query object identifier from the data update log;
comparing the timestamp of the latest update record with the target timestamp;
when the time stamp of the latest update record is later than the target time stamp, determining the update state as updated;
The data update log in the cloud server records the update states of all data objects, including an update object identifier for uniquely identifying an object updated in the ERP system, such as an order number, a client number, a product number, etc., an update record timestamp for indicating the time when the update operation occurs, and an update type for indicating the type of the update operation, such as addition, modification, deletion, etc., and update content for indicating the specific content of the update operation, such as a modified data value, etc. When the cloud server receives the query metadata sent from the client in an offline state or from the system, the cloud server retrieves the latest update record of the target information matched with the query object identifier in the data update log according to the query object identifier, then compares the time stamp of the retrieved latest update record with the target time stamp contained in the query metadata, and if the time stamp of the latest update record is later than the target time stamp, this means that the data update log of the cloud server has been updated after the target information is last viewed or modified by the user, in which case the cloud server determines the update state as updated. If the timestamp of the latest update record is earlier than or equal to the target timestamp, the data representing the cloud server is not updated, or the update occurs before the last view or modification by the user, at which point the cloud server determines the data update status as not updated.
In this way, whether the data has been updated is determined, and update prompt information is sent to the user when the data update state is determined to be updated, so that the user can know whether the information viewed by the user is up-to-date, and a decision based on the up-to-date data is made.
Specifically, in some embodiments, when receiving a connection request sent by a client through the internet, verifying whether the client is in an offline state;
When the client is in an offline state, the client is connected with the client in the offline state through the Internet, and is used for receiving update information related to an update object and an update timestamp generated by the client executing operation in the offline state, and is used for updating a data update log and receiving query metadata sent by the client in the offline state when executing a local query instruction.
When the client sends a connection request to the cloud server through the internet, the cloud server can first verify the state of the client so as to ensure the security and effectiveness of connection. In some embodiments, the method of verifying the state of the client may be connection request analysis, when the cloud server receives a connection request of the client, analyzing the source and the state of the request, if the request is sent through the internet instead of the local area network, this may indicate that the client is not currently in an offline state in the local area network, or may be network address verification, where the cloud server checks the network address of the client, usually determined by an IP address, and if the IP address of the client is not in the range of the local area network, this means that the client is in an offline state, or may be data synchronization state check, where the cloud server checks the data synchronization state of the client and the host system, and if it finds that the data of the client is inconsistent with the host system, or that the data update log of the client shows that the latest update time is earlier than the record of the cloud server, this indicates that the client is offline, and the cloud server accurately determines whether the client is in an offline state, and provides corresponding service and support for the client in the offline state.
That is, in some embodiments, the cloud server will only connect with clients that are offline, and not clients that are online, as online clients may accomplish data synchronization with the host system through a local area network.
In ERP systems, to ensure real-time updating and consistency of data, especially in the case of clients being offline, this means that the client has disconnected from the local area network of the host system, but the client may still have access to the internet, which allows the client to communicate with the cloud server, which may receive data update information generated by the client performing operations in the offline state, including update objects and update timestamps, which are used to update the data update log on the cloud server. When the client is reconnected to the local area network, the client can synchronize data with the main system, so that the consistency of the data is ensured. When the client performs an operation in an offline state, such as modifying order information, updating inventory quantity, etc., the update object may be, for example, order amount or material quantity, etc., and the update timestamp is the time point when the user makes the last modification to the update object.
In some embodiments, the cloud server maintains the data update log according to the update information, and knows which types of information are updated, at this time, the cloud server can trigger auxiliary operations of data synchronization according to needs, and before data synchronization, the cloud server can inform the client and the server of which data need to be synchronized, so that verification of all data can be avoided, data synchronization efficiency of the main system and the client is improved, and data in the main system and the client are ensured to be kept consistent.
Specifically, in some embodiments, after connecting with a client in an offline state through the internet, acquiring identity information of the client in the offline state;
obtaining associated operation type information corresponding to the identity information according to the identity information;
Wherein, the identity information refers to an identification used for identifying and verifying the identity of the client. The identity information that the cloud server obtains from the clients that are offline may include a user name, a client ID, or other unique identifier, which aids the cloud server in distinguishing between different clients and determining their roles and rights in the ERP system. According to the identity information obtained from the offline client, the cloud server can determine the associated operation type information corresponding to the identity information, for example, staff of a sales department can only maintain client information of related orders and data type information such as order amount, and staff of a warehouse management department can only maintain data type information such as specific material information and inventory information. The associated operation type information refers to other data objects or operation types associated with a particular data object. The cloud server is facilitated to control the authority of the user more accurately by acquiring the associated operation type information, the user is prevented from accessing or modifying data which the user should not access or modify, and which data objects are determined to be related to the operation of the specific client, so that the consistency and the integrity of data management are better realized, and the reliability and the user experience of remote access of the ERP system are facilitated to be improved.
Further, the step of retrieving a latest update record of the target information matching the query object identifier from the data update log includes:
When the query metadata is sent by the main system, judging whether the target information belongs to the associated operation type information according to the query object identifier;
Retrieving a latest update record of the target information matched with the query object identifier from the data update log when the target information belongs to the associated operation type information;
When the target information does not belong to the associated operation type information, the update state is determined as not updated.
When the cloud server receives the query metadata of the local query instruction, the cloud server searches the latest update record of the target information matched with the query object identifier in the query metadata in the data update log according to the query object identifier, so as to determine the update state of the query target information. If the query metadata is sent by the client in the offline state, the cloud server executes the retrieval of the corresponding data update state according to the identity information of the offline client and the corresponding associated operation type information acquired before, and the identity information of the offline client determines the operation authority and the access range of the offline client in the ERP system. The associated operation type information is determined based on these operation rights, which defines the data objects that the client can operate on and their associated operation types. When query metadata is sent by an offline client, it is typically because the offline client needs to query data related to its operational rights. The query metadata sent by the client typically includes a data object identifier that matches the offline client operation rights, and the cloud server may directly retrieve, in the data update log, a latest update record of the target information that matches the data object identifier that matches the offline client operation rights, and return an update status of the target information for the offline client.
If the target information does not belong to the associated operation type information, this means that the offline client has no authority to operate the data object, or that the data object is not directly related to the operation of the offline client. Thus, the cloud server may determine the update status as not updated, i.e., the target information is not updated during offline. In this case the cloud server does not need to further determine if the target information is truly not updated, as the offline client has no rights to operate on the data object at all. If the target information belongs to the associated operation type information, the cloud server retrieves a latest update record of the target information matched with the query object identifier from the data update log. When the target information belongs to the associated operation type information corresponding to the offline client, which means that the target information data object is directly associated with the associated operation type information corresponding to the current offline client, and the client has permission to operate the associated operation type information, it is possible that data update already occurs when the data operation request of the offline client is executed, and the cloud server needs to further retrieve the latest update record of the target information from the data update log and return the update state of the queried target information to the host system.
By the method, the access authority of the data can be better controlled, the fact that only an authorized user can update related data is ensured, the consistency and the safety of the data can be ensured, meanwhile, accurate data update state information is provided, the user is helped to know whether the data queried by the user are up-to-date, so that a decision based on the up-to-date data is made, the user is helped to improve the working efficiency, the instantaneity and the accuracy of the data are ensured, and the user experience and the remote access capability of an ERP system based on a local area network are improved.
Specifically, in some embodiments, when the target information belongs to the associated operation type information, the step of retrieving the latest update record of the target information matching the query object identifier from the data update log includes:
Verifying whether the corresponding client end which acquires the identity information is subjected to data synchronization with the main system;
And when the corresponding client does not undergo data synchronization with the main system, if the target information belongs to the associated operation type information, retrieving the latest update record of the target information matched with the query object identifier from the data update log.
The data synchronization refers to data exchange between the client and the main system, and ensures that data on the client is consistent with data on the main system. Data synchronization helps to avoid data inconsistencies or collisions, particularly when multiple clients operate on the same data object at the same time. The cloud server can check whether the corresponding client end which acquires the identity information has completed data synchronization with the main system, and whether the data of the client end is matched with the data on the main system so as to ensure the consistency of the data. If the corresponding client does not complete data synchronization with the host system, the cloud server needs to take action to deal with this problem. For example, the cloud server may mark the client data as a state to be synchronized, or preferentially synchronize the associated operation type information when the client is reconnected, and may process inconsistent data according to the update record, and maintain consistency of the data.
Further, if data synchronization is not yet performed between the offline client and the main system, it is proved that the data may have been updated, when the target information belongs to the associated operation type information, which means that the target information data object is directly associated with the associated operation type information corresponding to the current offline client, and the client has permission to operate the target information data object, it is possible that the data update state has changed when the data operation request of the offline client is performed, and the cloud server needs to further retrieve the latest update record of the target information from the data update log, and return the queried update state of the target information for the offline client.
By verifying the identity information of the client and confirming the data synchronization state of the client and the main system, the cloud server can update and record the data update state by retrieving the data update log even if the client is inconsistent with the data of the main system, so that the consistency and the accuracy of the data are ensured, the reliability and the user experience of remote access of the ERP system are improved, the latest record of the data update state can be ensured for a user, and the working efficiency is improved.
Specifically, in some embodiments, the step of determining the update status of the query target information from the query metadata and the data update log includes:
when a plurality of inquiry metadata are received within a preset time, judging the dependency relationship of the plurality of inquiry metadata;
sequentially adjusting the requests corresponding to the plurality of inquiry metadata according to the dependency relationship;
And determining the update state of the query target information by using the corresponding query metadata and the update log according to the adjusted sequence.
The preset time refers to a time period set by the cloud server, and in the time period, if the cloud server receives a plurality of query metadata, the cloud server triggers a mechanism for processing the dependency relationship among the plurality of query metadata. For example, the cloud server may set a time interval of 30 seconds, 1 minute, or 3 minutes, which may trigger a mechanism to handle dependencies if multiple query metadata is received within a preset time. In an ERP system, different query metadata may relate to different data objects and operations, and there may be a dependency relationship between different query metadata, i.e., execution of one query instruction may depend on another query result. The cloud server needs to analyze the received multiple query metadata, judge the dependency relationship between the multiple query metadata, first check the query object identifiers in each query metadata to determine whether the query object identifiers relate to the same or related data objects, and if the dependency relationship between the multiple query metadata is found, the cloud server needs to sequentially adjust the requests corresponding to the query metadata according to the dependency relationship. For example, if query metadata 1 depends on the results of query metadata 2, the cloud server would process query metadata 2 first and then query metadata 1. Assume a scenario in which user A has sent a query metadata 1, query the latest status of order number 12345, user B has sent a query metadata 2, query the progress of the production of order number 12345, and user C has sent a query metadata 3, query the quantity of material of order number 12345. Query metadata 1,2 and 3 all refer to the same order number 12345, but they query different data objects, and there is a dependency relationship between them, because query metadata 3 needs to query the amount of material of order number 12345, and these pieces of information depend on the production progress of order number 12345, i.e., the result of query metadata 2, so that the query requests are sorted in order of processing query metadata 2 first, then query metadata 3, and finally query metadata 1. According to the adjusted order, the cloud server uses the corresponding query metadata and the data update log to determine an update status of the query target information.
Specifically, the order is adjusted to ensure the accuracy of the data, because when the data to be queried is in an interdependent relationship, the execution of a certain query instruction may depend on another query result, in other words, another query result may cause the interdependent data to be updated, for example, one user queries the price of the order, the number of orders needs to be updated according to the price of the order, and another user needs to query the number of orders, at this time, although this data of the number of orders has not been updated yet, another user may modify the number of updated orders according to the price of the order, and therefore, when the query instruction of the price of the query order and the number of the query order occurs, the order of the two is adjusted so that the price of the query order is in front and the number of the query order is in back.
By judging the dependency relationship of the query metadata, the cloud server can ensure that the query requests are in correct sequence so as to ensure that the latest data update state is used for subsequent queries, thereby ensuring the accuracy and consistency of the data, being beneficial to improving the reliability and user experience of remote access of the ERP system, optimizing the data processing thread of the ERP system and avoiding data conflict.
Specifically, in some embodiments, the step of determining the update status of the query target information using the corresponding query metadata and the data update log according to the adjusted order includes:
according to the adjusted sequence, when two adjacent query metadata have a dependency relationship, after the update state of the query target information is determined by using the corresponding previous query metadata and the data update log, the update state of the query target information is determined by using the corresponding subsequent query metadata and the data update log after the preset time;
The cloud server determines that there is a dependency relationship between the query metadata, and then readjust the query sequence according to the dependency relationship, and there may be a difference between the actual query sequence and the sequence of receiving the query metadata, for example, the cloud server receives the query metadata 1 first and then receives the query metadata 2, but if the query metadata 1 depends on the result of the query metadata 2, then there is a dependency relationship between the two query metadata, the query metadata 2 is the previous query metadata, the query metadata 1 belongs to the subsequent query metadata, when the actual search data update log obtains the data update state of the target information, the data update state search of the query metadata 2 needs to be performed first, and after the data update state of the query metadata is determined, the latest update record search is performed on the target information according to the query metadata 1 to determine the data update state. On the basis, the cloud server sets a preset time interval for determining the processing sequence between two adjacent query metadata. The setting of the preset time interval needs to take into account the processing capacity of the system, the size of the data volume and the requirements of the user. For example, the preset time interval may be set to 30 seconds, 1 minute or 3 minutes, which means that, during the preset time interval, the cloud server may preferentially process the previously queried metadata in the dependency relationship, and in the process that the cloud server retrieves the latest update record of the target information, the target data of the previously queried metadata may be updated, and the cloud server may maintain the data update log according to the previously queried metadata at any time, so that the data stored on the cloud server and the data update log are kept synchronous, thereby ensuring that the data update state is up to date, and then re-process the later queried metadata in the dependency relationship, and ensuring that the query result obtained by the user is based on the latest data update state.
Further, the method further comprises the following steps:
And sending waiting prompt information to a main system or a client corresponding to the update state of the query target information by using the corresponding query metadata and the data update log after the preset time is required.
When the cloud server preferentially processes the previous query metadata in the dependency relationship, in the process that the cloud server retrieves the latest update record of the target information, the cloud server sends waiting prompt information to a main system or an offline client corresponding to the query metadata 1 to prompt that the latest update record retrieval of the data of the previous query metadata is currently being executed, the main system or the offline client needs to wait for a period of time to acquire the updated target information, and by sending the waiting prompt information, the initiator of the request of the dependency relationship behind can be ensured to know the progress of the data update, and the unnecessary query request is prevented from being repeatedly initiated. In practical application, the manner of sending the waiting prompt message may be adjusted according to specific situations and system design, for example, a popup prompt may be popped up when the host system or the offline client receives the waiting prompt message, a dialog box may be popped up to inform the user that a period of waiting is needed to obtain updated data, and an expected waiting time may be provided, or a status bar may be displayed, an icon or a text may be displayed in the status bar, to indicate that the data is being updated, and a rotating loading animation or progress bar may be provided, so that the user may know the update progress, and may also be a voice prompt, a notification message, a custom prompt, or the like, so as to ensure that the user may not miss the prompt of the data update.
The waiting prompt information is sent to inform the user that the data is being updated, so that unnecessary query requests are prevented from being repeatedly initiated, the user experience is improved, the system load can be reduced by reducing the unnecessary query requests, the system performance is improved, the later requests of the dependency relationship can be ensured to acquire the latest data by the waiting prompt information, the consistency of the data is ensured, the data conflict between the earlier requests of the dependency relationship and the later requests of the dependency relationship can be avoided by waiting for the preset time, the waiting prompt information can clearly inform the user of the progress of data update, the user can know the data update state, the remote access reliability of the ERP system is improved, and the user experience is improved.
As shown in fig. 2, fig. 2 is a schematic structural diagram of an update-prompting device of an ERP system provided by an embodiment of the present application, where the device is applied to the technical field of ERP, the ERP system includes a main system, a client and a cloud server, the main system and the client interact data through a local area network, the cloud server is respectively connected with the main system and the client in an offline state through the internet, and establishes and maintains a data update log in the cloud server, and is used for recording the data update state in the ERP system, and the update-prompting device 200 of the ERP system provided by the embodiment of the present application includes:
A first module 201, configured to receive query metadata sent by a host system or a client in an offline state when executing a local query instruction;
A second module 202, configured to determine an update status of the query target information according to the query metadata and the data update log;
And a third module 203, configured to send update prompt information to a host system or a client that sends the query metadata when determining that the update status is updated, so that the host system or the client that executes the local query instruction displays the update status of the target information when obtaining the query result.
As can be seen from the above, the update prompting device of the ERP system provided by the embodiment of the application is connected with the offline client through the cloud server, the data update of the offline client can be synchronized to the main system in time, so that the data consistency is ensured, the loss of the data update in the offline state is avoided, the user can know the update state of the target information in time, the use of the outdated data is avoided, the working efficiency is improved, the problem of lagging data query results in the offline state is solved, the user experience is improved, the risk of data collision when the offline client is re-connected to the local area network is reduced, the consistency and accuracy of the data are ensured, and the remote access capability of the ERP system based on the local area network is enhanced.
In addition, in some preferred embodiments, the update-prompting device of the ERP system provided by the present application may perform any one of the steps of the above method.
Referring to fig. 3, fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application, where the electronic device 300 includes a processor 301 and a memory 302, where the processor 301 and the memory 302 are interconnected and communicate with each other through a communication bus 303 and/or other types of connection mechanisms (not shown), and where the memory 302 stores computer readable instructions executable by the processor 301, and when the electronic device is running, the processor 301 executes the computer readable instructions to execute a method in any optional implementation of the foregoing embodiment when executing the computer readable instructions to implement functions of receiving query metadata sent by a host system or a client in an offline state when executing a local query instruction, determining an update state of query target information according to the query metadata and a data update, and when determining that the update state is updated, sending update prompt information to the host system or the client that sends the query metadata, so that the host system or the client that executes the local query instruction displays the update state of the target information when obtaining a query result.
The embodiment of the application provides a computer readable storage medium, which when being executed by a processor, performs the method in any optional implementation manner of the above embodiment to realize the following functions of receiving query metadata sent by a host system or a client in an offline state when executing a local query instruction, determining an update state of query target information according to the query metadata and a data update log, and sending update prompt information to the host system or the client which sends the query metadata when determining that the update state is updated, so that the host system or the client which executes the local query instruction displays the update state of the target information when obtaining a query result.
The computer readable storage medium may be implemented by any type or combination of volatile or non-volatile Memory devices, such as static random access Memory (Static Random Access Memory, SRAM for short), electrically erasable Programmable Read-Only Memory (ELECTRICALLY ERASABLE PROGRAMMABLE READ-Only Memory, EEPROM for short), erasable Programmable Read-Only Memory (Erasable Programmable Read Only Memory, EPROM for short), programmable Read-Only Memory (PROM for short), read-Only Memory (ROM for short), magnetic Memory, flash Memory, magnetic disk, or optical disk.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and variations will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.