CN118295735A - Version number-based data loading method, device, server and system - Google Patents

Version number-based data loading method, device, server and system Download PDF

Info

Publication number
CN118295735A
CN118295735A CN202410504607.7A CN202410504607A CN118295735A CN 118295735 A CN118295735 A CN 118295735A CN 202410504607 A CN202410504607 A CN 202410504607A CN 118295735 A CN118295735 A CN 118295735A
Authority
CN
China
Prior art keywords
data
version
data item
version number
item
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410504607.7A
Other languages
Chinese (zh)
Inventor
汪宏斌
吴玮
刘国强
朱志忠
廖峰
冯江平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Zhonghui Yida Financial Information Technology Co ltd
Original Assignee
Shanghai Zhonghui Yida Financial Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Zhonghui Yida Financial Information Technology Co ltd filed Critical Shanghai Zhonghui Yida Financial Information Technology Co ltd
Priority to CN202410504607.7A priority Critical patent/CN118295735A/en
Publication of CN118295735A publication Critical patent/CN118295735A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a version number-based data loading method, a version number-based data loading device, a version number-based data loading server and a version number-based data loading system, and relates to the technical field of computer systems. The method comprises the steps of: after the user logs in successfully, the server returns the latest version number information of all basic data of the software to the software client; the software client receives the latest version number information and then compares the latest version number information with the local version number to obtain version number change information of each data item in the basic data; checking version data of each data item based on version number change information of each data item and loading data; when the version number of one data item is changed, the server side obtains the affected user information according to the version type of the data item and then notifies the affected user. The invention takes account of the login efficiency and the operation efficiency of the software system and ensures the correctness of the basic data used in the software operation.

Description

