Data processing method, device, readable storage medium and electronic device
By detecting the network status on the client and performing corresponding processing, the problem of not being able to provide continuous and complete offline services in complex network environments is solved, and normal use and automatic data submission are achieved under harsh network conditions.
Patent Information
- Application Number
- CN202211546261.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-05
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2042-12-05
AI Technical Summary
The prior art cannot provide continuous and complete offline services in complex networks and scenarios, especially in cases where there is no network, no network or poor network.
By detecting the network status on the client and obtaining and storing interface information and data information from the server in the network connection state, the locally stored information is retrieved and displayed when the network state is not connected, and the edited data information is automatically uploaded when the network state is restored.
It realizes that the client can still be used normally under harsh network conditions, expands user usage scenarios, optimizes user experience, and reduces transmission pressure.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information interaction, and in particular to a data processing method, device, readable storage medium and electronic device. Background Art
[0002] In related technologies, various fields need to conduct business in complex networks and scenarios. Due to the limitations of HTML5 (Hypertext Markup Language 5, Hypertext 5.0) specifications, it is impossible to provide continuous and complete offline services when there is no network, or when the network is suddenly disconnected, the network is poor, or the back-end system crashes. Summary of the invention
[0003] The present invention aims to at least solve the technical problems existing in the prior art or related technology.
[0004] To this end, a first aspect of the present invention provides a data processing method.
[0005] A second aspect of the present invention provides a data processing device.
[0006] A third aspect of the present invention provides a data processing device.
[0007] A fourth aspect of the present invention provides a readable storage medium.
[0008] A fifth aspect of the present invention provides an electronic device.
[0009] In view of this, the first aspect of the present invention proposes a data processing method, which is used for a client, and the processing method includes: detecting the network status between the client and the server; when the network status is a network connection status, obtaining and displaying interface information and data information from the server, and storing the interface information and data information in a local storage interval; when the network status is a network disconnected status, retrieving and displaying the interface information and data information stored in the storage interval, and storing the edited data information in the local storage interval; when the network status changes from a network disconnected status to a network connected status, uploading the edited data information to the server.
[0010] In the technical solution of the present invention, data is exchanged between the client and the server through the network, that is, business is conducted through the client. In order to avoid the network status affecting the user's downloading of data information in the server through the client or affecting the uploading of edited data information, before conducting business through the client, the client needs to detect the network status between the client and the server, and determine different processing methods of the data information according to the network status.
[0011] Specifically, when the network status is a network connection status, the client can obtain interface information and data information from the server, and display the interface information and data information, wherein the data information can be displayed on the interface information, and then the client stores the interface information and data information in a local storage interval, so that when the network status is a network disconnected state, the interface information and data information stored in the local storage interval can be retrieved. By downloading and pre-setting data in advance, it works in a complex network environment, expands user usage scenarios, and optimizes user experience.
[0012] In any of the above technical solutions, when the network status is a network disconnected state, the client retrieves the interface information and data information stored in the local storage interval and displays the interface information and data information, wherein the interface information and data information retrieved by the client in the local storage interval may be the interface information and data information stored in the previous network connection state. After the interface information and data information stored in the local storage interval are displayed on the client, the user can edit the data information through the client. Since the network status at this time is a network disconnected state, that is, data information cannot be interacted between the client and the server, the edited data information is stored in the local storage interval, and the edited data information is submitted when the network status is a network connected state. In this way, the client can reasonably save the edited data locally or upload it to the server without the user's perception, thereby reducing transmission pressure and improving the usability under severe network conditions.
[0013] In any of the above technical solutions, after the user edits the data information retrieved from the local storage interval through the client, based on the user's desire to upload the edited data information to the server, the client stores the edited data information in the local storage interval, and then the client monitors the network status between the client and the server in real time. When the network status between the client and the server changes from a network disconnected state to a network connected state, the client automatically uploads the edited data information in the local storage interval to the server, thereby realizing the automatic submission of the edited data information without the user's perception.
[0014] In any of the above technical solutions, the network disconnection state may be an abnormal network state in which the client cannot establish a connection with the server, such as a disconnected network state, a poor network state, or a server crash state.
[0015] In any of the above technical solutions, the data information may be archival data, business document data, and other data information that needs to be edited. For example, when a normal network connection is established between the client and the server, that is, when the network status is a network connection status, the user can download the data information and the interface information for displaying the data information from the server normally through the client, and store the downloaded data information and interface information in a local storage interval. In addition, after the user edits the data information through the client, the edited data information can be directly uploaded to the server; when the network between the client and the server is suddenly disconnected, that is, when the network status is a network disconnected status, the client intercepts the user's request to download the data information and the interface information for displaying the data information from the server, and retrieves the interface information and data information from the local storage interval, thereby enriching the client's usage scenario. After the user edits the data information through the client, the client intercepts the user's request to upload the edited data information to the server, and stores the edited data information in a local storage unit, thereby realizing the normal use of online business applications in a weak network, no network environment, and when the back-end system crashes, greatly expanding the time and space scope in which users can conduct business.
[0016] In any of the above technical solutions, the client may be a browser constructed according to the HTML5 (Hypertext Markup Language 5, Hypertext 5.0) standard.
[0017] The data processing method provided by the present invention may also have the following additional technical features:
[0018] In any of the above technical solutions, uploading the edited data information to the server specifically includes: when the edited data information is stored in the local storage interval, uploading the edited data information to the server.
[0019] In the above technical solution, the client continuously detects the local storage interval to determine whether the edited data information is stored in the local storage interval. If the edited data information is stored in the local storage interval, the client automatically uploads the edited data information in the local storage interval to the server, thereby realizing automatic submission of the edited data information without the user's perception.
[0020] In any of the above technical solutions, the processing method also includes: determining a first correspondence between the interface information and the data information when the network state is a network connection state; and storing the first correspondence in a local storage interval.
[0021] In the above technical solution, since the client cannot interact with the server for data when the network is not connected, in order to make the data information and the interface information for displaying the data information when the network is not connected exactly the same as the data information and the interface information for displaying the data information when the network is connected, the first correspondence between the interface information and the data information in the network connection state is determined, and the first correspondence is stored in the local storage interval. By customizing the offline presentation form and operation mode, there is no intrusion on the original online application, and it can be simply repeated in existing applications in various fields, thereby reducing business duplication costs.
[0022] In any of the above technical solutions, retrieving and displaying the interface information and data information stored in the local storage interval specifically includes: retrieving the interface information and data information corresponding to the interface information stored in the storage interval according to the first corresponding relationship, and displaying the retrieved interface information and data information according to the first corresponding relationship.
[0023] In the above technical solution, after the first correspondence is stored in the local storage interval, when the network status is not connected to the network and the user wants to download data information, the client retrieves the interface information and the data information corresponding to the interface information through the first correspondence in the storage interval according to the first correspondence, and displays the retrieved interface information and data information.
[0024] In the above technical solution, exemplarily, when the network state is not connected, the specific steps of retrieving and displaying the interface information and data information through the first correspondence are as follows: the first correspondence may be that the interface information A corresponds to the data information A, that is, the data information A is displayed on the interface information A. Therefore, when the user wants to download the data information A when the network is not connected, the client retrieves the interface information A and the data information A in the local storage interval through the first correspondence, and displays the data information A on the interface information A. The first correspondence may also be that the data information B is the next child node of the interface information B, that is, the user displays the data information B by clicking the interface information B. Therefore, when the user wants to download the data information B when the network is not connected, the client retrieves the interface information B and the data information B in the local storage interval through the first correspondence, and displays the interface information B. The user can display the data information B by clicking the interface information B again. By customizing the offline presentation form and operation mode, the upper limit of offline data storage can be broken, thereby providing better network status perception capabilities and enriching the client usage scenarios.
[0025] In any of the above technical solutions, after detecting the network status between the server, the processing method also includes: when it is determined that the network status is a network connection status, obtaining a second correspondence between the account information and the interface information, and storing the second correspondence in a local storage interval; when the network status is a network disconnected state, retrieving and displaying the interface information in the local storage interval according to the second correspondence.
[0026] In the above technical solution, the user's personal account can be logged in through the account information, and data information can be downloaded, edited and uploaded on the personal account. When the network status is the network connection status, the user logs in to the account information through the normal data exchange between the client and the server to enter the user's own personal account, and downloads, edits and uploads data information in the personal account.
[0027] In the above technical solution, when the network status is a network disconnected state, the user cannot log in to the account information normally through the data interaction between the client and the server. Therefore, it is necessary to obtain the second correspondence between the account information and the interface information when the network status is a network connected state, and store the second correspondence in the local storage interval, so that when the network status is a network disconnected state, the client can retrieve the interface information corresponding to the account information in the local storage interval according to the second correspondence when the network status is a network disconnected state. In this way, the user can select the interface information corresponding to the account information when there is no network, thereby avoiding the user from processing erroneous data information, thereby improving the efficiency of data processing.
[0028] In any of the above technical solutions, when the network status is a network disconnected state, the interface information in the local storage interval is retrieved and displayed according to the second corresponding relationship, specifically including: receiving a login instruction, and logging in to the account information according to the login instruction; and retrieving and displaying the interface information corresponding to the account information in the local storage interval according to the second corresponding relationship.
[0029] In the above technical solution, when the network status is that the network is not connected, the client receives the user's login instruction, which includes account information, and logs in to the account information according to the login instruction. At this time, the client retrieves the interface information corresponding to the account information in the local storage interval according to the pre-acquired second corresponding relationship.
[0030] In any of the above technical solutions, illustratively, the second corresponding relationship may be that the account information C corresponds to the retrieval and display of the interface information C, and the interface information C may include the user's personal information, as well as buttons for downloading, editing, and uploading data information, and then when the user wants to download the data information C, the client may retrieve the data information C and the interface information C for displaying the data information C from the local storage interval. ,, that is, interface information C and data information C and data information C and interface information C , The corresponding relationship between them is the first corresponding relationship, and then the user can edit the retrieved data information, and store the edited data information in the local storage interval when the network is not connected. After waiting for the network status to change to the network connection status, the client automatically uploads the edited data information stored in the local storage interval to the server.
[0031] The second aspect of the present invention provides a data processing device, which is used for a client, and the processing device includes: a detection module, which is used to detect the network status between the server and the server; a first processing module, which is used to obtain and display interface information and data information from the server when the network status is a network connection status, and store the interface information and data information in a local storage interval; a second processing module, which is used to retrieve and display the interface information and data information stored in the storage interval when the network status is a network disconnected status, and store the edited data information in the local storage interval; a third processing module, which is used to upload the edited data information to the server when the network status changes from a network disconnected status to a network connected status.
[0032] In the technical solution of the present invention, data is exchanged between the client and the server through the network, that is, business is conducted through the client. In order to avoid the network status affecting the user's downloading of data information in the server through the client or affecting the uploading of edited data information, before conducting business through the client, the client needs to detect the network status between the client and the server, and determine different processing methods of the data information according to the network status.
[0033] Specifically, when the network status is a network connection status, the client can obtain interface information and data information from the server, and display the interface information and data information, wherein the data information can be displayed on the interface information, and then the client stores the interface information and data information in a local storage interval, so that when the network status is a network disconnected state, the interface information and data information stored in the local storage interval can be retrieved. By downloading and pre-setting data in advance, it works in a complex network environment, expands user usage scenarios, and optimizes user experience.
[0034] In any of the above technical solutions, when the network status is a network disconnected state, the client retrieves the interface information and data information stored in the local storage interval and displays the interface information and data information, wherein the interface information and data information retrieved by the client in the local storage interval may be the interface information and data information stored in the previous network connection state. After the interface information and data information stored in the local storage interval are displayed on the client, the user can edit the data information through the client. Since the network status at this time is a network disconnected state, that is, data information cannot be interacted between the client and the server, the edited data information is stored in the local storage interval, and the edited data information is submitted when the network status is a network connected state. In this way, the client can reasonably save the edited data locally or upload it to the server without the user's perception, thereby reducing transmission pressure and improving the usability under severe network conditions.
[0035] In any of the above technical solutions, after the user edits the data information retrieved from the local storage interval through the client, based on the user's desire to upload the edited data information to the server, the client stores the edited data information in the local storage interval, and then the client monitors the network status between the client and the server in real time. When the network status between the client and the server changes from a network disconnected state to a network connected state, the client automatically uploads the edited data information in the local storage interval to the server, thereby realizing the automatic submission of the edited data information without the user's perception.
[0036] In any of the above technical solutions, the network disconnection state may be an abnormal network state in which the client cannot establish a connection with the server, such as a disconnected network state, a poor network state, or a server crash state.
[0037] In any of the above technical solutions, the data information may be archival data, business document data, and other data information that needs to be edited. For example, when a normal network connection is established between the client and the server, that is, when the network status is a network connection status, the user can download the data information and the interface information for displaying the data information from the server normally through the client, and store the downloaded data information and interface information in a local storage interval. In addition, after the user edits the data information through the client, the edited data information can be directly uploaded to the server; when the network between the client and the server is suddenly disconnected, that is, when the network status is a network disconnected status, the client intercepts the user's request to download the data information and the interface information for displaying the data information from the server, and retrieves the interface information and data information from the local storage interval, thereby enriching the client's usage scenario. After the user edits the data information through the client, the client intercepts the user's request to upload the edited data information to the server, and stores the edited data information in a local storage unit, thereby realizing the normal use of online business applications in a weak network, no network environment, and when the back-end system crashes, greatly expanding the time and space scope in which users can conduct business.
[0038] In any of the above technical solutions, the client may be a browser constructed according to the HTML5 (Hypertext Markup Language 5, Hypertext 5.0) standard.
[0039] The data processing device provided by the present invention may also have the following additional technical features:
[0040] In any of the above technical solutions, the third processing module is further used to: when the edited data information is stored in the local storage interval, upload the edited data information to the server.
[0041] In the above technical solution, the client continuously detects the local storage interval to determine whether the edited data information is stored in the local storage interval. If the edited data information is stored in the local storage interval, the client automatically uploads the edited data information in the local storage interval to the server, thereby realizing automatic submission of the edited data information without the user's perception.
[0042] In any of the above technical solutions, the processing device is also used to: determine the first corresponding relationship between the interface information and the data information when the network state is a network connection state; and store the first corresponding relationship in a local storage interval.
[0043] In the above technical solution, since the client cannot interact with the server for data when the network is not connected, in order to make the data information and the interface information for displaying the data information when the network is not connected exactly the same as the data information and the interface information for displaying the data information when the network is connected, the first correspondence between the interface information and the data information in the network connection state is determined, and the first correspondence is stored in the local storage interval. By customizing the offline presentation form and operation mode, there is no intrusion on the original online application, and it can be simply repeated in existing applications in various fields, thereby reducing business duplication costs.
[0044] In any of the above technical solutions, the second processing module is specifically used to: retrieve the interface information and data information corresponding to the interface information stored in the storage interval according to the first corresponding relationship, and display the retrieved interface information and data information according to the first corresponding relationship.
[0045] In the above technical solution, after the first correspondence is stored in the local storage interval, when the network status is not connected to the network and the user wants to download data information, the client retrieves the interface information and the data information corresponding to the interface information through the first correspondence in the storage interval according to the first correspondence, and displays the retrieved interface information and data information.
[0046] In the above technical solution, exemplarily, when the network state is not connected, the specific steps of retrieving and displaying the interface information and data information through the first correspondence are as follows: the first correspondence may be that the interface information A corresponds to the data information A, that is, the data information A is displayed on the interface information A. Therefore, when the user wants to download the data information A when the network is not connected, the client retrieves the interface information A and the data information A in the local storage interval through the first correspondence, and displays the data information A on the interface information A. The first correspondence may also be that the data information B is the next child node of the interface information B, that is, the user displays the data information B by clicking the interface information B. Therefore, when the user wants to download the data information B when the network is not connected, the client retrieves the interface information B and the data information B in the local storage interval through the first correspondence, and displays the interface information B. The user can display the data information B by clicking the interface information B again. By customizing the offline presentation form and operation mode, the upper limit of offline data storage can be broken, thereby providing better network status perception capabilities and enriching the client usage scenarios.
[0047] In any of the above technical solutions, the processing device is also used to: when it is determined that the network status is a network connection status, obtain a second correspondence between the account information and the interface information, and store the second correspondence in a local storage interval; when the network status is a network disconnected status, retrieve and display the interface information in the local storage interval according to the second correspondence.
[0048] In the above technical solution, the user's personal account can be logged in through the account information, and data information can be downloaded, edited and uploaded on the personal account. When the network status is the network connection status, the user logs in to the account information through the normal data exchange between the client and the server to enter the user's own personal account, and downloads, edits and uploads data information in the personal account.
[0049] In the above technical solution, when the network status is a network disconnected state, the user cannot log in to the account information normally through the data interaction between the client and the server. Therefore, it is necessary to obtain the second correspondence between the account information and the interface information when the network status is a network connected state, and store the second correspondence in the local storage interval, so that when the network status is a network disconnected state, the client can retrieve the interface information corresponding to the account information in the local storage interval according to the second correspondence when the network status is a network disconnected state. In this way, the user can select the interface information corresponding to the account information when there is no network, thereby avoiding the user from processing erroneous data information, thereby improving the efficiency of data processing.
[0050] In any of the above technical solutions, the data processing device is specifically used to: receive a login instruction, and log in the account information according to the login instruction; and retrieve and display the interface information corresponding to the account information in the local storage interval according to the second corresponding relationship.
[0051] In the above technical solution, when the network status is that the network is not connected, the client receives the user's login instruction, which includes account information, and logs in to the account information according to the login instruction. At this time, the client retrieves the interface information corresponding to the account information in the local storage interval according to the pre-acquired second corresponding relationship.
[0052] In any of the above technical solutions, illustratively, the second corresponding relationship may be that the account information C corresponds to the retrieval and display of the interface information C, and the interface information C may include the user's personal information, as well as buttons for downloading, editing, and uploading data information, and then when the user wants to download the data information C, the client may retrieve the data information C and the interface information C for displaying the data information C from the local storage interval. , , that is, interface information C and data information C and data information C and interface information C ,The corresponding relationship between them is the first corresponding relationship, and then the user can edit the retrieved data information, and store the edited data information in the local storage interval when the network is not connected. After waiting for the network status to change to the network connection status, the client automatically uploads the edited data information stored in the local storage interval to the server.
[0053] The third aspect of the present invention provides a data processing device, comprising: a memory, in which programs or instructions are stored; a processor, which executes the programs or instructions stored in the memory to implement the steps of the data processing method proposed in the above technical solution of the present application, and thus has all the beneficial technical effects of the data processing method proposed in the above technical solution of the present application, which will not be elaborated herein.
[0054] A fourth aspect of the present invention provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the data processing method in any of the above technical solutions are implemented.
[0055] The readable storage medium provided by the present invention stores a program or instruction thereon, and when the program or instruction is executed by a processor, the steps of the data processing method in any of the above technical solutions can be implemented. Therefore, the readable storage medium proposed by the present invention has all the beneficial effects of the data processing method in any of the above technical solutions, which will not be repeated here.
[0056] A fifth aspect of the present invention provides an electronic device, comprising: a data processing device in any of the above technical solutions; and / or a readable storage medium in the above technical solution.
[0057] The electronic device provided by the present invention includes the data processing device in any of the above technical solutions. Therefore, it has all the beneficial effects of the data processing device in any of the above technical solutions, which will not be repeated here.
[0058] In any of the above technical solutions, the electronic device provided by the present invention may further include the readable storage medium defined in the above technical solution. Therefore, the electronic device proposed by the present invention has all the beneficial effects of the readable storage medium defined in the above technical solution, which will not be described in detail here.
[0059] Additional aspects and advantages of the present invention will become apparent from the following description or may be learned by practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0061] Figure 1One of the flowcharts of the data processing method according to the embodiment of the present invention is shown;
[0062] Figure 2 A second flow chart of the method for processing data according to an embodiment of the present invention is shown;
[0063] Figure 3 A third flowchart of the method for processing data according to an embodiment of the present invention is shown;
[0064] Figure 4 A fourth flowchart of the method for processing data according to an embodiment of the present invention is shown;
[0065] Figure 5 FIG5 is a flowchart of a method for processing data according to an embodiment of the present invention;
[0066] Figure 6 A sixth flowchart of the method for processing data according to an embodiment of the present invention is shown;
[0067] Figure 7 A schematic diagram showing a process of uploading data information according to an embodiment of the present invention is shown;
[0068] Figure 8 A schematic diagram showing the overall flow of a method for processing data according to an embodiment of the present invention;
[0069] Fig. 9 One of the schematic block diagrams of the data processing device according to the embodiment of the present invention is shown;
[0070] Fig.10 The second schematic block diagram shows the data processing device according to the embodiment of the present invention. DETAILED DESCRIPTION
[0071] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0072] The execution subject of the embodiment provided in the embodiment of the present application can be a client device, and the subject can be determined according to actual use requirements, and the embodiment of the present application does not limit it. In order to more clearly describe the data processing method provided in the embodiment of the present application, the following method embodiment takes the execution subject of the data processing method as the client for exemplary description.
[0073] like Figure 1 As shown, an embodiment of the first aspect of the present invention provides a data processing method, which is used for a client and includes:
[0074] Step 102: Detect the network status with the server;
[0075] Step 104: when the network state is a network connection state, obtaining and displaying interface information and data information from the server, and storing the interface information and data information in a local storage area;
[0076] Step 106: when the network state is a network disconnected state, retrieve and display the interface information and data information stored in the storage interval, and store the edited data information in the local storage interval;
[0077] Step 108: When the network state changes from a network disconnected state to a network connected state, the edited data information is uploaded to the server.
[0078] In an embodiment of the present invention, data is exchanged between the client and the server through the network, that is, business is conducted through the client. In order to avoid the network status affecting the user's downloading of data information in the server through the client or affecting the uploading of edited data information, before conducting business through the client, the client needs to detect the network status between the client and the server, and determine different processing methods for the data information based on the network status.
[0079] Specifically, when the network status is a network connection status, the client can obtain interface information and data information from the server, and display the interface information and data information, wherein the data information can be displayed on the interface information, and then the client stores the interface information and data information in a local storage interval, so that when the network status is a network disconnected state, the interface information and data information stored in the local storage interval can be retrieved. By downloading and pre-setting data in advance, it works in a complex network environment, expands user usage scenarios, and optimizes user experience.
[0080] In any of the above embodiments, when the network status is a network disconnected state, the client retrieves the interface information and data information stored in the local storage interval and displays the interface information and data information, wherein the interface information and data information retrieved by the client in the local storage interval may be the interface information and data information stored in the previous network connection state. After the interface information and data information stored in the local storage interval are displayed on the client, the user can edit the data information through the client. Since the network status at this time is a network disconnected state, that is, the client and the server cannot interact with each other, the edited data information is stored in the local storage interval, and the edited data information is submitted when the network status is a network connected state. In this way, the client can reasonably save the edited data locally or upload it to the server without the user's perception, thereby reducing transmission pressure and improving the usability under severe network conditions.
[0081] In any of the above embodiments, after the user edits the data information retrieved from the local storage interval through the client, based on the user's desire to upload the edited data information to the server, the client stores the edited data information in the local storage interval, and then the client monitors the network status between the client and the server in real time. When the network status between the client and the server changes from a network disconnected state to a network connected state, the client automatically uploads the edited data information in the local storage interval to the server, thereby realizing automatic submission of the edited data information without the user's perception.
[0082] In any of the above embodiments, the network disconnection state may be an abnormal network state in which the client cannot establish a connection with the server, such as a disconnected network state, a poor network state, or a server crash state.
[0083] In any of the above embodiments, the data information may be data information that needs to be edited, such as archive data and business document data. For example, when a normal network connection is established between the client and the server, that is, when the network state is a network connection state, the user can download the data information and the interface information for displaying the data information from the server normally through the client, and store the downloaded data information and interface information in a local storage interval. In addition, after the user edits the data information through the client, the edited data information can be directly uploaded to the server; when the network between the client and the server is suddenly disconnected, that is, when the network state is a network disconnected state, the client intercepts the user's request to download the data information and the interface information for displaying the data information from the server, and retrieves the interface information and data information from the local storage interval, thereby enriching the use scenario of the client. After the user edits the data information through the client, the client intercepts the user's request to upload the edited data information to the server, and stores the edited data information in a local storage unit, thereby realizing the normal use of online business applications in a weak network, no network environment, and when the back-end system crashes, greatly expanding the time and space scope in which the user can conduct business.
[0084] In any of the above embodiments, the client may be a browser constructed according to the HTML5 (Hypertext Markup Language 5, Hypertext 5.0) standard.
[0085] like Figure 2 As shown, in any of the above embodiments, after the edited data information is stored in the local storage interval, the processing method further includes:
[0086] Step 202: Detect the network status with the server;
[0087] Step 204: when the network state is a network connection state, obtaining and displaying interface information and data information from the server, and storing the interface information and data information in a local storage area;
[0088] Step 206: when the network state is a network disconnected state, the interface information and data information stored in the storage interval are retrieved and displayed, and the edited data information is stored in the local storage interval.
[0089] Step 208: When the edited data information is stored in the local storage area, the edited data information is uploaded to the server.
[0090] In the above embodiment, the client continuously detects the local storage interval to determine whether the edited data information is stored in the local storage interval. If the edited data information is stored in the local storage interval, the client automatically uploads the edited data information in the local storage interval to the server, thereby automatically submitting the edited data information without the user's awareness.
[0091] like Figure 3 As shown, in any of the above embodiments, the processing method further includes:
[0092] Step 302: Detect the network status with the server;
[0093] Step 304: determining a first correspondence between the interface information and the data information when the network state is a network connection state;
[0094] Step 306: storing the first corresponding relationship in the local storage interval;
[0095] Step 308: when the network state is a network connection state, obtaining and displaying interface information and data information from the server, and storing the interface information and data information in a local storage area;
[0096] Step 310: when the network state is a network disconnected state, the interface information and data information stored in the storage interval are retrieved and displayed, and the edited data information is stored in the local storage interval.
[0097] In the above embodiment, since the client cannot interact with the server for data when the network is not connected, in order to make the data information and the interface information for displaying the data information when the network is not connected exactly the same as the data information and the interface information for displaying the data information when the network is connected, the first correspondence between the interface information and the data information in the network connection state is determined, and the first correspondence is stored in the local storage interval. By customizing the offline presentation form and operation mode, there is no intrusion on the original online application, and it can be simply repeated in existing applications in various fields, thereby reducing business duplication costs.
[0098] like Figure 4 As shown, in any of the above embodiments, calling and displaying the interface information and data information stored in the local storage interval specifically includes:
[0099] Step 402: Detect the network status with the server;
[0100] Step 404: determining a first correspondence between the interface information and the data information when the network state is a network connection state;
[0101] Step 406: storing the first corresponding relationship in a local storage interval;
[0102] Step 408: when the network status is a network connection status, obtaining and displaying interface information and data information from the server, and storing the interface information and data information in a local storage area;
[0103] Step 410: when the network state is a network disconnected state, retrieve the interface information and data information corresponding to the interface information stored in the storage interval according to the first corresponding relationship, and display the retrieved interface information and data information according to the first corresponding relationship;
[0104] Step 412: Store the edited data information in the local storage area.
[0105] In the above embodiment, after the first correspondence relationship is stored in the local storage interval, when the network status is a network disconnected state, and when the user wants to download data information, the client retrieves the interface information and the data information corresponding to the interface information through the first correspondence relationship in the storage interval according to the first correspondence relationship, and displays the retrieved interface information and data information.
[0106] In the above embodiment, exemplarily, when the network state is disconnected, the specific steps of retrieving and displaying the interface information and data information through the first correspondence are as follows: the first correspondence may be that the interface information A corresponds to the data information A, that is, the data information A is displayed on the interface information A. Therefore, when the user wants to download the data information A when the network is disconnected, the client retrieves the interface information A and the data information A in the local storage interval through the first correspondence, and displays the data information A on the interface information A. The first correspondence may also be that the data information B is the next child node of the interface information B, that is, the user displays the data information B by clicking the interface information B. Therefore, when the user wants to download the data information B when the network is disconnected, the client retrieves the interface information B and the data information B in the local storage interval through the first correspondence, and displays the interface information B. The user can display the data information B by clicking the interface information B again. By customizing the offline presentation form and operation mode, the upper limit of offline data storage can be broken, thereby providing a better network status perception capability and enriching the client usage scenarios.
[0107] like Figure 7 As shown, in any of the above embodiments, the specific steps of uploading data information are:
[0108] Step 702: Determine whether the network status with the server is a network connection status; if the determination result is yes, proceed to step 704; if the determination result is no, proceed to step 706;
[0109] Step 704: Obtain and display interface information from the server, and store the interface information in a local storage area;
[0110] Step 706: Retrieve and display the interface information stored in the local storage area;
[0111] Step 708: Determine whether the network status with the server is a network connection status; if the determination result is yes, proceed to step 710; if the determination result is no, proceed to step 712;
[0112] Step 710: Obtain and display data information from the server, and store the data information in a local storage area;
[0113] Step 712: Retrieve and display the data information stored in the local storage interval, and store the edited data information in the local storage interval;
[0114] Step 714: when the network state is the network connection state, uploading the edited data information; when the network state changes from the network disconnected state to the network connected state, uploading the edited data information stored in the local storage area.
[0115] In any of the above embodiments, the client can select different data processing methods according to the network status. When the network is connected, the interface information and the data information corresponding to the interface information can be successfully downloaded. When the network is not connected, when the user wants to download the interface information and the data information corresponding to the interface information, the client can retrieve the interface information and the data information corresponding to the interface information from the local storage interval. Before downloading and displaying the interface information and the data information, the client can judge the network status at this time, that is, before downloading and displaying the interface information, it can judge whether the network status is a network connection status, and before downloading and displaying the data information, it can judge whether the network status is a network connection status, so as to ensure that the client can work in a complex network environment.
[0116] In any of the above embodiments, in order to process data information when the network is not connected, the interface information and data information need to be stored in the local storage interval when the network is connected. By downloading and presetting data in advance, the user usage scenario is expanded and the user experience is optimized. Then, when the network is not connected, the user can retrieve the interface information and data information in the local storage interval through the client and edit the data information. Based on the user's desire to upload the edited data information to the server, the client stores the edited data information in the local storage interval. Then, the client monitors the network status between the server and the server in real time. When the network status between the server and the network changes from the network disconnected state to the network connected state, the client automatically uploads the edited data information in the local storage interval to the server, so that the edited data information can be automatically submitted without the user's awareness.
[0117] like Figure 5 As shown, in any of the above embodiments, after detecting the network status with the server, the processing method further includes:
[0118] Step 502: Detect the network status with the server;
[0119] Step 504: when it is determined that the network state is a network connection state, obtaining a second correspondence relationship between the account information and the interface information, and storing the second correspondence relationship in a local storage interval;
[0120] Step 506: when the network state is a network disconnected state, retrieve and display the interface information in the local storage interval according to the second corresponding relationship;
[0121] Step 508: when the network status is a network connection status, obtaining and displaying interface information and data information from the server, and storing the interface information and data information in a local storage area;
[0122] Step 510: When the network state is a network disconnected state, the interface information and data information stored in the storage interval are retrieved and displayed, and the edited data information is stored in the local storage interval.
[0123] In the above embodiment, the user's personal account can be logged in through the account information, and data information can be downloaded, edited and uploaded on the personal account. When the network status is the network connection status, the user logs in to the account information through the normal data exchange between the client and the server to enter the user's own personal account, and downloads, edits and uploads data information in the personal account.
[0124] In the above embodiment, when the network status is a network disconnected state, the user cannot log in to the account information normally through the data interaction between the client and the server. Therefore, it is necessary to obtain the second correspondence between the account information and the interface information when the network status is a network connected state, and store the second correspondence in the local storage interval, so that when the network status is a network disconnected state, the client can retrieve the interface information corresponding to the account information in the local storage interval according to the second correspondence when the network status is a network disconnected state. In this way, the user can select the interface information corresponding to the account information when there is no network, thereby avoiding the user from processing erroneous data information, thereby improving the efficiency of data processing.
[0125] like Figure 6 As shown, in any of the above embodiments, when the network state is a network disconnected state, the interface information in the local storage interval is retrieved and displayed according to the second corresponding relationship, specifically including:
[0126] Step 602: Detect the network status with the server;
[0127] Step 604: when it is determined that the network state is a network connection state, obtaining a second correspondence relationship between the account information and the interface information, and storing the second correspondence relationship in a local storage interval;
[0128] Step 606: receiving a login instruction, and logging in the account information according to the login instruction;
[0129] Step 608: Retrieve and display the interface information corresponding to the account information in the local storage interval according to the second corresponding relationship;
[0130] Step 610: when the network state is a network connection state, obtain and display the interface information and data information from the server, and store the interface information and data information in a local storage area;
[0131] Step 612: when the network status is a network disconnected status, the interface information and data information stored in the storage interval are retrieved and displayed, and the edited data information is stored in the local storage interval.
[0132] In the above embodiment, when the network status is a network disconnected state, the client receives a login instruction from the user, the login instruction includes account information, and logs in to the account information according to the login instruction. At this time, the client retrieves the interface information corresponding to the account information in the local storage interval according to the pre-acquired second corresponding relationship.
[0133] like Figure 8 As shown, in any of the above embodiments, the data processing method specifically includes:
[0134] Step 802: receiving a login instruction, and logging in the account information according to the login instruction;
[0135] Step 804: when the network status is a network connection status, obtain and display interface information from the server, and store the interface information in a local storage area;
[0136] Step 806: when the network state is a network disconnected state, retrieve and display the interface information corresponding to the account information in the local storage interval according to the second corresponding relationship;
[0137] Step 808: when the network status is a network connection status, obtain and display data information from the server, store the data information in a local storage area, and upload the edited data information to the server;
[0138] Step 810: when the network state is a network disconnected state, retrieve and display the data information stored in the local storage interval, and store the edited data information in the local storage interval;
[0139] Step 812: After the network state changes from the network disconnected state to the network connected state, the edited data information stored in the local storage interval is uploaded to the server.
[0140] In any of the above embodiments, the second corresponding relationship may be, for example, that the account information C corresponds to the retrieval and display of the interface information C, and the interface information C may include the user's personal information, as well as buttons for downloading, editing, and uploading data information, and then when the user wants to download the data information C, the client may retrieve the data information C and the interface information C for displaying the data information C from the local storage interval. , , that is, interface information C and data information C and data information C and interface information C , The corresponding relationship between them is the first corresponding relationship, and then the user can edit the retrieved data information, and store the edited data information in the local storage interval when the network is not connected. After waiting for the network status to change to the network connection status, the client automatically uploads the edited data information stored in the local storage interval to the server.
[0141] like Fig. 9As shown, the second aspect of the embodiment of the present invention provides a data processing device 900, which is used for a client, and the data processing device 900 includes: a detection module 902, which is used to detect the network status between the server and the server; a first processing module 904, which is used to obtain and display interface information and data information from the server when the network status is a network connection status, and store the interface information and data information in a local storage interval; a second processing module 906, which is used to retrieve and display the interface information and data information stored in the storage interval when the network status is a network disconnected status, and store the edited data information in the local storage interval; a third processing module 908, which is used to upload the edited data information to the server when the network status changes from a network disconnected status to a network connected status.
[0142] In an embodiment of the present invention, data is exchanged between the client and the server through the network, that is, business is conducted through the client. In order to avoid the network status affecting the user's downloading of data information in the server through the client or affecting the uploading of edited data information, before conducting business through the client, the client needs to detect the network status between the client and the server, and determine different processing methods for the data information based on the network status.
[0143] Specifically, when the network status is a network connection status, the client can obtain interface information and data information from the server, and display the interface information and data information, wherein the data information can be displayed on the interface information, and then the client stores the interface information and data information in a local storage interval, so that when the network status is a network disconnected state, the interface information and data information stored in the local storage interval can be retrieved. By downloading and pre-setting data in advance, it works in a complex network environment, expands user usage scenarios, and optimizes user experience.
[0144] In any of the above embodiments, when the network status is a network disconnected state, the client retrieves the interface information and data information stored in the local storage interval and displays the interface information and data information, wherein the interface information and data information retrieved by the client in the local storage interval may be the interface information and data information stored in the previous network connection state. After the interface information and data information stored in the local storage interval are displayed on the client, the user can edit the data information through the client. Since the network status at this time is a network disconnected state, that is, the client and the server cannot interact with each other, the edited data information is stored in the local storage interval, and the edited data information is submitted when the network status is a network connected state. In this way, the client can reasonably save the edited data locally or upload it to the server without the user's perception, thereby reducing transmission pressure and improving the usability under severe network conditions.
[0145] In any of the above embodiments, after the user edits the data information retrieved from the local storage interval through the client, based on the user's desire to upload the edited data information to the server, the client stores the edited data information in the local storage interval, and then the client monitors the network status between the client and the server in real time. When the network status between the client and the server changes from a network disconnected state to a network connected state, the client automatically uploads the edited data information in the local storage interval to the server, thereby realizing automatic submission of the edited data information without the user's perception.
[0146] In any of the above embodiments, the network disconnection state may be an abnormal network state in which the client cannot establish a connection with the server, such as a disconnected network state, a poor network state, or a server crash state.
[0147] In any of the above embodiments, the data information may be data information that needs to be edited, such as archive data and business document data. For example, when a normal network connection is established between the client and the server, that is, when the network state is a network connection state, the user can download the data information and the interface information for displaying the data information from the server normally through the client, and store the downloaded data information and interface information in a local storage interval. In addition, after the user edits the data information through the client, the edited data information can be directly uploaded to the server; when the network between the client and the server is suddenly disconnected, that is, when the network state is a network disconnected state, the client intercepts the user's request to download the data information and the interface information for displaying the data information from the server, and retrieves the interface information and data information from the local storage interval, thereby enriching the use scenario of the client. After the user edits the data information through the client, the client intercepts the user's request to upload the edited data information to the server, and stores the edited data information in a local storage unit, thereby realizing the normal use of online business applications in a weak network, no network environment, and when the back-end system crashes, greatly expanding the time and space scope in which the user can conduct business.
[0148] In any of the above embodiments, the client may be a browser constructed according to the HTML5 (Hypertext Markup Language 5, Hypertext 5.0) standard.
[0149] In any of the above technical solutions, the third processing module 908 is further used to: when the edited data information is stored in the local storage interval, upload the edited data information to the server.
[0150] In the above technical solution, the client continuously detects the local storage interval to determine whether the edited data information is stored in the local storage interval. If the edited data information is stored in the local storage interval, the client automatically uploads the edited data information in the local storage interval to the server, thereby automatically submitting the edited data information without the user's perception. In any of the above embodiments, the processing device is also used to: determine the first correspondence between the interface information and the data information when the network state is a network connection state; and store the first correspondence in the local storage interval.
[0151] In the above embodiment, since the client cannot interact with the server for data when the network is not connected, in order to make the data information and the interface information for displaying the data information when the network is not connected exactly the same as the data information and the interface information for displaying the data information when the network is connected, the first correspondence between the interface information and the data information in the network connection state is determined, and the first correspondence is stored in the local storage interval. By customizing the offline presentation form and operation mode, there is no intrusion on the original online application, and it can be simply repeated in existing applications in various fields, thereby reducing business duplication costs.
[0152] In any of the above embodiments, the second processing module is specifically used to: retrieve the interface information and data information corresponding to the interface information stored in the storage interval according to the first corresponding relationship, and display the retrieved interface information and data information according to the first corresponding relationship.
[0153] In the above embodiment, after the first correspondence relationship is stored in the local storage interval, when the network status is a network disconnected state, and when the user wants to download data information, the client retrieves the interface information and the data information corresponding to the interface information through the first correspondence relationship in the storage interval according to the first correspondence relationship, and displays the retrieved interface information and data information.
[0154] In the above embodiment, exemplarily, when the network state is disconnected, the specific steps of retrieving and displaying the interface information and data information through the first correspondence are as follows: the first correspondence may be that the interface information A corresponds to the data information A, that is, the data information A is displayed on the interface information A. Therefore, when the user wants to download the data information A when the network is disconnected, the client retrieves the interface information A and the data information A in the local storage interval through the first correspondence, and displays the data information A on the interface information A. The first correspondence may also be that the data information B is the next child node of the interface information B, that is, the user displays the data information B by clicking the interface information B. Therefore, when the user wants to download the data information B when the network is disconnected, the client retrieves the interface information B and the data information B in the local storage interval through the first correspondence, and displays the interface information B. The user can display the data information B by clicking the interface information B again. By customizing the offline presentation form and operation mode, the upper limit of offline data storage can be broken, thereby providing a better network status perception capability and enriching the client usage scenarios.
[0155] In any of the above embodiments, the processing device is also used to: when determining that the network status is a network connection status, obtain a second correspondence between the account information and the interface information, and store the second correspondence in a local storage interval; when the network status is a network disconnected status, retrieve and display the interface information in the local storage interval according to the second correspondence.
[0156] In the above embodiment, the user's personal account can be logged in through the account information, and data information can be downloaded, edited and uploaded on the personal account. When the network status is the network connection status, the user logs in to the account information through the normal data exchange between the client and the server to enter the user's own personal account, and downloads, edits and uploads data information in the personal account.
[0157] In the above embodiment, when the network status is a network disconnected state, the user cannot log in to the account information normally through the data interaction between the client and the server. Therefore, it is necessary to obtain the second correspondence between the account information and the interface information when the network status is a network connected state, and store the second correspondence in the local storage interval, so that when the network status is a network disconnected state, the client can retrieve the interface information corresponding to the account information in the local storage interval according to the second correspondence when the network status is a network disconnected state. In this way, the user can select the interface information corresponding to the account information when there is no network, thereby avoiding the user from processing erroneous data information, thereby improving the efficiency of data processing.
[0158] In any of the above embodiments, the data processing device is further specifically used to: receive a login instruction, and log in the account information according to the login instruction; and retrieve and display the interface information corresponding to the account information in the local storage interval according to the second corresponding relationship.
[0159] In the above embodiment, when the network status is a network disconnected state, the client receives a login instruction from the user, the login instruction includes account information, and logs in to the account information according to the login instruction. At this time, the client retrieves the interface information corresponding to the account information in the local storage interval according to the pre-acquired second corresponding relationship.
[0160] In any of the above embodiments, the second corresponding relationship may be, for example, that the account information C corresponds to the retrieval and display of the interface information C, and the interface information C may include the user's personal information, as well as buttons for downloading, editing, and uploading data information, and then when the user wants to download the data information C, the client may retrieve the data information C and the interface information C for displaying the data information C from the local storage interval. , , that is, interface information C and data information C and data information C and interface information C ,The corresponding relationship between them is the first corresponding relationship, and then the user can edit the retrieved data information, and store the edited data information in the local storage interval when the network is not connected. After waiting for the network status to change to the network connection status, the client automatically uploads the edited data information stored in the local storage interval to the server.
[0161] like Fig.10 As shown, the third aspect of the present invention provides a data processing device 1000, including: a memory 1002, in which programs or instructions are stored; a processor 1004, which executes the programs or instructions stored in the memory to implement the steps of the data processing method proposed in the above embodiments of the present application, and thus has all the beneficial technical effects of the data processing method proposed in the above embodiments of the present application, which will not be elaborated herein.
[0162] A fourth aspect of the present invention provides a readable storage medium having a program or instruction stored thereon. When the program or instruction is executed by a processor, the steps of the data processing method in any of the above embodiments are implemented.
[0163] The readable storage medium provided by the present invention stores a program or instruction thereon, and when the program or instruction is executed by a processor, the steps of the data processing method in any of the above embodiments can be implemented. Therefore, the readable storage medium proposed by the present invention has all the beneficial effects of the data processing method in any of the above embodiments, which will not be described in detail here.
[0164] A fifth aspect of the present invention provides an electronic device, comprising: a data processing device in any of the above embodiments; and / or a readable storage medium in the above embodiments.
[0165] The electronic device provided by the present invention includes the data processing device in any of the above embodiments. Therefore, it has all the beneficial effects of the data processing device in any of the above embodiments, which will not be described in detail here.
[0166] In any of the above embodiments, the electronic device provided by the present invention may further include the readable storage medium defined in the above embodiments. Therefore, the electronic device provided by the present invention has all the beneficial effects of the readable storage medium defined in the above embodiments, which will not be described in detail here.
[0167] In the description of this specification, the description of the terms "one embodiment", "some embodiments", "specific embodiments", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0168] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A data processing method, characterized in that: The data processing method is used on the client, and the data processing method includes: Detect the network status between the server; When the network state is a network connection state, acquiring and displaying interface information and data information from a server, and storing the interface information and the data information in a local storage area; When the network state is a network disconnected state, calling and displaying the interface information and the data information stored in the local storage interval, and storing the edited data information in the local storage interval; When the network state changes from the network unconnected state to the network connected state, uploading the edited data information to the server; The network disconnection state includes one of the following: disconnected network state, poor network state, server crash state; After detecting the network status between the server and the server, the processing method further includes: When it is determined that the network state is the network connection state, obtaining a second correspondence between the account information and the interface information, and storing the second correspondence in the local storage interval; When the network state is the network disconnected state, calling and displaying the interface information in the local storage interval according to the second corresponding relationship; When the network state is the network disconnected state, calling and displaying the interface information in the local storage interval according to the second corresponding relationship specifically includes: receiving a login instruction, and logging in the account information according to the login instruction; Retrieving and displaying the interface information corresponding to the account information in the local storage interval according to the second corresponding relationship; Among them, the second corresponding relationship is the interface information retrieved and displayed corresponding to the account information, and the interface information includes the user's personal information.
2. The data processing method according to claim 1, characterized in that: The uploading of the edited data information to the server specifically includes: When the edited data information is stored in the local storage section, the edited data information is uploaded to the server.
3. The data processing method according to claim 1, characterized in that: The processing method also includes: When it is determined that the network state is a network connection state, a first corresponding relationship between the interface information and the data information; The first corresponding relationship is stored in the local storage interval.
4. The data processing method according to claim 3, characterized in that: The retrieving and displaying the interface information and the data information stored in the local storage area specifically includes: The interface information stored in the storage interval and the data information corresponding to the data information are retrieved according to the first corresponding relationship, and the retrieved interface information and the data information are displayed according to the first corresponding relationship.
5. A data processing device, characterized in that: The data processing device is used in the client, and the data processing device includes: A detection module, used to detect the network status between the server and the server; A first processing module, configured to obtain and display interface information and data information from a server when the network state is a network connection state, and store the interface information and the data information in a local storage interval; A second processing module is used for retrieving and displaying the interface information and the data information stored in the storage interval when the network status is a network disconnected state, and storing the edited data information in the local storage interval; A third processing module, configured to upload the edited data information to the server when the network state changes from the network unconnected state to the network connected state; The processing device is further configured to: when determining that the network state is the network connection state, obtain a second correspondence between the account information and the interface information, and store the second correspondence in the local storage interval; when the network state is the network disconnection state, retrieve and display the interface information in the local storage interval according to the second correspondence; The processing device is further configured to: log in the account information according to a log-in instruction; retrieve and display the interface information corresponding to the account information in the local storage interval according to the second corresponding relationship; Among them, the network disconnection state includes one of the following: disconnected state, poor network state, server crash state; the second corresponding relationship is the interface information retrieved and displayed corresponding to the account information, and the interface information includes the user's personal information.
6. A data processing device, characterized in that: include: A memory and a processor, wherein the memory stores a program, and when the processor executes the program, the steps of the data processing method according to any one of claims 1 to 4 are implemented.
7. A readable storage medium having a program or instruction stored thereon, characterized in that: When the program or instruction is executed by a processor, the steps of the data processing method according to any one of claims 1 to 4 are implemented.
8. An electronic device, characterized in that: include: The data processing device according to claim 5 or 6; and / or The readable storage medium as claimed in claim 7.
Citation Information
Patent Citations
Ship data processing method and system
CN108234626A
A data processing method and a data processing device
CN109471990A