Business data refreshing and pushing method and its device, equipment and medium

By marking the latest version information of business data on the data server, and regularly querying the version server on the terminal device side, and only updating the data when the version information changes, the problem of resource waste and network overhead when updating web page business data is solved. Efficient business data refresh and better user experience are achieved.

CN112199617BActive Publication Date: 2024-08-23GUANGZHOU HUADUO NETWORK TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011119090.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-19
Publication Date
2024-08-23
Estimated Expiration
2040-10-19

AI Technical Summary

Technical Problem

In the existing technology, when web page business data is updated, the terminal device frequently refreshes the page, resulting in a waste of remote server resources and an increase in network overhead, affecting system service quality.

Method used

Intelligent refresh of business data is achieved by marking the latest version information of business data on the data server, periodically querying the version server on the terminal device side, and only requesting updates from the data server when the version information changes.

Benefits of technology

It reduces the load of the data server and network traffic, improves the system service quality and user interaction experience, and saves the computing resources of the terminal device.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112199617B
    Figure CN112199617B
Patent Text Reader

Abstract

The present application discloses a business data refresh and push method and its device, equipment, and medium. The refresh method includes the following steps: regularly obtaining the latest version information of the business data referenced by the current webpage from the version server; comparing the latest version information with the current version information corresponding to the business data loaded on the current webpage to obtain a comparison result; when the comparison result indicates that the latest version information is inconsistent with the current version information, submitting a refresh request to the data server to obtain the business data corresponding to the latest version information; replacing the business data referenced by the current webpage with the business data of the latest version information, and replacing the current version information with the latest version information. The present application enables the webpage of the terminal device to request business data from the server only when the business data referenced by it changes, saving various computer and network resource expenses on the terminal device side and the server side.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of Internet technology, and specifically relates to a business data refresh method, and its corresponding device, electronic device, and non-volatile storage medium; it also relates to a business data push method, and its corresponding device, electronic device, and non-volatile storage medium. Background Art

[0002] In web programs based on the HTML protocol, some business data presentation modules are often embedded in the web pages. After the business data obtained from the server is processed locally, the business data is presented in the page through such presentation modules, so as to update the corresponding data in the graphical user interface in a timely manner. These business data sometimes need to be continuously obtained from the remote server that provides the business data in order to achieve timely updates. There are many common application scenarios and functions for these business data, for example, stock market data provided to reflect real-time stock market conditions, case data provided to reflect the dynamics of the epidemic, user speech data provided to support web chat, message data provided to support the page to obtain the latest notification messages, barrage data provided to support the barrage of the live broadcast room, payment result data provided for the payment interface to support the interactive process of online payment, etc. Such business data is universal. When the business data is updated, it is stored in the database deployed in the cloud so that the relevant terminal or user can obtain it from the database through the remote server.

[0003] In order to update the business data in time, the terminal device page generally refreshes the page by regularly refreshing the page to request the remote server to push the latest business data. The remote server responds to the request of the terminal device and queries the database to obtain the relevant business data, pushes it to the terminal device, and then the terminal device displays it on the page when parsing the web page. It can be seen that this method of web page business data is simple but crude. The page of the terminal device cannot only be based on the timing rules. Regardless of whether the business data in the cloud database is updated, the page refresh operation will be performed. As a result, the remote server will inevitably be exhausted to cope with various requests and frequently access the database, which not only causes a great waste of server resources, but also occupies network overhead. When there are many concurrent accesses in the current network, it will inevitably affect the overall service quality of the system providing web pages.

[0004] Therefore, with the deepening development of the Internet, how to adapt to the update of business data in web pages and develop new implementation solutions has become a pain point that needs to be urgently solved in the industry. Summary of the invention

[0005] The primary purpose of this application is to provide a business data refresh method, and its corresponding device, electronic device, and non-volatile storage medium.

[0006] Another object of the present application is to provide a business data pushing method, and its corresponding device, electronic device, and non-volatile storage medium.

[0007] In order to meet the various objectives of this application, this application adopts the following technical solutions:

[0008] A business data refreshing method provided for one of the purposes of this application comprises the following steps:

[0009] Regularly obtain the latest version information of the business data referenced by the current web page from the version server;

[0010] Compare the latest version information with the current version information corresponding to the business data loaded on the current webpage to obtain a comparison result;

[0011] When the comparison result indicates that the latest version information is inconsistent with the current version information, a refresh request is submitted to the data server to obtain the business data corresponding to the latest version information;

[0012] The business data referenced by the current webpage is replaced with the business data of the latest version information, and the current version information is replaced with the latest version information.

[0013] In some embodiments, the method further comprises the following steps:

[0014] When the current web page is parsed and loaded by the browser for the first time, the timer is started so that subsequent steps are executed in response to the timing triggering of the timer.

[0015] In some embodiments, the method further comprises the following steps:

[0016] When the current web page is parsed and loaded for the first time by the browser, the business data with the latest version information that needs to be referenced is obtained from the data server, and the latest version information is stored as the local current version information.

[0017] In some embodiments, the method comprises the following steps:

[0018] When the current webpage is accessed by the browser for the first time, a session associated with the current webpage is created between the browser and the data server, and unique characteristic information is associated with the session;

[0019] In the step of periodically obtaining the latest version information of the business data referenced by the current webpage from the version server, submitting the unique characteristic information of the session to the version server to determine the latest version information associated therewith;

[0020] The relationship data between the unique feature information and the latest version information is sent by the data server to the version server after the business data corresponding to the session is updated, resulting in the latest version information being updated.

[0021] In a further embodiment, the latest version information is compared with the current version information corresponding to the business data loaded on the current web page. After obtaining the comparison result, when the comparison result indicates that the latest version information is consistent with the current version information, no instruction is executed.

[0022] In some embodiments, the refresh request is a current page refresh request, which drives the browser to re-obtain the current page from the data server for parsing to obtain the business data of the latest version information.

[0023] In some other embodiments, the refresh request is a business data refresh request, which drives the browser to obtain only the business data of the latest version information from the data server.

[0024] In a preferred embodiment, the version server and the data server are locally encapsulated as callable remote interfaces, and each remote interface shares the same network address but has a different service port.

[0025] A method for pushing service data adapted to one of the purposes of this application comprises the following steps:

[0026] In response to the terminal device opening a session to access a web page, the service data referenced by the web page is pushed;

[0027] Monitor the update of the business data, and after the business data is updated, update the latest version information accordingly;

[0028] Maintaining data synchronization about the latest version information with the version server, so that the terminal device can obtain the latest version information from the version server;

[0029] During the session, the terminal device responds to a refresh request and pushes the service data corresponding to the latest version information to the terminal device, so as to refresh the service data of the webpage.

[0030] As one of the preferred embodiments, in the step of maintaining data synchronization about the latest version information with the version server, the relationship data between the unique characteristic information of the session and the latest version information is synchronized to the version server, so that the terminal device can query and obtain the corresponding latest version information with the unique characteristic information.

[0031] As a further embodiment, the updating of the business data is monitored, and after the business data is updated, in the step of correspondingly updating its latest version information, the latest version information is represented by a self-incrementing variable in the memory.

[0032] A service data refreshing device provided for one of the purposes of the present application comprises:

[0033] The version acquisition unit is used to periodically acquire the latest version information of the business data referenced by the current web page from the version server;

[0034] The version comparison unit is used to compare the latest version information with the current version information corresponding to the business data loaded on the current webpage to obtain a comparison result;

[0035] A data acquisition unit, configured to submit a refresh request to a data server to acquire business data corresponding to the latest version information when the comparison result indicates that the latest version information is inconsistent with the current version information;

[0036] The data refreshing unit is used to replace the business data referenced by the current webpage with the business data of the latest version information, and replace the current version information with the latest version information.

[0037] A method for pushing business data adapted to one of the purposes of the present application includes:

[0038] A session initiation unit, configured to respond to a terminal device initiating a session to access a web page and push the business data referenced by the web page;

[0039] A data monitoring unit, used to monitor the update of the business data, and when the business data is updated, update its latest version information accordingly;

[0040] A version synchronization unit, used to maintain data synchronization with the version server about the latest version information, so that the terminal device can obtain the latest version information from the version server;

[0041] The refresh response unit is used to respond to the refresh request of the terminal device during the session maintenance period, and push the business data corresponding to the latest version information to it, so as to realize the refresh of the business data of the webpage.

[0042] An electronic device provided to meet one of the purposes of the present application includes a central processing unit and a memory, wherein the central processing unit is used to call and run a computer program stored in the memory to execute the business data refresh / push method.

[0043] A non-volatile storage medium is provided to meet one of the purposes of the present application, which stores a computer program implemented according to the business data refresh / push method in the form of computer-readable instructions. When the computer program is called by a computer, the steps included in the method are executed.

[0044] Compared with the prior art, the present application implements version information management for business data in principle, by marking the latest version information for business data at the data server, when the web page on the terminal device side calls the business data it references, the data server can track these business data, and when the business data is updated, the latest version information update is triggered, so that the data server can synchronize this information to the version server specifically responsible for version information query, and the terminal device obtains the latest version information of the business data it references by querying the version server, and compares it with the current version information stored locally. When the two are inconsistent, it is understood that the business data has been updated, so the latest business data is obtained from the data server, thereby realizing the refresh of the business data in the web page. The current version information is the latest version information corresponding to the last business data of the web page, that is, each time the business data is updated in the web page, its latest version information is stored as the local current version information, which can be used for the next update inspection, thus forming a closed loop that is convenient for continuous verification, which is conducive to operation through a timing mechanism.

[0045] It can be understood that the various technical solutions of the present application implemented according to this principle can at least reflect the following advantages:

[0046] First, although the present application sets up a timing mechanism, it does not mean that the web page and / or business data will be refreshed unconditionally every time the timing is triggered. Instead, the business data will be updated through the data server only after the latest version information is queried through the version server and compared with the current version information stored locally to find that the former has changed, so that the data server provides business data corresponding to the latest version information. As a result, the refresh requests related to business data that the data server needs to respond to are greatly reduced, and there is no need to frequently access the database to obtain business data. Instead, only when the business data is actually updated, the relevant refresh request of the terminal device is responded to to obtain the corresponding business data and push it to the terminal device. Therefore, the load on the data server and the related cloud database is greatly reduced, and the system service quality will also be greatly improved.

[0047] Secondly, on the terminal device side, the timing mechanism it turns on does not directly trigger the refresh request submitted to the data server, but instead prioritizes querying the version server for the latest version information, and only initiates the refresh request when the latest version information changes. Therefore, the workload and page refresh rate of the terminal device are also greatly reduced. A lower page refresh frequency can save users' network traffic and improve interaction efficiency, thereby ensuring a better human-computer interaction experience.

[0048] Thirdly, the present application focuses more on refreshing business data, and is not limited to indirectly achieving the purpose of refreshing business data by refreshing the web page. Therefore, the web page can achieve this purpose by implanting relevant script program modules for obtaining the latest business data. After obtaining the latest business data, it is displayed in the corresponding display block of the web page to realize the display and update of business data in the page. Since the web page itself is not refreshed or re-parsed, it saves the relevant background computing resources of the terminal device and can provide users with a smoother interface operation. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0050] Figure 1 A schematic diagram of a typical network deployment architecture related to implementing the technical solution of the present application.

[0051] Figure 2 This is a flowchart of a typical embodiment of the business data push method of the present application.

[0052] Figure 3 This is a flowchart of a typical embodiment of the business data refreshing method of the present application.

[0053] Figure 4 This is a principle block diagram of a typical embodiment of the business data pushing device of the present application.

[0054] Figure 5 This is a principle block diagram of a typical embodiment of the business data refreshing device of the present application. DETAILED DESCRIPTION

[0055] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be interpreted as limiting the present application.

[0056] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.

[0057] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as those generally understood by those skilled in the art to which this application belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with those in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as here.

[0058] It will be understood by those skilled in the art that the "client", "terminal" and "terminal device" used herein include both devices with wireless signal receivers, which are devices with only wireless signal receivers without transmission capabilities, and devices with receiving and transmitting hardware, which are devices with receiving and transmitting hardware capable of two-way communication on a two-way communication link. Such devices may include: cellular or other communication devices such as personal computers, tablet computers, which have single-line displays or multi-line displays or cellular or other communication devices without multi-line displays; PCS (Personal Communications Service, personal communication system), which can combine voice, data processing, fax and / or data communication capabilities; PDA (Personal Digital Assistant, personal digital assistant), which may include a radio frequency receiver, pager, Internet / intranet access, web browser, notepad, calendar and / or GPS (Global Positioning System, global positioning system) receiver; conventional laptop and / or palmtop computers or other devices, which have and / or include a conventional laptop and / or palmtop computer or other device with and / or including a radio frequency receiver. The "client", "terminal" and "terminal device" used herein may be portable, transportable, installed in a vehicle (air, sea and / or land), or suitable for and / or configured to run locally, and / or in a distributed form, at any other location on the earth and / or in space. The "client", "terminal" and "terminal device" used herein may also be a communication terminal, an Internet terminal, a music / video playing terminal, for example, a PDA, a MID (Mobile Internet Device) and / or a mobile phone with a music / video playing function, or a smart TV, a set-top box and other devices.

[0059] The hardware referred to by the names such as "server", "client", and "service node" in this application is essentially an electronic device with the equivalent capabilities of a personal computer. It is a hardware device with the necessary components revealed by the von Neumann principle, such as a central processing unit (including an arithmetic unit and a controller), a memory, an input device, and an output device. The computer program is stored in its memory, and the central processing unit calls the program stored in the external memory into the internal memory for execution, executes the instructions in the program, and interacts with the input and output devices to complete specific functions.

[0060] It should be pointed out that the concept of "server" referred to in this application can also be extended to the case of server clusters. According to the network deployment principle understood by those skilled in the art, the servers should be logically divided. In physical space, these servers can be independent of each other but can be called through interfaces, or integrated into a physical computer or a set of computer clusters. Those skilled in the art should understand this flexibility, and should not use it to restrict the implementation of the network deployment method of this application.

[0061] See also Figure 1 , the hardware foundation required for the implementation of the relevant technical solutions of this application can be deployed according to the architecture shown in the figure. The version server 800 and data server 808 referred to in this application are deployed in the cloud, and each server 800, 808 can be used as a front-end server of its own associated service cluster and open services to provide services for related terminal devices such as the smart phone 81 and personal computer 82 shown in the figure. The smart phone and personal computer can access the Internet through a well-known network access method, and establish a data communication link with various servers 800, 808 in the cloud, so as to run applications related to the services provided by the cloud servers.

[0062] The version server 800 is mainly used to store the version information of the business data cited by the web page of this application, so that the terminal device can query the latest version information of the relevant business data.

[0063] The data server 808 may be a server suitable for providing web page access services, and is suitable for calling a database storing the business data so as to provide the terminal device with web pages and the business data.

[0064] The application of the present application has various forms of expression, and is essentially used to realize various computer functions. Therefore, its functions can be expressed by calling a third-party browser to access a web page and executing a program module implanted in the web page, or it can be developed into various APPs suitable for installation in terminal devices, and the relevant functional logic of the browser is embedded in the APP, and these APPs are called remote web pages and executed various codes when they are running. Therefore, in a sense, browsers and applications are not completely different concepts. For online services developed based on web pages, the application may have a built-in browser for accessing web pages, and accessing web pages through an independent browser can also achieve the same functions of the application. In the face of the technological wave of developing terminal applications based on page technology, those skilled in the art should understand this.

[0065] The web pages involved in this application are usually published to the data server 808. The terminal device can initiate access to the web pages in the data server 808 by inputting the URL of the target web page through the browser, or by running the APP and executing the code equivalent to the browser function inside the APP to access the corresponding URL. The access to the web page will be regarded by the browser as an access request for the target web page, so a request is sent to the data server 808 to obtain the corresponding target web page. After responding to the request, the data server 808 pushes the HTML code of the target web page, and the browser parses and executes it, and finally displays the content of the target web page in the graphical user interface.

[0066] The browser described in this application recommends using a browser that supports the HTML5 protocol. This browser supports local storage features and provides related settings. For example, Google Chrome provides LocalStorage settings so that users can access its local storage space. This feature of LocalStorage is different from the feature of Cookies. Cookies usually only support 4K bytes, but LocalStorage can support a larger storage space. Therefore, using the local storage space of LocalStorage instead of Cookies can just avoid the problem of insufficient Cookie storage space and is used to store data that requires higher storage space. In addition, data can be permanently stored in LocalStorage, so it is easier to maintain in the long term for web page sessions with a longer life cycle. The current version information involved in this application can be stored in LocalStorage or Cookies. Of course, the current version information can also be stored only in the computer memory.

[0067] The program module in the web page involved in this application refers to the program code embedded in the target web page, such as the code written in Javascript, which runs as the browser parses the code in the target web page when the target web page is loaded. A program module is usually encapsulated as a method (function) and is used to perform a relatively independent function or is responsible for performing a relatively independent task. For example, the timer of this application and the related code for implementing business data update can be created in this way.

[0068] See also Figure 2 A business data push method of the present application can be programmed to be implemented as a functional module of the data server to open corresponding services, and its typical embodiment includes the following steps:

[0069] Step S11, in response to the terminal device opening a session to access a web page, push the business data referenced by the web page:

[0070] The data server provides services for accessing the web page and providing business data for the web page. The business data can be user instant messaging data required for web chat, execution status data during online payment, notification data of the website system, user barrage data of the online video live broadcast platform, etc. The program module carried by the web page at the terminal device is usually responsible for continuously obtaining various updated data from the data server.

[0071] The business data is stored in a cloud database accessible to the data server. As a cloud database, it can be stored in the local storage address of the data server or in other external storage addresses accessible to the data server. For some business data that is temporarily calculated and does not need to be archived, it is not necessary to rely on the database, but only the data server maintains its change process through memory variables.

[0072] When a terminal device accesses a web page, the data server identifies the request submitted by the terminal device, calls the web page corresponding to the request and pushes it to the terminal device. After receiving the web page, the terminal device parses it through the browser's parsing mechanism, and the parsing result is displayed on the browser page.

[0073] The web page accessed by the terminal device involved in this application contains references to business data that need to be displayed on its page, and it is necessary to track the latest changes in the business data. Therefore, when the web page is parsed and executed and the business data is first obtained from the data server, a long link can be established between the terminal device and the data server to realize a session between each other based on the web page. When the terminal device opens an account to access the web page, it starts the session with the data server; when the terminal device ends its access to the web page, the session can be deleted.

[0074] In order to maintain this session, usually, the data server and the terminal device will agree on a unique characteristic information corresponding to the session when creating the session, and the method is flexible. For example, a UID can be generated for the terminal device based on its unique characteristics to associate the session with it; or, if the webpage is logged in by a user who can be recognized by the data server, that is, there is a logged-in user, the UID of the logged-in user can be called to associate the session. Subsequently, the corresponding UID can be used as unique characteristic information between the terminal device and the data server to uniquely correspond to the session, thereby realizing the data communication interaction between the various interactive terminals involved in this application regarding the webpage as a specific object.

[0075] When the terminal device opens a session to access the web page, the data server pushes the web page to the terminal device in response to the request of the terminal device, and the terminal device then parses the web page to display the corresponding page content in the graphical user interface. In this process, since the web page contains a reference to the business data, the data server is also responsible for pushing the business data used by the web page to the terminal device. During the parsing process of the web page, the business data is displayed in a certain format in the corresponding area of ​​the browser page according to the instructions represented by its source code, so as to realize the display of the business data in the graphical user interface.

[0076] Step S12: monitor the update of the business data, and after the business data is updated, update the latest version information accordingly:

[0077] The data server is responsible for maintaining the update of the business data referenced by the web page. The business data can be the latest data provided by other terminal devices and servers other than the data server, such as user speech data in web chat; it can also be the latest data provided by the data server or other servers, such as broadcast data of system messages. When these latest data are transmitted to the data server, the data server stores them in the corresponding database or memory variable, thereby causing the original business data to be updated.

[0078] The data server monitors this update event at the same time, and the data server is also responsible for registering the version change information of the business data, that is, the edition information. Once the business data is updated, the data server modifies its corresponding edition information so that the business data is marked with the latest edition information.

[0079] The means for marking the latest version information is also very flexible. In one embodiment, a field can be set in the database for the data record corresponding to the business data to record its version number to represent the version information, and the latest version information can be modified by modifying the version number; in another embodiment, a memory auto-increment variable can be set for the business data, and an initialized version number such as "0" can be given. When the business data is updated once, it will be auto-incremented once, so as to modify the latest version information. Such as this, those skilled in the art can flexibly implement it.

[0080] This step can be run as an independent task so that multiple terminal devices can uniformly monitor changes in different business data referenced by the web pages they visit.

[0081] Step S13: maintaining data synchronization about the latest version information with the version server, so that the terminal device can obtain the latest version information from the version server:

[0082] Similarly, this step can also be constructed as an independent task and run concurrently with the tasks constructed in other steps, so as to centrally handle data synchronization and improve collaboration efficiency.

[0083] The data server and the version server need to synchronize the latest version information related to the session so that the version server can manage the latest status of each business data in a relatively centralized manner and provide services for terminal devices that need to query the latest status of the business data. To this end, a data synchronization mechanism is established between the data server and the version server, and the data server sends the latest version information of the business data corresponding to each session to the version server for query. In a specific implementation, the data server can construct the unique feature information of the session to which the business data belongs and the latest version information of the business data into relational data, and send this relational data to the version server for storage and future reference.

[0084] The data synchronization between the data server and the version server can be a real-time synchronization relationship achieved through software configuration, or a synchronization relationship in which the data server sends data to the version server in response to a business data update event, and then the version server processes the data according to its own program business logic. It can be understood that in order to meet the needs of terminal devices for higher update efficiency of business data, the more timely the better in theory, but in practice, due to various insurmountable situations such as network delays, combined with actual needs, as long as the synchronization duration of this data synchronization can be kept shorter than the interval duration required for the terminal device to refresh its business data, it can basically meet the actual needs. Therefore, those skilled in the art can grasp the implementation of technologies related to data synchronization between the data server and the version server, and try to take into account all aspects.

[0085] After the version server obtains the relationship data between the unique feature information of the session and the latest version information transmitted by the data server, it stores the relationship data in its local database and can be used for query by the terminal device. For the same unique feature information, the version server only needs to store one latest record to avoid confusion caused by providing multiple different latest versions of the same business data to the terminal device at the same time.

[0086] The terminal device will periodically submit a query request about the business data to the edition server according to its timing mechanism and based on the business data refresh requirements of the web page it visits. Since the terminal device, the data server and the edition server are all associated with each other through the unique characteristic information corresponding to the web page session, the query request will contain the unique characteristic information for the edition server to query accordingly.

[0087] After receiving the query request from the terminal device, the version server parses out the unique characteristic information therein, then queries the only latest version information corresponding to the unique characteristic information from its local database, and sends the latest version information to the terminal device.

[0088] After receiving the latest version information, the terminal device can compare it with the current version information of the business data of its web page. When the two are found to be inconsistent, it knows that the business data at the data server has changed, and can further request the data server to refresh its business data.

[0089] Step S14: During the session, in response to a refresh request from the terminal device, the service data corresponding to the latest version information is pushed to the terminal device to refresh the service data of the webpage.

[0090] The session of the web page accessed by the terminal device is maintained until it is closed. During the session, the terminal device queries the version server for the latest version information of the business data at a regular time. When it finds that the latest version information is inconsistent with the current version information, usually when the latest version information is greater than the current version information, it can initiate a refresh request to the data server.

[0091] The current version information is the latest version information corresponding to the last time the business data referenced by the webpage was refreshed, and is temporarily stored in the terminal device. Therefore, each time the business data is refreshed, its latest version information will be locally stored as the current version information.

[0092] The refresh request is mainly used to refresh the business data in the current web page. The cooperation mode between the refresh request and the data server is relatively flexible and diverse. Therefore, the direct object refreshed and the information required when constructing the request can be flexibly implemented to adapt to the different cooperation modes between the terminal device and the data server based on the refresh request. For easy understanding, several specific implementation methods are disclosed below for reference:

[0093] In one embodiment, the refresh request is a current page refresh request, which aims to refresh the business data by refreshing the current web page so that the web page reacquires the business data during the parsing process, and the refreshed business data is the latest business data in the data server at that time. In this way, the refresh request does not need to include the latest version information obtained by the terminal device from the version server, but is only used to reacquire the current web page. In this regard, the data server does not have to perform complex processing on the refresh request. Instead, after receiving the refresh request, it re-pushes the web page to the terminal device, and pushes the current latest business data when the web page is parsed and executed again by the terminal device browser. This method is the simplest and is mainly suitable for application scenarios where business updates are not frequent and are not sensitive to the synchronization requirements of business data, such as epidemic dynamic display scenarios.

[0094] In another embodiment, the refresh request is a business data refresh request, which aims to maintain the non-updated page and only update by re-acquiring the business data, so that the re-acquired business data is the latest business data in the data server at that time. In this way, the refresh request does not need to include the latest version information obtained by the terminal device from the version server, and the data server simply responds to the refresh request and calls out the latest version of the business data in the database and pushes it to the terminal device to update the business data. This method is mainly suitable for application scenarios where business data updates are relatively frequent but are not sensitive to business data synchronization requirements, such as system message synchronization scenarios.

[0095] In another embodiment, the refresh request is a business data refresh request, which aims to achieve the update only by re-acquiring the business data without updating the webpage, but the corresponding version of the business data needs to be obtained according to the latest version information specified by the terminal device to ensure that a certain data synchronization requirement is met. To this end, in this method, it is necessary to include the latest version information obtained by the terminal device from the version server in the refresh request. After receiving the refresh request, the data server parses the latest version information, and then queries the business data corresponding to the latest version information specified by the terminal device, and pushes this business data to the terminal device as a response to the refresh request. Then, the terminal device displays the business data on its page to achieve the business data update. In this case, even if there are multiple versions of the business data in the data server, or even a version newer than the latest version information specified by the terminal device, the data server only provides its corresponding business data according to the latest version information specified by the terminal device. It can be understood that this method is conducive to ensuring that the data server, version server and terminal device can achieve data synchronization based on the latest version information. It is more suitable for application scenarios where business data is updated frequently and synchronization requirements are high. For example, in online video live broadcast services, scenarios such as web chat and video barrage are more suitable for this method.

[0096] It can be seen that by implementing the business data push method of the present application on the data server, the business data is version-marked, and a version server specifically responsible for version query is separated, so that the terminal device can query the version server for the status of business data changes, and only request business data from the data server when the business data changes, thereby greatly reducing the load pressure on the data server.

[0097] See also Figure 3 A business data refresh method of the present application is suitable for being implemented in a web page, so as to be executed when a terminal device accesses the web page, so as to interact with the data server that implements the business data push method, and access the web page through the service opened by the data server, so as to ensure that the business data in the web page is updated in a timely manner. In its typical embodiment, the method includes the following steps:

[0098] Step S21: periodically obtain the latest version information of the business data referenced by the current webpage from the version server:

[0099] As mentioned above, in the terminal device, the target web page is accessed through a browser or an application running on a web page, especially an HTML5 web page. After the web page is parsed, its page content is displayed in a graphical user interface. The web page may include a script program module for executing the formatting and interface display of the business data, and such a program module may also be used to interact with the data server and the version server to obtain the business data.

[0100] Similarly, in the foregoing, the latest version information of the business data has been synchronized with the version server through the data server, and the terminal device can query the version server to obtain the latest version information.

[0101] After the terminal device accesses the webpage, i.e. the current webpage, it establishes a long-link-based session with the data server based on the current webpage, and associates a UID with the session, which is unique characteristic information. It can be generated by the machine information and network information of the terminal device, or it can be referred to by the UID of the logged-in user of the current webpage. Therefore, for the data server, each session has a unique characteristic information. During the interaction between the terminal device and the data server, both parties can use the unique characteristic information to identify whether the communication data belongs to the object processed by the terminal device. Because when the data server synchronizes with the version server, it mainly synchronizes the relationship data between the unique characteristic information and the latest version information of the business data. Therefore, the relationship data corresponding to the terminal device can be determined by the unique characteristic information between the terminal device and the latest version information.

[0102] After the terminal device accesses the web page, i.e., the current web page, and realizes its first loading, it starts activating the built-in timer of the web page. The timer is used to periodically trigger the start-up execution of each step of the method, so as to regularly detect the latest version information of the business data, and send a refresh request related to the current web page to the data server when necessary. The timing interval of the timer, that is, the interval length of the terminal device initiating a query request for the latest version information to the version server, can be flexibly determined by those skilled in the art according to the update frequency requirements of the business data. It can be seen that this step, as the starting step of the method, is executed in response to each timing trigger event of the timer. Each time the timer triggers the event, the relevant code is called to execute the method once.

[0103] Once this step is executed due to the triggering event of the timer, under the operation control of the corresponding program module of the web page, the terminal device submits a query request for the latest version information of the business data in the current web page to the version server, and the query request includes the unique feature information.

[0104] After receiving the query request, the version server parses out the unique feature information therein, then queries the relationship data with the unique feature information in its local database, obtains the latest version information corresponding to the unique feature information from the relationship data, and then feeds back the latest version information to the terminal device to complete the response to the query request.

[0105] After receiving the result fed back by the version server, the terminal device parses out the latest version information, which is the latest version information marked on the server side by the business data referenced by the current webpage.

[0106] Step S22: compare the latest version information with the current version information corresponding to the business data loaded on the current webpage to obtain a comparison result:

[0107] As mentioned above, the terminal device can store the current version information corresponding to each version of the business data through local storage space, Cookies, memory variables, etc. For the latest version information of the re-acquired business data, the current version information is actually the latest version information of the previous version of the business data. It can be seen that the difference between the current version information and the latest version information is essentially the difference between the version number of the old version and the version number of the new version.

[0108] When the current web page is first loaded by the browser of the terminal device, according to the implementation of the program code in the web page, the business data that needs to be referenced can be obtained from the data server, and at the same time, the latest version information corresponding to the business data can be obtained, and then stored as the current version information. Subsequently, for any version of the business data, the corresponding latest version information can be replaced and stored as the current version information. Therefore, when this step is executed, the latest version information obtained by the terminal device from the version server can be compared with the current version information to obtain a comparison result. It can be understood that the comparison result can be a Boolean value, and the two Boolean values ​​respectively represent whether the latest version information obtained from the version server is consistent with the current version information stored locally.

[0109] In some alternative embodiments, when the current web page is loaded for the first time, it is not necessary to obtain the latest version information corresponding to the business data at that time for storage as the current version information. It is only necessary to set the current version information to a null value, or to a minimum version value such as "0". Since the version number is generally expressed in the form of an increasing number, the correct result can still be obtained when the latest version information in this form is compared with the current version information.

[0110] It can be understood that if the business data at the data server has changed, the latest version information obtained by the terminal device from the version server will be inconsistent with the current version information stored locally, and it is necessary to rely on the subsequent steps of this method to implement the update of the business data; conversely, if the terminal device finds that the latest version information is consistent with the current version information after comparison, it means that the business data at the data server has not changed. Therefore, the implementation method that adapts to this situation does not need to execute any instructions. During the current timing period, the business data is maintained unchanged, and there is no need to send a refresh request to the data server, thereby reducing the workload of the data server.

[0111] Step S23: When the comparison result indicates that the latest version information is inconsistent with the current version information, a refresh request is submitted to the data server to obtain the business data corresponding to the latest version information:

[0112] As mentioned above, when the comparison result obtained by comparing the latest version information with the current version information stored locally indicates that the latest version information is inconsistent with the current version information, this usually means that the version number of the latest version information is higher than the version number of the current version information, and the business data at the data server has been updated. In this case, the terminal device can start to interact with the data server, and obtain a response from the data server by sending the refresh request to the data server, thereby updating the business data in the current web page.

[0113] As mentioned above, the function of the refresh request is mainly to refresh the business data in the current web page. The cooperation mode between the refresh request and the data server is relatively flexible and diverse. Therefore, the direct object refreshed and the information required when constructing the request can be flexibly implemented to adapt to the different cooperation modes between the terminal device and the data server based on the refresh request. For ease of understanding, several specific implementation methods are disclosed below for reference:

[0114] In one embodiment, the refresh request is a current page refresh request, which aims to refresh the business data by refreshing the current web page so that the web page reacquires the business data during the parsing process, and the refreshed business data is the latest business data in the data server at that time. In this way, the refresh request does not need to include the latest version information obtained by the terminal device from the version server, but is only used to reacquire the current web page. In this regard, the data server does not have to perform complex processing on the refresh request. Instead, after receiving the refresh request, it re-pushes the web page to the terminal device, and pushes the current latest business data when the web page is parsed and executed again by the terminal device browser. This method is the simplest and is mainly suitable for application scenarios where business updates are not frequent and are not sensitive to the synchronization requirements of business data, such as epidemic dynamic display scenarios.

[0115] In another embodiment, the refresh request is a business data refresh request, which aims to maintain the non-updated page and only update by re-acquiring the business data, so that the re-acquired business data is the latest business data in the data server at that time. In this way, the refresh request does not need to include the latest version information obtained by the terminal device from the version server, and the data server simply responds to the refresh request and calls out the latest version of the business data in the database and pushes it to the terminal device to update the business data. This method is mainly suitable for application scenarios where business data updates are relatively frequent but are not sensitive to business data synchronization requirements, such as system message synchronization scenarios.

[0116] In another embodiment, the refresh request is a business data refresh request, which aims to achieve the update only by re-acquiring the business data without updating the webpage, but the corresponding version of the business data needs to be obtained according to the latest version information specified by the terminal device to ensure that a certain data synchronization requirement is met. To this end, in this method, it is necessary to include the latest version information obtained by the terminal device from the version server in the refresh request. After receiving the refresh request, the data server parses the latest version information, and then queries the business data corresponding to the latest version information specified by the terminal device, and pushes this business data to the terminal device as a response to the refresh request. Then, the terminal device displays the business data on its page to achieve the business data update. In this case, even if there are multiple versions of the business data in the data server, or even a version newer than the latest version information specified by the terminal device, the data server only provides its corresponding business data according to the latest version information specified by the terminal device. It can be understood that this method is conducive to ensuring that the data server, version server and terminal device can achieve data synchronization based on the latest version information. It is more suitable for application scenarios where business data is updated frequently and synchronization requirements are high. For example, in online video live broadcast services, scenarios such as web chat and video barrage are more suitable for this method.

[0117] Step S24: Replace the business data referenced by the current webpage with the business data of the latest version information, and replace the current version information with the latest version information:

[0118] As mentioned above, the terminal device and the data server maintain the same session based on a long link. During the session, the data server can respond to the refresh request of the terminal device and re-provide the business data referenced by the current page of the terminal device, and the business data is the latest version of the data.

[0119] After receiving the latest version of the business data, the terminal device submits it to the script program module embedded in the web page responsible for displaying the business data for formatting and interface display, so that the business data can be output to the page of the current web page, so that the content corresponding to the business data on the graphical user interface changes accordingly, so that the operating user can read it. For example, the update of the business data of the epidemic dynamics can present its latest confirmed cases, suspected cases, etc. through the execution of this step; for another example, the update of the business data of the web chat can present new user speech data through the execution of this step. And so on, I will not enumerate them.

[0120] After the business data of the latest version information is updated to the page, it means that the business data update within a timing period is completed. Before the end, in order to facilitate the subsequent version comparison of the business data, in this step, the latest version information is also replaced and saved as the current version information, so that the current version information data object always represents the associated version number of the business data referenced in the page of the current web page. When the steps of this method are re-executed in the next timing period, the current version information that has just been replaced can be used as a basis for version identification and compared with the latest version information in the future.

[0121] The above is a typical embodiment of the business data refreshing method of the present application and its variant embodiments. In order to further enrich the connotation of the present application, the various variant embodiments involved above, other possible alternative implementations, and the connection and compatibility relationship between these embodiments are briefly summarized as follows:

[0122] In one embodiment as described above, the business data refresh method further includes a step that is placed before step S21 but is not shown in the figure: when the current web page is parsed and loaded by the browser for the first time, the business data with the latest version information that it needs to reference is obtained from the data server, and the latest version information is stored as the local current version information. By applying this embodiment, the initialization steps of this method can be standardized, and the programming logic inside the web page can be unified, so that programmers only need a set of unified codes to replace the latest version information and save it to the corresponding storage location of the local current version information, thereby simplifying the development logic and optimizing the development process.

[0123] In one embodiment as described above, the service data refreshing method includes the following steps:

[0124] First, prior to step S21, when the current webpage is accessed by the browser for the first time, a session associated with the current webpage is created between the browser and the data server, and the unique characteristic information is associated with the session;

[0125] Then, in step S21, i.e., the step of periodically obtaining the latest version information of the business data referenced by the current webpage from the version server, the unique characteristic information of the session is submitted to the version server to determine the latest version information associated therewith;

[0126] As mentioned above, the relationship data between the unique feature information and the latest version information is sent by the data server to the version server after the business data corresponding to the session is updated, resulting in the latest version information being updated.

[0127] This embodiment aims to concretize the programming development guidelines of this application. By implementing the association between multiple interactive terminals through unique feature information, communication efficiency can be greatly improved and the difficulty of data interaction can be reduced.

[0128] It can be understood that the newly added steps and the contents defined in the above two embodiments can be combined with other embodiments of the present application for implementation, thereby further enriching the technical content of the present application.

[0129] In another embodiment, the edition server and the data server can be regarded as logical concepts, and both servers are locally encapsulated as callable remote interfaces, and each remote interface shares the same network address but has different service ports. That is, the edition server and the data server can be physically independent and computer devices with independent network addresses and service ports as described in the aforementioned embodiments, or they can be configured to act as the edition server and data server at the same time by configuring a computer device pointed to by the same network address, and they are distinguished from each other by different service ports. It can be seen that no matter how the edition server and data server are deployed in the cloud, on the side of the terminal device, through the web page code, two remote interfaces representing the edition server and the data server can be observed, even if the two remote interfaces have the same network address, as long as the two remote interfaces play the same role as the edition server and the data server, they should also be regarded as equivalent implementation plans of the aforementioned embodiments of the present application.

[0130] It can be seen that by applying the business data refresh method of the present application, the terminal device does not need to frequently update the business data to the data server, but only initiates a refresh request to the data server to obtain the latest business data when the version server learns that the latest version information of the business data has changed. Therefore, there is no need for frequent refreshes, and the terminal device side can reduce the computer computing resources and network overhead, which can improve the human-computer interaction experience. Correspondingly, the server side will inevitably reduce the workload as the requests decrease, further saving network resources.

[0131] Further, by functionalizing the various embodiments of the above-mentioned service data push method, a service data push device of the present application can be constructed. Figure 4 In a typical embodiment, the device comprises:

[0132] A session initiation unit 11, configured to respond to a terminal device initiating a session to access a web page and push the service data referenced by the web page;

[0133] The data monitoring unit 12 is used to monitor the update of the business data, and when the business data is updated, update the latest version information accordingly;

[0134] The version synchronization unit 13 is used to maintain data synchronization with the version server about the latest version information, so that the terminal device can obtain the latest version information from the version server;

[0135] The refresh response unit 14 is used to respond to the refresh request of the terminal device during the session maintenance period, and push the business data corresponding to the latest version information to it, so as to realize the refresh of the business data of the webpage.

[0136] Further, by functionalizing the various embodiments of the above-mentioned business data refreshing method, a business data refreshing device of the present application can be constructed. Figure 5 In a typical embodiment, the device comprises:

[0137] The version acquisition unit 21 is used to periodically acquire the latest version information of the business data referenced by the current web page from the version server;

[0138] The version comparison unit 22 is used to compare the latest version information with the current version information corresponding to the business data loaded on the current webpage to obtain a comparison result;

[0139] The data acquisition unit 23 is used to submit a refresh request to the data server to acquire the business data corresponding to the latest version information when the comparison result indicates that the latest version information is inconsistent with the current version information;

[0140] The data refreshing unit 24 is used to replace the business data referenced by the current webpage with the business data of the latest version information, and replace the current version information with the latest version information.

[0141] In order to facilitate the execution of the present application, an electronic device is provided, including a central processing unit and a memory, wherein the central processing unit is used to call and run a computer program stored in the memory to execute the steps of a business data push / refresh method as described above.

[0142] It can be seen that the memory is suitable for using a non-volatile storage medium. By implementing the aforementioned method as a computer program and installing it in an electronic device such as a mobile phone, the relevant program code and data are stored in the non-volatile storage medium of the electronic device. The program is further run by the central processor of the electronic device, and it is transferred from the non-volatile storage medium to the memory for operation, so that the desired purpose of the present application can be achieved. Therefore, it can be understood that in one embodiment of the present application, a non-volatile storage medium can also be provided, which stores a computer program implemented according to various embodiments of the business data push / refresh method in the form of computer-readable instructions. When the computer program is called and executed by the computer, the steps included in the method are executed.

[0143] In summary, the present application enables the web page of the terminal device to request service data from the server only when the service data it references changes, thereby saving various computer and network resource expenses on the terminal device side and the server side.

[0144] It will be appreciated by those skilled in the art that the present application package relates to devices for performing one or more of the operations and methods described in the present application. These devices may be specially designed and manufactured for the desired purpose, or may also include known devices in general-purpose computers. These devices have computer programs stored in their memory, which are selectively activated or reconstructed. Such computer programs may be stored in a device (e.g., computer) readable medium or in any type of medium suitable for storing electronic instructions and coupled to a bus, respectively, the computer readable medium including but not limited to any type of disk (including floppy disk, hard disk, optical disk, CD-ROM, and magneto-optical disk), ROM (Read-Only Memory), RAM (Random Access Memory), EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory, magnetic card or optical card. That is, the readable medium includes any medium that stores or transmits information in a readable form by a device (e.g., computer).

[0145] Those skilled in the art will appreciate that each block in these structure diagrams and / or block diagrams and / or flow charts and combinations of blocks in these structure diagrams and / or block diagrams and / or flow charts can be implemented using computer program instructions. Those skilled in the art will appreciate that these computer program instructions can be provided to a general-purpose computer, a professional computer, or a processor of other programmable data processing methods to implement, thereby executing the scheme specified in the block or multiple blocks of the structure diagrams and / or block diagrams and / or flow charts disclosed in this application through the processor of the computer or other programmable data processing method.

[0146] Those skilled in the art will appreciate that the various operations, methods, steps, measures, and schemes in the processes discussed in this application may be alternated, altered, combined, or deleted. Further, other steps, measures, and schemes in the various operations, methods, and processes discussed in this application may also be alternated, altered, rearranged, decomposed, combined, or deleted. Further, the steps, measures, and schemes in the prior art that are similar to those disclosed in this application may also be alternated, altered, rearranged, decomposed, combined, or deleted.

[0147] The above description is only a partial implementation method of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A business data refreshing method, characterized in that: Applied in terminal equipment, including the following steps: When the current webpage is accessed for the first time by a browser with a local storage feature, a session associated with the current webpage is created between the browser and the data server, and unique characteristic information is associated with the session; Submitting the unique feature information of the session to the version server to determine the latest version information associated therewith, and periodically obtaining the latest version information of the business data referenced by the current webpage from the version server, wherein the relationship data between the unique feature information and the latest version information is sent by the data server to the version server after the business data corresponding to the session is updated, resulting in the latest version information being updated, and a data synchronization mechanism is established between the data server and the version server, and the data server sends the latest version information of the business data corresponding to each session to the version server for query; Compare the latest version information with the current version information corresponding to the business data loaded on the current webpage to obtain a comparison result; When the comparison result indicates that the latest version information is inconsistent with the current version information, a refresh request is submitted to the data server to obtain the business data corresponding to the latest version information; The business data referenced by the current webpage is replaced with the business data of the latest version information, and the current version information stored in the local storage space of the browser is replaced with the latest version information.

2. The method according to claim 1, characterized in that The method comprises the following preparatory steps: When the current web page is parsed and loaded by the browser for the first time, a timer is started so that subsequent steps are executed in response to the timing triggering of the timer; Or include the following pre-steps: When the current web page is parsed and loaded for the first time by the browser, the business data with the latest version information that needs to be referenced is obtained from the data server, and the latest version information is stored as the local current version information.

3. The method according to claim 1, characterized in that: The refresh request is a current page refresh request, which drives the browser to re-obtain the current page from the data server for parsing to obtain the business data of the latest version information; or: The refresh request is a business data refresh request, which drives the browser to obtain only the business data of the latest version information from the data server.

4. A method for pushing business data, characterized in that: Applied to the data server, including the following steps: In response to the terminal device opening a session to access a web page, the service data referenced by the web page is pushed, and unique characteristic information is associated with the session; Monitor the update of the business data, and after the business data is updated, update the latest version information accordingly; Maintaining data synchronization about the latest version information with the version server, so that the terminal device can obtain the latest version information from the version server; wherein a data synchronization mechanism is established between the data server and the version server, and the data server synchronizes the relationship data between the unique feature information of the session and the latest version information to the version server, so that the terminal device can query and obtain the corresponding latest version information with the unique feature information; During the session, the terminal device responds to a refresh request and pushes the service data corresponding to the latest version information to the terminal device, so as to refresh the service data of the webpage.

5. A service data refreshing device, characterized in that: Applied in terminal equipment, it includes: When the current webpage is accessed for the first time by a browser with a local storage feature, a session associated with the current webpage is created between the browser and the data server, and unique characteristic information is associated with the session; A version acquisition unit is used to submit the unique feature information of the session to the version server to determine the latest version information associated therewith, and to obtain the latest version information of the business data referenced by the current webpage from the version server at regular intervals, wherein the relationship data between the unique feature information and the latest version information is sent by the data server to the version server after the business data corresponding to the session is updated, resulting in the latest version information being updated, and a data synchronization mechanism is established between the data server and the version server, and the data server sends the latest version information of the business data corresponding to each session to the version server for query; The version comparison unit is used to compare the latest version information with the current version information corresponding to the business data loaded on the current webpage to obtain a comparison result; A data acquisition unit, configured to submit a refresh request to a data server to acquire business data corresponding to the latest version information when the comparison result indicates that the latest version information is inconsistent with the current version information; The data refresh unit is used to replace the business data referenced by the current web page with the business data of the latest version information, and replace the current version information with the latest version information stored in the local storage space of the browser.

6. A service data push device, characterized in that: Applied to data servers, it includes: A session initiation unit, configured to respond to a terminal device initiating a session to access a web page and push the business data referenced by the web page, and associate unique feature information with the session; A data monitoring unit, used to monitor the update of the business data, and when the business data is updated, update its latest version information accordingly; A version synchronization unit, used to maintain data synchronization with the version server about the latest version information, so that the terminal device can obtain the latest version information from the version server; wherein a data synchronization mechanism is established between the data server and the version server, and the data server synchronizes the relationship data between the unique feature information of the session and the latest version information to the version server, so that the terminal device can query and obtain the corresponding latest version information with the unique feature information; The refresh response unit is used to respond to the refresh request of the terminal device during the session maintenance period, and push the business data corresponding to the latest version information to it, so as to realize the refresh of the business data of the webpage.

7. An electronic device, comprising a central processing unit and a memory, characterized in that: The central processing unit is used to call and run a computer program stored in the memory to execute the steps of the method according to any one of claims 1 to 4.

8. A non-volatile storage medium, characterized in that: It stores a computer program implemented according to the method described in any one of claims 1 to 4 in the form of computer-readable instructions, and when the computer program is called and executed by a computer, the steps included in the method are executed.