Version number-based data loading method, device, server and system
Technical Field
The present invention relates to the field of computer systems, and in particular, to a version number-based data loading method, device, server, and system.
Background
Software (software) is a collection of computer data and instructions organized in a particular order, which may include programs, data, documents, and the like. With the development of computer technology, software is more and more complex, and functions to be realized by the software are more and more. To implement some functions, some software products may need to implement more complex and huge computing functions, and these operations often depend on various basic data, such as, for example, operations in foreign exchange transaction software, which typically depend on basic data such as currency pairs, currencies, bonds, deadlines, countries, holidays, day of rest, and bond (Margin).
In order to improve timeliness of operational response after a software product is logged in and reduce pressure of a database at a server side, various transaction software systems (including but not limited to foreign exchange transaction software) on the market can synchronize various basic data configured in a server side (usually a cloud server) to a software local (such as a software memory) after a user is logged in successfully so as to load the basic data. At present, the data loading modes adopted during software login can be summarized into two modes: one is a real-time access mode, and the other is a login full-load mode.
The real-time taking mode is that basic data is not loaded when a user logs in, and when the user needs to use the basic data to operate in the later period (the user sends a responsive operation request), the basic data related to the operation is requested to a server in real time; the method has the advantage of high boarding efficiency, and the user can flash into the system after logging in successfully. However, the real-time access method has a problem of low operation efficiency, because the real-time access method only requests the needed basic data during operation, and needs to wait for the response of the server and return the result, which can certainly reduce the calculation efficiency, and particularly, various blocking phenomena are easy to occur under the condition of poor network communication, so that the user experience is affected.
The login full loading mode is to load all basic data in full when the user login is successful. The method has the advantage of high operation efficiency, because the basic data is already loaded in the software local when logging in, and only the data is read from the software local (such as a software memory) when later software is calculated, the request is not required to be sent to the server side and the response is waited. However, the login full-loading mode has a problem of low login efficiency, because the mode needs to load all basic data after successful login, which affects the efficiency of entering the system and also occupies a large bandwidth. Meanwhile, if the basic data of the server is updated in the later period (the initiative of data updating is at the server), the client which has logged in and completed the full loading of the basic data cannot acquire the latest data in time, so that the basic data used in the later operation of the software may not be the latest data, and the operation result is inconsistent with the actual situation. If the user wants to acquire the latest data, the user can only log in again after logging out of the system, and then load all basic data again after logging in successfully, so that occupation and waste are caused to the system bandwidth, and user experience is reduced.
In summary, how to combine the login efficiency and the operation efficiency and ensure the correctness of the basic data used in the software operation is a technical problem that needs to be solved currently.
Disclosure of Invention
The invention aims at: the defect of the prior art is overcome, and a version number-based data loading method, device, server and system are provided. The invention provides a scheme for judging whether one or more data items in basic data are to be loaded or not based on a version number, on one hand, software can be quickly accessed and the operation efficiency of the software can be guaranteed, and on the other hand, under the condition that the data items of the basic data are changed, the client of an online user can timely acquire and use the latest data content. The invention has the advantages of considering the login efficiency and the operation efficiency of the software system, obviously reducing the quantity of the basic data loaded during the software login, guaranteeing the operation efficiency, realizing the real-time update of the basic data change according to the version type information of the data item, improving the consistency, the reliability and the integrity of the basic data used during the software operation and ensuring the correctness of the basic data used during the software operation.
In order to achieve the above object, the present invention provides the following technical solutions:
A data loading method based on version numbers comprises the following steps:
collecting operation information of a user logging in software through a software client;
After successful login, the server returns the latest version number information of all basic data of the software to the software client;
after receiving the latest version number information returned by the server, the software client compares the latest version number information with the local version number of the basic data finally maintained in the local terminal to obtain version number change information of each data item in the basic data;
Checking version data of each data item based on version number change information of each data item and loading data; version type information is configured corresponding to each data item in the basic data, the version types of the data are different, and the scope of the user group affected by the data after the data are changed is different; when the version number of a data item is changed, the server side obtains the user information influenced by the change of the data item according to the version type of the data item, generates a data update notification of the data item and sends the data update notification to the client side of the influenced user.
Further, the version types at least comprise a personal user level type, a character user level type and a system user level type; when the data item belongs to the personal user level type, the user group range influenced by the changed data is the user himself; when the data item belongs to the role user level type, the affected user group range after the data is changed is all users under the corresponding role; when the data item belongs to the user level type of the system, the user group range influenced by the changed data is all users in the system;
at this time, the server is configured to: monitoring basic data in a server, and when the version number of a data item in the basic data is changed, acquiring version type information of the data item so as to judge which type the data item belongs to; when the data item is judged to belong to the personal user level type, a data update notification for the data item is sent to a client of the corresponding personal user; when the data item is judged to belong to the user level type of the role, after all user information in the role is acquired, a data update notification aiming at the data item is sent to the client side of the user information; when the data item is judged to belong to the user level type of the system, all user information in the system is acquired, and then a data update notification for the data item is sent to the client side of the user information.
Further, the server side sends a data update notification of the data item to the client side of the affected user through a websocket protocol, wherein the data update notification of the data item comprises the latest version number information of the data item.
Further, the server is configured to: monitoring login information of a client of an affected user to judge whether the affected user is online currently; when the affected user is judged to be an online user, acquiring the data item information which can affect the user at present and is subjected to version number change, and then sending a corresponding data update notification to a client of the online user in real time;
after receiving the data update notification, the client of the online user sends a pull request of related version data to the server according to the latest version number of the data item; and loading data according to the latest version data content of the data item returned by the server side, and updating the local version number of the data item.
Further, when version data of each data item is checked based on version number change information of each data item and data is loaded, local data is continuously used for the data item with unchanged version number, and the data of the data item is not required to be loaded;
For the data item with any version number changed, the following steps are executed:
s411, judging whether the data of the data item is stored locally; if it is determined that the data of the data item is not stored locally, step S412 is executed, otherwise step S413 is executed;
s412, after the data content of the data item is fully pulled from the server, the data content of the data item is persisted locally, and the local version number of the data item is updated;
S413, according to the change information of the version number, acquiring a first version data packet corresponding to the local version number from the server through the local version number, comparing the first version data packet with a second version data packet corresponding to the latest version number to obtain differentiated data of the two version data packets, analyzing the type of the differentiated data, and adopting different data loading strategies according to the type of the differentiated data to load the data.
Further, the types of the differential data comprise newly added class data, modified class data and deleted class data, wherein the newly added class data is data which is not in an old version but exists in a new version, the modified class data is data which is not in the old version but has changed data values, and the deleted class data is data which is not in the old version but exists in the new version;
the first data loading strategy is configured corresponding to the newly added class data, and the first data loading strategy is as follows: comparing the new version data with the old version data, obtaining the added data content in the new version, persisting the added data content locally, and updating the local version number of the data item to which the data content belongs;
The corresponding modified class data is configured with a second data loading policy as follows: comparing the new version data with the old version data, after acquiring the data value and sending the changed data content, locally updating the data value corresponding to the data content, and updating the local version number of the data item to which the data content belongs;
the corresponding deletion class data is configured with a third data loading policy as follows: and comparing the new version data with the old version data, deleting the data content from the local after the deleted data content in the new version is acquired, and updating the local version number of the data item to which the data content belongs.
Further, a data persistence module is arranged in the server to persistence the data content of the data item in a local database IndexedDB and a software memory of the local terminal according to a preset data structure; in the data structure, configuring the name of the data item, the version type of the data item and the structure attribute information corresponding to the version type, wherein the structure attribute information comprises the data form, the data url address, the version number versionId and the version type versionType of the data item;
The data persistence module is configured to: acquiring the data content of a data item needing localization, and carrying out structuring treatment on the data content according to the version type of the data item and the corresponding structure attribute information; the structuring process comprises: after the data content is stored locally in a preset data form, the data url address of the data item is recorded for later request of the data item, the local version number of the data item in the software client is updated through a version number sequencing module, and the version type of the data item is recorded.
The invention also provides a data loading device based on the version number, which is applied to the client, and comprises:
the login request module is used for sending an operation request of logging in software to the server;
The basic data processing module is used for receiving the latest version number information of all basic data of the software returned by the server after successful login; comparing the latest version number information returned by the server with the local version number of the basic data finally maintained in the local terminal to obtain version number change information of each data item in the basic data; selecting a corresponding data loading strategy according to version change information of each data item;
The online updating module is used for receiving the data updating notification of the data item sent by the server side in an online state and sending a pulling request of related data to the server side according to the latest version number of the data item;
Version type information is configured corresponding to each data item in the basic data, the version types of the data are different, and the scope of the user group affected by the data after the data are changed is different; when the version number of a data item is changed, the server side obtains the user information influenced by the change of the data item according to the version type of the data item, generates a data update notification of the data item and sends the data update notification to the client side of the influenced user.
The present invention also provides a server configured to:
Receiving a login request of a software client, and returning the latest version number information of all basic data of the software to the software client after the software client is successfully logged in; receiving version number change information of each data item in the basic data sent by the software client, checking version data of each data item based on the version number change information of each data item, and returning the version data to the software client for loading data by the software client; and
Version type information is configured for each data item in the basic data, the version types of the data are different, and the scope of the user group affected by the data after the data change is different; when the version number of a data item is changed, user information influenced by the change of the data item is obtained according to the version type of the data item, and then a data update notification of the data item is generated and sent to a client of the influenced user.
The invention also provides a data processing system, which comprises a server and a client;
The client is used for enabling a user to log in the software, receiving latest version number information returned by the server and comparing the latest version number information with a local version number of the basic data finally maintained in the local terminal to obtain version number change information of each data item in the basic data; loading basic data required by software operation on a local terminal;
The server is used for receiving a login request of the client and returning the latest version number information of all basic data of the software to the client after the client is successfully logged in; checking version data of each data item based on the version number change information of each data item and returning the version data to the client; and
Version type information is configured for each data item in the basic data, the version types of the data are different, and the scope of the user group affected by the data after the data change is different; when the version number of a data item is changed, user information influenced by the change of the data item is obtained according to the version type of the data item, and then a data update notification of the data item is generated and sent to a client of the influenced user.
Compared with the prior art, the invention has the following advantages and positive effects by taking the technical scheme as an example: the scheme for judging whether one or more data items in the basic data are to be loaded or not based on the version number is provided, on one hand, software can be quickly accessed and software operation efficiency is guaranteed, and on the other hand, under the condition that the data items of the basic data are changed, the client of the online user can timely acquire and use the latest data content. The invention has the advantages of considering the login efficiency and the operation efficiency of the software system, obviously reducing the quantity of the basic data loaded during the software login, guaranteeing the operation efficiency, realizing the real-time update of the basic data change according to the version type information of the data item, improving the consistency, the reliability and the integrity of the basic data used during the software operation and ensuring the correctness of the basic data used during the software operation.
Drawings
Fig. 1 is a flowchart of a version number-based data loading method according to an embodiment of the present invention.
Fig. 2 is a diagram of an example configuration of a data version type according to an embodiment of the present invention.
Fig. 3 is a logic structure diagram of loading basic data based on version numbers after a user logs in software according to an embodiment of the present invention.
FIG. 4 is a logic structure diagram of notifying and updating data in real time when a data item is changed according to an embodiment of the present invention.
FIG. 5 is an exemplary diagram of a persistent basic data structure provided by an embodiment of the present invention.
Detailed Description
The method, the device, the server and the system for loading the data based on the version number disclosed by the invention are further described in detail below with reference to the accompanying drawings and the specific embodiments. It is noted that techniques (including methods and apparatus) known to those of ordinary skill in the relevant art may not be discussed in detail, but are considered to be part of the specification where appropriate. Meanwhile, other examples of the exemplary embodiment may have different values. The structures, proportions, sizes, etc. shown in the drawings are shown only in connection with the present disclosure for purposes of understanding and reading by those skilled in the art and are not intended to limit the scope of the invention.
In the description of the embodiment of the present application, "/" means "and/or" is used to describe the association relationship of the association object, which means that three relationships may exist, for example, "a and/or b" means: there are three cases of A and B separately. In the description of the embodiments of the present application, "plurality" means two or more.
Hereinafter, the technical concept and the scheme of the present invention will be described according to an exemplary application scenario.
The explanation of the related art terms is as follows:
1) A client (client) is a party initiating a service request (a requesting party for a service) in network communication, and may be a software program running on a terminal device (i.e. a user terminal), which provides a local service of software for a user towards the user.
2) A server (server) is a computer or server (a responder of a service) that provides a service in network communication, receives a request from a client, and provides a corresponding service according to the request. The main functions of the server are to receive requests, respond and process the requests, execute business processing logic, return results, etc.
3) User terminal: a device having processing and computing capabilities may include, but is not limited to, mobile terminals such as smartphones, notebook computers, personal Digital Assistants (PDAs), tablet computers (PADs), wearable devices, etc., as well as stationary electronic devices such as desktop computers, smart home devices, etc.
4) Basic data: the basic data required for supporting the normal operation of the software product can be specifically various basic information (including parameters, forms, configuration documents and the like) relied on by a business exchange. When the software product is developed, a developer can configure the definition, type and scope of the basic data according to the requirement. Taking the foreign exchange transaction software as an example, data items such as currency pairs, currencies, bonds, deadlines, countries, holidays, day of rest, and bond (Margin) on which transaction operations depend all belong to the basic data of the foreign exchange transaction software.
Corresponding to the basic data is non-basic data, meaning other data than basic data in the software product. By way of example, such as user behavior data, user rating data, etc., in some transaction software, which typically pertains to non-underlying data.
5) Version number is a common design scheme of data version, the version number of the data is generally configured through a version number field, and besides the version number can keep historical data, one function is to avoid concurrent editing operation. Each data operation can be regarded as creating a new version, the version number is only increased or not decreased, and in general, only the largest version number (the latest version number) is needed to be obtained to obtain the latest service data.
Examples
Referring to fig. 1, the method for loading data based on version numbers provided by the invention comprises the following steps.
S100, collecting operation information of a user logging in the software through the software client.
And S200, after successful login, the server returns the latest version number information of all basic data of the software to the software client.
And S300, after receiving the latest version number information returned by the server, the software client compares the latest version number information with the local version number of the basic data finally maintained in the local terminal to obtain version number change information of each data item in the basic data.
S400, checking version data of each data item based on the version number change information of each data item and loading the data.
In this embodiment, a user interacts with a server through a software client installed on a user terminal, and the main function of the client is to send a request to the server and receive a result returned by the server; the server side stores various data information of software, including basic data and non-basic data. The software client may also have user interface, data processing, resource management and offline working capabilities (offline support, even if there is no network connection, to perform part of the functionality). The user terminal can respond to the operation of the user on any interface of the software client, send application data to the computer equipment of the server, the application data can be understood as data sent or requested by the software to the computer equipment, and the application data can also comprise equipment identification of the user terminal, identification information of the software client and the like. The server may also have functions of accessing a database, performing computing tasks, communicating with other servers, and storing and managing data, as needed.
In this embodiment, considering that the user range affected by the data change of different data items is different, version type information is configured for the base data, the version types to which the data items belong are different, and the user population affected by the data change is also different. At this time, when the version number of a certain data item is changed, the server obtains the user information affected by the change of the data item according to the version type of the data item, and generates a data update notification of the data item and sends the data update notification to the client of the affected user.
Referring to fig. 2, the version types include at least a personal user level type (INDIVIDUAL), a character user level type (row), and a SYSTEM user level type (SYSTEM) as a preference of a typical manner.
When the data item belongs to the personal user level type, the user group range influenced by the changed data is the user.
When the data item belongs to the role user level type, the affected user group range after the data is changed is all users under the corresponding role. That is, after the data of the data item at the character user level is changed, all users under the character are affected.
When the data item belongs to the user level type of the system, the user group range influenced by the changed data is all users in the system.
At this time, the server is configured to: monitoring basic data in a server, and when the version number of a data item in the basic data is changed, acquiring version type information of the data item so as to judge which type the data item belongs to; when the data item is judged to belong to the personal user level type, a data update notification for the data item is sent to a client of the corresponding personal user; when the data item is judged to belong to the user level type of the role, after all user information in the role is acquired, a data update notification aiming at the data item is sent to the client side of the user information; when the data item is judged to belong to the user level type of the system, all user information in the system is acquired, and then a data update notification for the data item is sent to the client side of the user information.
The individual user level type of data item is typically user-personally managed underlying data, such as user-personally-owned point of assurance (Margin) data items. When the data of a user's deposit (Margin) data item is changed, the version number of the data item is increased by 1; when the server monitors that the version number of the user's deposit (Margin) data item is increased by 1, a data update notification for the deposit data item is sent to the client of the user.
Roles in a software system are usually preconfigured in software, and different roles correspond to different management data (mainly various user authority management data, and the user authority is determined by the roles). The data items of the character user level type are basic data of management of each character, such as a convenient menu of character management, user authority data and the like. When a convenient menu and/or user authority data managed by a character are changed, the version number of a data item corresponding to the character is increased by 1; when the server monitors that the version number of the data item of the role is increased by 1, after all user information under the role is acquired, a data update notification for the data item is sent to clients of the users.
The data items of the user level type of the system are basic data which can affect all users in the system, and can comprise holidays, information days, various source data carried by software and other various system data, and when the holidays, the information days and/or the source data carried by the software are changed, the version number of the corresponding data item is increased by 1. For example, holidays are usually updated only several times a year, and the version number of the corresponding data item is increased by 1 when the update occurs; the version number of the day of the information is configured as the current date, and the version number of the data item corresponding to the day of the information is updated once every day; when the software version is updated, the source data of the software is changed, and the version number of the data item corresponding to the source data is increased by 1. And when the server monitors that the version numbers of the data items are increased by 1, sending data update notification aiming at the corresponding data items to clients of all users in the system.
The difference in the data update frequency of different data items in the base data is considered. Preferably, the data items are divided into low frequency data items, medium frequency data items and high frequency data items according to version update frequency of the data in the data items. The low frequency data item refers to a data item with a low value, the version update frequency of which is smaller than a preset frequency range, the medium frequency data item refers to a data item with a version update frequency of which is in the preset frequency range, and the high frequency data item refers to a data item with a high value, the version update frequency of which is higher than the preset frequency range. The preset frequency range can be set by default of the system or personalized by a user.
And aiming at the low-frequency data item, the medium-frequency data item and the high-frequency data item, the server side is configured with different data monitoring periods, the data monitoring operation for the data item is started every other data monitoring period so as to monitor whether the data content of the data item is updated, and if the data content is updated, a data updating notification is sent for the data item. In this embodiment, the data monitoring period configuration of the intermediate frequency data item is shorter than that of the low frequency data item; compared with the medium frequency data item, the data monitoring period of the high frequency data item is configured to be shorter (namely, the data monitoring operation is started more frequently), so that the occupation of the data version monitoring on the server resource is reduced while the latest basic data can be timely used by the software.
In this embodiment, in step S400, version data of each data item in the base data is checked according to version number change information of each data item, and then the data is loaded. Specifically, referring to fig. 3, for a data item whose version number is unchanged, local data is continuously used, that is, data of the data item does not need to be loaded; while for data items whose version numbers have changed, different data loading schemes need to be performed according to the local data.
Preferably, for the data item of which any version number is changed, the following steps may be performed: s411, judging whether the data of the data item is stored locally; if it is determined that the data of the data item is not stored locally, step S412 is executed, otherwise step S413 is executed.
And S412, after the data content of the data item is fully pulled from the server, the data content of the data item is locally persisted, and the local version number of the data item is updated.
S413, according to the change information of the version number, acquiring a first version data packet corresponding to the local version number from the server through the local version number, comparing the first version data packet with a second version data packet corresponding to the latest version number to obtain differentiated data of the two version data packets, analyzing the type of the differentiated data, and adopting different data loading strategies according to the type of the differentiated data to load the data.
The types of the differential data can specifically include newly added class data, modified class data and deleted class data.
The new added type data is data which is not in the old version but exists in the new version, at this time, the new data needs to be stored in the software local, and key value pairs are newly added in corresponding data files (such as a data table).
The modified class data is data with data values changed in both new and old versions, that is, key value pairs exist, but the values of the key value pairs are changed, and keys are unchanged, so that the values of the key value pairs of the corresponding data files in the software local need to be modified.
The deletion type data is data which is in the old version but not in the new version, and at the moment, the data needs to be deleted from the software local, namely, key value pairs in the corresponding data document are deleted.
In this embodiment, different data loading strategies are adopted to load data according to different types of differentiated data.
In specific implementation, a first data loading strategy is configured corresponding to the newly added class data, and the method comprises the following steps: and comparing the new version data with the old version data, acquiring the added data content in the new version, persisting the added data content locally, and updating the local version number of the data item to which the data content belongs.
The corresponding modified class data is configured with a second data loading policy as follows: and comparing the data of the new version and the old version, acquiring the data value, sending the changed data content, and then locally updating the data value corresponding to the data content and the local version number of the data item to which the data content belongs.
The corresponding deletion class data is configured with a third data loading policy as follows: and comparing the new version data with the old version data, deleting the data content from the local after the deleted data content in the new version is acquired, and updating the local version number of the data item to which the data content belongs.
In this embodiment, as shown in fig. 4, the server may specifically send a data update notification of a data item to a client of an affected user through a websocket protocol, where the data update notification of the data item at least includes information of a latest version number of the data item.
Preferably, the server is further configured to: monitoring login information of a client of an affected user to judge whether the affected user is online currently; when the affected user is judged to be an online user, the data item information which can affect the user at present and is subjected to version number change is obtained, and then the corresponding data update notification is sent to the client of the online user in real time.
And after receiving the data update notification, the client of the online user sends a pull request of the related version data to the server according to the latest version number of the data item contained in the data update notification. And loading data according to the latest version data content of the data item returned by the server side, and updating the local version number of the data item.
In another embodiment, the data update notification of the data item may further directly include the latest version data of the data item, that is, the server may match the affected online users according to the version type of the data item with the changed version number, and then push the latest version number and the corresponding latest data to the software client logged in by the affected user in real time, so that the client may directly obtain the latest data of the data item through the data update notification without requesting the server for the relevant version data.
At this time, if the online user logs out of the system and logs in again, after the login is successful, the server side returns the latest version numbers of all the basic data, the client side compares the returned latest version numbers with the local version numbers, and the client side loads and synchronizes the latest data in real time before the client side and updates the version numbers of the data items, so that the version numbers of the two versions are necessarily consistent at this time, the client side does not need to pull data in full or in an increment, the speed of logging in the system is accelerated, and software can also use the latest basic data to operate timely.
In this embodiment, a data persistence module is further disposed in the server. The data persistence module is configured to persistence data contents of the data item in a local database IndexedDB and a software memory of the local terminal according to a preset data structure, that is, persistence data is local to the software.
Preferably, in the data structure, a name of the data item, a version type to which the data item belongs, and structure attribute information corresponding to the version type are configured, where the structure attribute information includes a data format date, a data url address, a version number versionId, and a version type versionType of the data item.
The data persistence module is configured to: acquiring the data content of a data item needing localization, and carrying out structuring treatment on the data content according to the version type of the data item and the corresponding structure attribute information; the structuring process comprises: after the data content is stored locally in a preset data form, the data url address of the data item is recorded for later request of the data item, the local version number of the data item in the software client is updated through a version number sequencing module, and the version type of the data item is recorded.
By way of example and not limitation, referring to fig. 5, after a user logs into a software client, for example, checked version number changed data items are Holidays (holiday), valueDates (day) and FuncPermission (function authority) data items, and the data of these data items need to be persisted locally to the software. And according to the version types of the data items, namely the SYSTEM user level type SYSTEM, the SYSTEM user level type SYSTEM and the ROLE user level type ROLE, carrying out structuring processing on the data content of each data item according to the corresponding structure attribute information, and storing the data content in a corresponding data table.
By way of example, structural attribute values such as Holidays (holiday) data items are as follows: the data form is { [ ], [ (]),.. the url address of the request data is/sts-service/queryHolidays, version number versionId =108, version type versionType =system of this data item in software.
ValueDates (day of rest) data items, for example, the following: the data form is { [ ], [ (]),.. the url address of the request data is/sts-service/queryValueDates, version number versionId = 20240201, version type versionType =system of this data item in software.
FuncPermission (functional rights) data items, for example, the following: the data form is { [ ], [ (]),.. the url address of the request data is/sts-service/queryFuncPermissionofUser, version number versionId =78, version type versionType =row of this data item in software.
According to the technical scheme provided by the invention, basic data are determined not to be loaded according to the version number during login; meanwhile, the data is persisted to the client of the affected user in real time when updated, so that the software can use the latest data in time, and the data does not need to be loaded again when logging in next time, and the data can be flashed into the system in a scene without basic data update, and the use of bandwidth is saved.
The invention also provides a data loading device based on the version number, which is applied to the client. The device comprises a login request module, a basic data processing module and an online updating module.
The login request module is used for sending an operation request of logging in the software to the server.
The basic data processing module is used for receiving the latest version number information of all basic data of the software returned by the server after successful login; comparing the latest version number information returned by the server with the local version number of the basic data finally maintained in the local terminal to obtain version number change information of each data item in the basic data; and selecting a corresponding data loading strategy according to the version change information of each data item.
The online updating module is used for receiving the data updating notification of the data item sent by the server under the online state and sending a pulling request of the related data to the server according to the latest version number of the data item.
Version type information is configured corresponding to each data item in the basic data, the version types of the data are different, and the scope of the user group affected by the data after the data are changed is different; when the version number of a data item is changed, the server side obtains the user information influenced by the change of the data item according to the version type of the data item, generates a data update notification of the data item and sends the data update notification to the client side of the influenced user.
Other technical features are described in the previous embodiments and are not described in detail here.
The invention further provides a server.
The server is configured to: receiving a login request of a software client, and returning the latest version number information of all basic data of the software to the software client after the software client is successfully logged in; receiving version number change information of each data item in the basic data sent by the software client, checking version data of each data item based on the version number change information of each data item, and returning the version data to the software client for loading data by the software client; the version type information is configured for each data item in the basic data, the version types of the data are different, and the scope of the user group affected by the data after the data change is different; when the version number of a data item is changed, user information influenced by the change of the data item is obtained according to the version type of the data item, and then a data update notification of the data item is generated and sent to a client of the influenced user.
Other technical features are described in the previous embodiments and are not described in detail here.
In another embodiment of the present invention, a data processing system is also provided. The system comprises a server and a client.
The client is used for logging in the software by a user, receiving the latest version number information returned by the server and comparing the latest version number information with the local version number of the basic data finally maintained in the local terminal to obtain version number change information of each data item in the basic data; and loading basic data required by software operation at the local terminal.
The server is used for receiving a login request of the software client, and returning the latest version number information of all basic data of the software to the software client after the software client is successfully logged in; checking version data of each data item based on the version number change information of each data item and returning the version data to the software client; the version type information is configured for each data item in the basic data, the version types of the data are different, and the scope of the user group affected by the data after the data change is different; when the version number of a data item is changed, user information influenced by the change of the data item is obtained according to the version type of the data item, and then a data update notification of the data item is generated and sent to a client of the influenced user.
Other technical features are described in the previous embodiments and are not described in detail here.
The invention also provides a computer readable storage medium storing a computer program executable by a processing unit, which computer program, when executed by the processing unit, implements a method as described above.
The storage medium may include a U-disk, a removable hard disk, a Read Only Memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, etc. various media capable of storing program codes.
Other technical features are described in the previous embodiments and are not described in detail here.
In the above description, the disclosure of the present invention is not intended to limit itself to these aspects. Rather, the components may be selectively and operatively combined in any number within the scope of the present disclosure. In addition, terms like "comprising," "including," and "having" should be construed by default as inclusive or open-ended, rather than exclusive or closed-ended, unless expressly defined to the contrary. All technical, scientific, or other terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. Common terms found in dictionaries should not be too idealized or too unrealistically interpreted in the context of the relevant technical document unless the present disclosure explicitly defines them as such. Any alterations and modifications of the present invention, which are made by those of ordinary skill in the art based on the above disclosure, are intended to be within the scope of the appended claims.

Claims (10)

1. The data loading method based on the version number is characterized by comprising the following steps:
collecting operation information of a user logging in software through a software client;
After successful login, the server returns the latest version number information of all basic data of the software to the software client;
after receiving the latest version number information returned by the server, the software client compares the latest version number information with the local version number of the basic data finally maintained in the local terminal to obtain version number change information of each data item in the basic data;
Checking version data of each data item based on version number change information of each data item and loading data; version type information is configured corresponding to each data item in the basic data, the version types of the data are different, and the scope of the user group affected by the data after the data are changed is different; when the version number of a data item is changed, the server side obtains the user information influenced by the change of the data item according to the version type of the data item, generates a data update notification of the data item and sends the data update notification to the client side of the influenced user.
2. The method according to claim 1, characterized in that: the version types at least comprise a personal user level type, a role user level type and a system user level type; when the data item belongs to the personal user level type, the user group range influenced by the changed data is the user himself; when the data item belongs to the role user level type, the affected user group range after the data is changed is all users under the corresponding role; when the data item belongs to the user level type of the system, the user group range influenced by the changed data is all users in the system;
at this time, the server is configured to: monitoring basic data in a server, and when the version number of a data item in the basic data is changed, acquiring version type information of the data item so as to judge which type the data item belongs to; when the data item is judged to belong to the personal user level type, a data update notification for the data item is sent to a client of the corresponding personal user; when the data item is judged to belong to the user level type of the role, after all user information in the role is acquired, a data update notification aiming at the data item is sent to the client side of the user information; when the data item is judged to belong to the user level type of the system, all user information in the system is acquired, and then a data update notification for the data item is sent to the client side of the user information.
3. The method according to claim 2, characterized in that: the server side sends a data update notification of the data item to the client side of the affected user through a websocket protocol, wherein the data update notification of the data item comprises the latest version number information of the data item.
4. The method of claim 3, wherein the server is further configured to: monitoring login information of a client of an affected user to judge whether the affected user is online currently; when the affected user is judged to be an online user, acquiring the data item information which can affect the user at present and is subjected to version number change, and then sending a corresponding data update notification to a client of the online user in real time;
after receiving the data update notification, the client of the online user sends a pull request of related version data to the server according to the latest version number of the data item; and loading data according to the latest version data content of the data item returned by the server side, and updating the local version number of the data item.
5. The method according to any one of claims 1-4, wherein: when version data of each data item is checked and data is loaded based on version number change information of each data item, local data is continuously used for the data item with unchanged version number, and the data of the data item is not required to be loaded;
For the data item with any version number changed, the following steps are executed:
s411, judging whether the data of the data item is stored locally; if it is determined that the data of the data item is not stored locally, step S412 is executed, otherwise step S413 is executed;
s412, after the data content of the data item is fully pulled from the server, the data content of the data item is persisted locally, and the local version number of the data item is updated;
S413, according to the change information of the version number, acquiring a first version data packet corresponding to the local version number from the server through the local version number, comparing the first version data packet with a second version data packet corresponding to the latest version number to obtain differentiated data of the two version data packets, analyzing the type of the differentiated data, and adopting different data loading strategies according to the type of the differentiated data to load the data.
6. The method according to claim 5, wherein: the types of the differential data comprise newly added type data, modified type data and deleted type data, wherein the newly added type data is data which is not in an old version but exists in a new version, the modified type data is data which is not in the old version but has changed data values, and the deleted type data is data which is not in the old version but exists in the new version;
the first data loading strategy is configured corresponding to the newly added class data, and the first data loading strategy is as follows: comparing the new version data with the old version data, obtaining the added data content in the new version, persisting the added data content locally, and updating the local version number of the data item to which the data content belongs;
The corresponding modified class data is configured with a second data loading policy as follows: comparing the new version data with the old version data, after acquiring the data value and sending the changed data content, locally updating the data value corresponding to the data content, and updating the local version number of the data item to which the data content belongs;
the corresponding deletion class data is configured with a third data loading policy as follows: and comparing the new version data with the old version data, deleting the data content from the local after the deleted data content in the new version is acquired, and updating the local version number of the data item to which the data content belongs.
7. The method according to claim 6, wherein: the server is provided with a data persistence module for persistence of the data content of the data item in a local database IndexedDB and a software memory of the local terminal according to a preset data structure; in the data structure, configuring the name of the data item, the version type of the data item and the structure attribute information corresponding to the version type, wherein the structure attribute information comprises the data form, the data url address, the version number versionId and the version type versionType of the data item;
The data persistence module is configured to: acquiring the data content of a data item needing localization, and carrying out structuring treatment on the data content according to the version type of the data item and the corresponding structure attribute information; the structuring process comprises: after the data content is stored locally in a preset data form, the data url address of the data item is recorded for later request of the data item, the local version number of the data item in the software client is updated through a version number sequencing module, and the version type of the data item is recorded.
8. A version number-based data loading apparatus, applied to a client, comprising:
the login request module is used for sending an operation request of logging in software to the server;
The basic data processing module is used for receiving the latest version number information of all basic data of the software returned by the server after successful login; comparing the latest version number information returned by the server with the local version number of the basic data finally maintained in the local terminal to obtain version number change information of each data item in the basic data; selecting a corresponding data loading strategy according to version change information of each data item;
The online updating module is used for receiving the data updating notification of the data item sent by the server side in an online state and sending a pulling request of related data to the server side according to the latest version number of the data item;
Version type information is configured corresponding to each data item in the basic data, the version types of the data are different, and the scope of the user group affected by the data after the data are changed is different; when the version number of a data item is changed, the server side obtains the user information influenced by the change of the data item according to the version type of the data item, generates a data update notification of the data item and sends the data update notification to the client side of the influenced user.
9. A server, characterized by being configured to:
Receiving a login request of a software client, and returning the latest version number information of all basic data of the software to the software client after the software client is successfully logged in; receiving version number change information of each data item in the basic data sent by the software client, checking version data of each data item based on the version number change information of each data item, and returning the version data to the software client for loading data by the software client; and
Version type information is configured for each data item in the basic data, the version types of the data are different, and the scope of the user group affected by the data after the data change is different; when the version number of a data item is changed, user information influenced by the change of the data item is obtained according to the version type of the data item, and then a data update notification of the data item is generated and sent to a client of the influenced user.
10. A data processing system, characterized by: the method comprises a server side and a client side;
The client is used for enabling a user to log in the software, receiving latest version number information returned by the server and comparing the latest version number information with a local version number of the basic data finally maintained in the local terminal to obtain version number change information of each data item in the basic data; loading basic data required by software operation on a local terminal;
The server is used for receiving a login request of the client and returning the latest version number information of all basic data of the software to the client after the client is successfully logged in; checking version data of each data item based on the version number change information of each data item and returning the version data to the client; and
Version type information is configured for each data item in the basic data, the version types of the data are different, and the scope of the user group affected by the data after the data change is different; when the version number of a data item is changed, user information influenced by the change of the data item is obtained according to the version type of the data item, and then a data update notification of the data item is generated and sent to a client of the influenced user.
CN202410504607.7A 2024-04-25 2024-04-25 Version number-based data loading method, device, server and system Pending CN118295735A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410504607.7A CN118295735A (en) 2024-04-25 2024-04-25 Version number-based data loading method, device, server and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410504607.7A CN118295735A (en) 2024-04-25 2024-04-25 Version number-based data loading method, device, server and system

Publications (1)

Publication Number Publication Date
CN118295735A true CN118295735A (en) 2024-07-05

Family

ID=91674445

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410504607.7A Pending CN118295735A (en) 2024-04-25 2024-04-25 Version number-based data loading method, device, server and system

Country Status (1)

Country Link
CN (1) CN118295735A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN120371355A (en) * 2025-06-24 2025-07-25 杭州秋果计划科技有限公司 Hot updating method and equipment for game configuration table data

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN120371355A (en) * 2025-06-24 2025-07-25 杭州秋果计划科技有限公司 Hot updating method and equipment for game configuration table data

Similar Documents

Publication Publication Date Title
US8572023B2 (en) Data services framework workflow processing
US11726961B2 (en) Dynamically updating distributed content objects
CN115344888B (en) Data access methods, devices, electronic devices and storage media
US20190238478A1 (en) Using a template to update a stack of resources
CN103368986A (en) Information recommendation method and information recommendation device
US8930518B2 (en) Processing of write requests in application server clusters
CN110557284A (en) data aggregation method and device based on client gateway
CN110308917A (en) Small program distribution method, device, equipment and computer storage medium
CN112860343B (en) Configuration change method, system, device, electronic device and storage medium
US20250348496A1 (en) Dynamic Query Allocation to Virtual Warehouses
CN118295735A (en) Version number-based data loading method, device, server and system
CN108667660B (en) Method and device for routing management and service routing, and routing system
GB2514459A (en) Method and system for registering software systems in data-sharing sessions
CN110347659B (en) Data processing method and device and transaction data processing method and device
US8453166B2 (en) Data services framework visibility component
US20240089339A1 (en) Caching across multiple cloud environments
CN112433891B (en) Data processing method, device and server
CN117271584A (en) Data processing method and device, computer readable storage medium and electronic equipment
CN116467344A (en) Data processing method, device, device, storage medium and computer program product
CN114185949A (en) Information registration method, information registration apparatus, computer device, storage medium, and program product
US20230247081A1 (en) Declarative rendering of hypertext transfer protocol headers
US20250139083A1 (en) Propagating resource scaling information between source and target data stores of a materialized view
CN111966937A (en) Search response method and device and computer readable storage medium
CN114547512A (en) An information processing method, apparatus, computer equipment and storage medium
US12561291B2 (en) Method of cloud storage file synchronization prioritization for selected users

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination