CN111367922B - Data updating method and related equipment - Google Patents

Data updating method and related equipment Download PDF

Info

Publication number
CN111367922B
CN111367922B CN202010118029.5A CN202010118029A CN111367922B CN 111367922 B CN111367922 B CN 111367922B CN 202010118029 A CN202010118029 A CN 202010118029A CN 111367922 B CN111367922 B CN 111367922B
Authority
CN
China
Prior art keywords
data
database
updated
original data
anchor
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.)
Active
Application number
CN202010118029.5A
Other languages
Chinese (zh)
Other versions
CN111367922A (en
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.)
Zhuomi Private Ltd
Original Assignee
Zhuomi Private 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 Zhuomi Private Ltd filed Critical Zhuomi Private Ltd
Priority to CN202010118029.5A priority Critical patent/CN111367922B/en
Publication of CN111367922A publication Critical patent/CN111367922A/en
Application granted granted Critical
Publication of CN111367922B publication Critical patent/CN111367922B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2379Updates performed during online database operations; commit processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2365Ensuring data consistency and integrity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2187Live feed
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/262Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists
    • H04N21/26291Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists for providing content or additional data updates, e.g. updating software modules, stored at the client

Abstract

The embodiment of the application discloses a data updating method and related equipment, wherein the method comprises the following steps: when the server detects a terminal equipment access command, a first message is obtained, and the first message represents the change condition of the network anchor point; the server updates first original data in a first database according to the first message to obtain first updated data; the server updates the second original data in the second database according to the first updated data to obtain second updated data, wherein the second original data is a subset of the first original data, and the second updated data is a subset of the first updated data.

Description

Data updating method and related equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a data updating method and related devices.
Background
With the increasing growth of the internet live broadcast industry, the data information contained in the live broadcast software is also increasing, such as live broadcast room ranking information, user information in a user ranking list, gift information in a gift ranking list, and the like. How to update a large amount of data, so that users can timely acquire updated data information, and avoiding acquiring outdated data information is a technical problem under study of those skilled in the art.
Disclosure of Invention
The embodiment of the application discloses a data updating method and related equipment, which can enable a user to timely acquire updated data information and avoid the user from acquiring outdated data information.
In a first aspect, an embodiment of the present application provides a data updating method, including:
when the server detects an access command, a first message is obtained, wherein the first message represents the change condition of network anchor points;
the server updates first original data in a first database according to the first message to obtain first updated data;
and the server updates second original data in the second database according to the first updated data to obtain second updated data, wherein the second original data is a subset of the first original data, and the second updated data is a subset of the first updated data.
In the method, when the server detects the access command, the server obtains the first message, so that the change condition of the information can be timely obtained, and the first original data in the first database can be timely updated by updating the first original data according to the first message. The server updates the second original data in the second database according to the first updated data to obtain second updated data, two layers of protection can be carried out on the data, and consistency of the data is guaranteed through a two-layer database updating mode, so that a user can timely acquire correct updated data information, and the user is prevented from acquiring outdated data information.
In an optional solution, the second original data is anchor information with an anchor score greater than a first preset threshold in the first original data, and the second updated data is anchor information with an anchor score greater than the first preset threshold in the first updated data.
In still another alternative, the first message includes a correspondence between a target network anchor name and a change score, and the server updates first original data in a first database according to the first message to obtain first updated data, including:
the server searches first original data corresponding to the target network anchor name from the first database;
and the server superimposes the first original data corresponding to the target network anchor name and the change integral corresponding to the target network anchor name to obtain first updated data.
In yet another alternative, the updating, by the server, the second original data in the second database according to the first updated data to obtain second updated data includes:
the server searches second original data which is the same as the name of the network anchor in the first updated data and has different network anchor points from the second database;
The server replaces the second original data with the same network anchor name and different network anchor points with the first updated data.
In yet another alternative, the updating, by the server, the second original data in the second database according to the first updated data to obtain second updated data includes:
and the server updates the second original data in the second database according to the first updating data according to a preset time interval to obtain the second updating data.
In the method, the second database is updated according to the preset time interval, so that the consistency of the data information in the first database and the second database can be ensured, and errors are avoided.
In yet another alternative, if it is detected that the duration of the second update data in the second database that is not accessed exceeds a second preset threshold, the server deletes the second update data in the second database.
In the method, the memory space can be reasonably utilized by judging whether to delete the data information by detecting whether the accessed time of the data information exceeds the second preset threshold value.
In yet another alternative, after deleting the second update data in the second database, if a command for calling the second update data in the second database is detected, the server acquires the second update data from the first database and updates the second update data into the second database.
In the method, when the data information is stored in one database through the two layers of database storage, the situation that the data information is completely lost if the data information is lost can be avoided, and the persistence of the data storage can be ensured. When the data in the second database is lost, the user can acquire the second data information from the first database when the user wants to call the data in the second database, so that the user satisfaction is improved.
In a second aspect, an embodiment of the present application provides a data updating apparatus, including:
the communication unit is used for obtaining a first message when the access command is detected, wherein the first message represents the change condition of the network anchor point;
the processing unit is used for updating the first original data in the first database according to the first message to obtain first updated data;
The processing unit is further configured to update second original data in the second database according to the first update data to obtain second update data, where the second original data is a subset of the first original data, and the second update data is a subset of the first update data.
In the device, when the server detects the access command, the server obtains the first message, so that the change condition of the information can be timely obtained, and the first original data in the first database can be timely updated by updating the first original data according to the first message. The server updates the second original data in the second database according to the first updated data to obtain second updated data, two layers of protection can be carried out on the data, and consistency of the data is guaranteed through a two-layer database updating mode, so that a user can timely acquire correct updated data information, and the user is prevented from acquiring outdated data information.
In an optional solution, the second original data is anchor information with an anchor score greater than a first preset threshold in the first original data, and the second updated data is anchor information with an anchor score greater than the first preset threshold in the first updated data.
In yet another alternative, the processing unit is further configured to search, from the first database, first original data corresponding to the target network anchor name; and superposing the first original data corresponding to the target network anchor name and the change integral corresponding to the target network anchor name to obtain first updated data.
In yet another alternative, the processing unit is further configured to search the second database for second original data that is the same as the name of the anchor in the first updated data and has a different anchor score; and replacing the second original data with the same network anchor name and different network anchor points with the first updated data.
In yet another alternative, the processing unit is further configured to update the second original data in the second database according to the first update data at a preset time interval to obtain the second update data.
In the device, the second database is updated according to the preset time interval, so that the consistency of the data information in the first database and the second database can be ensured, and errors are avoided.
In yet another alternative, the processing unit is further configured to delete the second update data in the second database if it is detected that a duration in which the second update data in the second database is not accessed exceeds a second preset threshold.
In the device, the memory space can be reasonably utilized by judging whether to delete the data information by detecting whether the accessed time of the data information exceeds the second preset threshold value.
In yet another alternative, the processing unit is further configured to, in a case where a command for calling the second update data in the second database is detected, obtain the second update data from the first database and update the second update data into the second database.
In the device, when the data information is stored in one database through the two layers of database storage, the situation that the data information is completely lost if the data information is lost can be avoided, and the persistence of the data storage can be ensured. When the data in the second database is lost, the user can acquire the second data information from the first database when the user wants to call the data in the second database, so that the user satisfaction is improved.
In a third aspect, an embodiment of the present application provides a server, including: a processor, a memory, a communication interface, and a bus;
the processor, the memory and the communication interface are connected through the bus and complete communication with each other;
the memory stores a computer program;
the processor is configured to execute a computer program stored in the memory by executing the computer program to:
when an access command is detected, a first message is obtained, wherein the first message represents the change condition of network anchor points;
updating first original data in a first database according to the first message to obtain first updated data;
and updating second original data in the second database according to the first updating data to obtain second updating data, wherein the second original data is a subset of the first original data, and the second updating data is a subset of the first updating data.
In the above server, when the server detects the access command, the server obtains the first message, so that the change condition of the information can be timely obtained, and the first original data in the first database can be timely updated by updating the first original data according to the first message. The server updates the second original data in the second database according to the first updated data to obtain second updated data, two layers of protection can be carried out on the data, and consistency of the data is guaranteed through a two-layer database updating mode, so that a user can timely acquire correct updated data information, and the user is prevented from acquiring outdated data information.
In an optional solution, the second original data is anchor information with an anchor score greater than a first preset threshold in the first original data, and the second updated data is anchor information with an anchor score greater than the first preset threshold in the first updated data.
In still another alternative, the first message includes a correspondence between a target network anchor name and a change score, and the processor is configured to update, according to the first message, first original data in a first database to obtain first update data, specifically:
searching first original data corresponding to the target network anchor name from the first database;
and superposing the first original data corresponding to the target network anchor name and the change integral corresponding to the target network anchor name to obtain first updated data.
In yet another alternative, the processor is configured to update, according to the first update data, second original data in a second database to obtain second update data, specifically:
searching second original data which is the same as the name of the network anchor in the first updated data and different in network anchor points from the second database;
And replacing the second original data with the same network anchor name and different network anchor points with the first updated data.
In yet another alternative, the processor is configured to update, according to the first update data, second original data in a second database to obtain second update data, specifically:
and updating the second original data in the second database according to the first updating data at preset time intervals to obtain the second updating data.
In the server, the second database is updated according to the preset time interval, so that the consistency of the data information in the first database and the second database can be ensured, and errors are avoided.
In yet another alternative, the processor is further configured to delete the second update data in the second database if it is detected that a duration in which the second update data in the second database is not accessed exceeds a second preset threshold.
In the server, the memory space can be reasonably utilized by judging whether to delete the data information by detecting whether the accessed time of the data information exceeds a second preset threshold value.
In yet another alternative, the processor is further configured to, after deleting the second update data in the second database, obtain the second update data from the first database and update the second update data into the second database if a command for calling the second update data in the second database is detected.
In the server, when the data information is stored in one database through the two layers of database storage, the situation that the data information is completely lost if the data information is lost can be avoided, and the data storage persistence can be ensured. When the data in the second database is lost, the user can acquire the second data information from the first database when the user wants to call the data in the second database, so that the user satisfaction is improved.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium storing a computer program which, when executed by a processor, causes the processor to implement the method described in the first aspect or any of the alternatives of the first aspect.
In a fifth aspect, embodiments of the present application provide a computer product which, when run on a computer, causes the computer to perform the method described in the first aspect or any of the alternatives of the first aspect.
By implementing the embodiment of the application, the server obtains the first message when detecting the access command, can timely obtain the change condition of the information, and can timely update the original data by updating the first original data in the first database according to the first message. The server updates the second original data in the second database according to the first updated data to obtain second updated data, two layers of protection can be carried out on the data, and consistency of the data is guaranteed through a two-layer database updating mode, so that a user can timely acquire correct updated data information, and the user is prevented from acquiring outdated data information.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following description will simply refer to the drawings that are required to be used in the embodiments of the present application or the background art.
FIG. 1 is a schematic diagram of a data update system according to an embodiment of the present application;
FIG. 2 is a schematic flow chart of a data updating method according to an embodiment of the present application;
FIG. 3 is a schematic view of a hosting leaderboard according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a first message provided by an embodiment of the present application;
FIG. 5 is a schematic diagram of first original data in a first database according to an embodiment of the present application;
FIG. 6 is a schematic diagram of first update data in a first database according to an embodiment of the present application;
FIG. 7 is a schematic diagram of second original data in a second database according to an embodiment of the present application;
FIG. 8 is a schematic diagram of second update data in a second database according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a data updating device according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a server according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a data updating system 100 according to an embodiment of the present application, where the data updating system 100 may include at least one server 101 and at least one terminal device 102. The server can be a single server or a server cluster, and the terminal equipment can be a cellular phone, a smart phone, a tablet computer, a notebook computer, a palm computer, a mobile internet device, a wearable device and a vehicle-mounted device.
Referring to fig. 2, fig. 2 is a flowchart of a data updating method according to an embodiment of the application, and the method includes, but is not limited to, the following steps.
Step S201: the server obtains a first message when detecting a command accessed by the terminal device.
Specifically, before the server detects the access command of the terminal device, the other terminal devices have reported a large amount of data, and the large amount of data is stored in the first database and the second database and is the first original data in the first database and the second original data in the second database. For example, the first raw data in the first database is related information of all network anchors, namely, 1000 ten thousand network anchors, and the 1000 ten thousand network anchors data information includes related information of network anchors on a anchor ranking list and related information of network anchors not on the anchor ranking list. The second raw data in the second database is related information of the network anchor on the anchor ranking list, for example, the related information of the network anchor with the comprehensive score ranking of the top 200 ten thousand in the data information of the 1000 ten thousand network anchors.
If the user clicks the anchor ranking list through the terminal equipment at a certain moment and the data stored in the second database at the moment is the second original data, the server calls the second original data in the second database at the moment to respond.
The server counts the information of the network anchor, namely a first message, of which the integral changes in the first original data in the first database at intervals, the first message represents the change condition of the network anchor integral, the first message is stored in a message queue, when a user accesses a anchor ranking list through terminal equipment, the server detects a command accessed by the terminal equipment, and the first message is obtained from the message queue.
For example, as shown in fig. 3, when the user clicks on the anchor leaderboard through the terminal device, the server detects a command accessed by the terminal device, and obtains the first message. Wherein the first message is shown in fig. 4. The first message represents a network anchor with a name of great anchor, the gift is increased by 30 ten thousand, and the number of vermicelli is increased by 10 ten thousand; the network anchor name is the anchor of Zhang san, the gift receiving rate is increased by 20 ten thousand, and the number of vermicelli is reduced by 5 ten thousand; the network anchor is named as sweet anchor, the gift is increased by 50 ten thousand, and the number of vermicelli is increased by 30 ten thousand.
Step S202: and the server updates the first original data in the first database according to the first message to obtain first updated data.
In particular, the first database may be any type of database, such as MySQL database, and the first raw data refers to all relevant information of the network anchor stored in the first database. The information of the current points of all network anchor can be known through the first original data in the first database. Because the first message indicates the integral change condition of the network anchor, the first original data indicates the integral condition of the network anchor before being updated, so that the first updated data can be obtained according to the first message and the first original data, namely, the integral change condition of the network anchor and the integral condition of the network anchor before being updated are overlapped to obtain the integral condition of the network anchor after being updated, namely, the first updated data.
In an alternative solution, the first message includes a correspondence between a target network anchor name and a change score, and the server updates first original data in the first database according to the first message to obtain first update data, including:
the server searches first original data corresponding to the target network anchor name from the first database; and superposing the first original data corresponding to the target network anchor name and the change integral corresponding to the target network anchor name to obtain first updated data.
For example, if the first original data in the first database is as shown in fig. 5, the first message is as shown in fig. 4. The first message is used for knowing that the target network anchor name is the anchor of the grand owner, and the change integral is as follows: the gift receiving amount is increased by 30 ten thousand, the number of people in vermicelli is increased by 10 ten thousand, and the comprehensive integral is increased by 40; the target network anchor name is anchor of Zhang three, and the change points are as follows: the gift is increased by 20 ten thousand, the number of people in vermicelli is reduced by 5 ten thousand, and the comprehensive integral is increased by 15; the target network anchor is named as sweet anchor, and the change integral is as follows: the gift receiving rate is increased by 50 ten thousand, the number of people in vermicelli is increased by 30 ten thousand, and the comprehensive integral is increased by 80. The server searches a first database for first original data corresponding to a target network anchor name of big anchor, zhang Sanand Xiaoshan: the network anchor name is anchor of great owner, gift is 100 tens of thousands, the number of vermicelli is 100 tens of thousands, and the comprehensive integral is 200; the network anchor name is Zhang three anchor, the gift is 90 ten thousand, the number of vermicelli is 80 ten thousand, and the comprehensive integral is 170; the network anchor is named as sweet anchor, the gift is 78 ten thousand, the number of vermicelli is 80 ten thousand, and the comprehensive integral is 158; the server superimposes the first original data corresponding to the target network anchor name and the change integral corresponding to the target network anchor name to obtain first updated data, wherein the first updated data is an anchor with the network anchor name of great owner, the gift is 100 tens of thousands+30 tens of thousands=130 tens of thousands, the number of vermicelli is 100 tens of thousands+10 tens of thousands=110 tens of thousands, and the comprehensive integral is 200+40=240; the network anchor name is Zhang three anchor, the gift is 90 ten thousand+20ten thousand=110 ten thousand, the number of vermicelli is 80 ten thousand-5 ten thousand=75 ten thousand, and the comprehensive integral is 170+15=185; the network anchor is named as sweet anchor, the gift is 78 ten thousand+50 ten thousand=128 ten thousand, the number of vermicelli is 80 ten thousand+30 ten thousand=110 ten thousand, and the comprehensive integral is 158+80=238. As shown in fig. 6, fig. 6 shows first update data in the first database.
Step S203: and the server updates the second original data in the second database according to the first updated data to obtain second updated data.
In particular, the second database is any type of database, for example, a redis database. The second original data is a subset of the first original data, and the second updated data is a subset of the first updated data.
In an alternative scheme, the second original data is the network anchor information with the network anchor point in the first original data larger than the first preset threshold value, and the second updated data is the network anchor information with the network anchor point in the first updated data larger than the first preset threshold value.
For example, if the first original data in the first database is shown in fig. 5, the second original data in the second database is shown in fig. 7, the first updated data in the first database is shown in fig. 6, and the second updated data in the second database is shown in fig. 8, where the first original data refers to all relevant information of the anchor, that is, relevant information of 10 network anchors, the second original data refers to relevant information of the network anchor with the top 5 of the 10 network anchors, the first updated data refers to all relevant information of the network anchor after updating, and the second updated data refers to relevant information of the network anchor with the top 5 of the 10 network anchors after updating.
In an alternative solution, the server updates the second original data in the second database according to the first update data to obtain second update data, including:
the server searches second original data which is the same as the name of the network anchor in the first updated data and has different integration of the network anchor from the second database;
the server replaces the second original data with the same network anchor name and different network anchor points with the first updated data.
For example, if the first original data in the first database is shown in fig. 5, the second original data in the second database is shown in fig. 7, and the first updated data in the first database is shown in fig. 6, the server searches the second original data which has the same name as the webcast in the first updated data and has different webcast points from the first updated data in the second database, and the second original data has the webcast names of 100 tens of thousands, 100 tens of thousands of vermicelli numbers and 200 comprehensive points; the name of the network anchor is Zhang San, the gift is 90 ten thousand, the number of vermicelli is 80 ten thousand, and the comprehensive integral is 170; the network anchor name is sweet, the gift is 78 ten thousand, the number of vermicelli is 80 ten thousand, and the comprehensive integral is 158. The server replaces the second original data with the same network anchor name and different network anchor points with the first updated data, namely the network anchor name is big owner, the gift is 130 ten thousand, the number of vermicelli is 100 ten thousand+10ten thousand=110 ten thousand, and the comprehensive points are 200+40=240; the network anchor name is Zhang three, the gift is 90 ten thousand+20ten thousand=110 ten thousand, the number of vermicelli is 80 ten thousand-5ten thousand=75 ten thousand, and the comprehensive integral is 170+15=185; the network anchor name is sweet, the gift is 78 ten thousand+50 ten thousand=128 ten thousand, the number of vermicelli is 80 ten thousand+30 ten thousand=110 ten thousand, and the comprehensive integral is 158+80=238.
In yet another alternative, the server updates the second original data in the second database according to the first update data to obtain second update data, including:
and the server updates the second original data in the second database according to the first updated data at preset time intervals to obtain second updated data.
Specifically, the server may set a timing-triggered synchronization task, and periodically check the second update data in the first database, and synchronize the update to the second database.
For example, if the first updated data in the first database is shown in fig. 6, the second original data in the second database is shown in fig. 7, and the preset time interval is 1 minute, the server obtains the information of the anchor with the comprehensive points ranked in the top 5 in the first updated data, that is, the network anchor name is big anchor, the gift is 130 ten thousand, the number of vermicelli is 110 ten thousand, and the comprehensive points are 240; the name of the network anchor is sweet, the gift is 128 ten thousand, the number of the vermicelli is 110 ten thousand, and the integral is 238; the network anchor name is great, the gift is 80 ten thousand, the number of vermicelli is 70 ten thousand, and the comprehensive integration is 150; the network anchor name is Zhang San, the gift is 110 ten thousand, the number of vermicelli is 75 ten thousand, and the integration is 185; the network anchor name is the like, 89 ten thousand of gift are received, 70 ten thousand of vermicelli people are received, and 159 is integrated. And then the server copies the anchor information of which the comprehensive points are ranked at the top 5 in the first updated data into a second database every 1 minute, and updates the second original data to obtain second updated data. As shown in fig. 8, fig. 8 shows second update data in the second database.
In the method, the second database is updated according to the preset time interval, so that the consistency of the data information in the first database and the second database can be ensured, and errors are avoided.
In yet another alternative, if it is detected that the duration of the second update data in the second database that is not accessed exceeds a second preset threshold, the server deletes the second update data in the second database.
For example, if the second preset threshold is 1 month, the second update data in the second database is as shown in fig. 8, and if the server detects that the second update data in the second database is not accessed for more than 1 month, the server empties the second update data in the second database.
In the method, the memory space can be reasonably utilized by judging whether to delete the data information by detecting whether the accessed time of the data information exceeds the second preset threshold value.
In yet another alternative, after deleting the second update data in the second database, if a command to invoke the second update data in the second database is detected, the server obtains the second update data from the first database and updates the second update data to the second database.
For example, if the first update data in the first database is as shown in fig. 6, because the server deletes the second update data in the second database, then there is no second update data in the second server at this time. When the user clicks the anchor ranking list through the terminal equipment, the server calls second update data in the second database to respond, and if no second update data is found in the second database, the server copies the second update data from the first update data in the first database to the second database, and then calls the second update data in the second database to respond. As shown in fig. 8, fig. 8 shows second update data in the second database.
In the method, when the data information is stored in one database through the two layers of database storage, the situation that the data information is completely lost if the data information is lost can be avoided, and the persistence of the data storage can be ensured. When the data in the second database is lost, the user can acquire the second data information from the first database when the user wants to call the data in the second database, so that the user satisfaction is improved.
In the method, when the server detects the access command, the server obtains the first message, so that the change condition of the information can be timely obtained, and the first original data in the first database can be timely updated by updating the first original data according to the first message. The server updates the second original data in the second database according to the first updated data to obtain second updated data, two layers of protection can be carried out on the data, and consistency of the data is guaranteed through a two-layer database updating mode, so that a user can timely acquire correct updated data information, and the user is prevented from acquiring outdated data information.
The foregoing details of the method of embodiments of the present application are provided for the purpose of better implementing the foregoing aspects of embodiments of the present application, and accordingly, the following provides an apparatus of embodiments of the present application.
Referring to fig. 9, fig. 9 is a schematic structural diagram of a data updating apparatus 900 according to an embodiment of the present application, where the data updating apparatus may include a communication unit 901 and a processing unit 902, and the details of the respective units are as follows.
The communication unit 901 is configured to obtain a first message when an access command is detected, where the first message indicates a change situation of a network anchor point.
For example, as shown in fig. 3, when the user clicks on the anchor leaderboard through the terminal device, the server detects the access command and obtains the first message. Wherein the first message is shown in fig. 4. The first message represents a network anchor with a name of great anchor, the gift is increased by 30 ten thousand, and the number of vermicelli is increased by 10 ten thousand; the network anchor name is the anchor of Zhang san, the gift receiving rate is increased by 20 ten thousand, and the number of vermicelli is reduced by 5 ten thousand; the network anchor is named as sweet anchor, the gift is increased by 50 ten thousand, and the number of vermicelli is increased by 30 ten thousand.
The processing unit 902 is configured to update the first original data in the first database according to the first message to obtain first updated data.
The processing unit 902 is further configured to update second original data in the second database according to the first update data to obtain second update data, where the second original data is a subset of the first original data, and the second update data is a subset of the first update data.
In the device, when the server detects the access command, the server obtains the first message, so that the change condition of the information can be timely obtained, and the first original data in the first database can be timely updated by updating the first original data according to the first message. The server updates the second original data in the second database according to the first updated data to obtain second updated data, two layers of protection can be carried out on the data, and consistency of the data is guaranteed through a two-layer database updating mode, so that a user can timely acquire correct updated data information, and the user is prevented from acquiring outdated data information.
In an optional solution, the second original data is anchor information with an anchor score greater than a first preset threshold in the first original data, and the second updated data is anchor information with an anchor score greater than the first preset threshold in the first updated data.
For example, if the first original data in the first database is shown in fig. 5, the second original data in the second database is shown in fig. 7, the first updated data in the first database is shown in fig. 6, and the second updated data in the second database is shown in fig. 8, where the first original data refers to all relevant information of the network anchor, that is, relevant information of 10 network anchors, the second original data refers to relevant information of the anchor 5 above the integrated score rank in the 10 network anchors, the first updated data refers to all relevant information of the network anchor after updating, and the second updated data refers to relevant information of the network anchor 5 above the integrated score rank after updating.
In yet another alternative, the processing unit 902 is further configured to search the first database for first original data corresponding to the target network anchor name; and superposing the first original data corresponding to the target network anchor name and the change integral corresponding to the target network anchor name to obtain first updated data.
For example, if the first original data in the first database is as shown in fig. 5, the first message is as shown in fig. 4. The first message is used for knowing that the target network anchor name is the anchor of the grand owner, and the change integral is as follows: the gift receiving amount is increased by 30 ten thousand, the number of people in vermicelli is increased by 10 ten thousand, and the comprehensive integral is increased by 40; the target network anchor name is anchor of Zhang three, and the change points are as follows: the gift is increased by 20 ten thousand, the number of people in vermicelli is reduced by 5 ten thousand, and the comprehensive integral is increased by 15; the target network anchor is named as sweet anchor, and the change integral is as follows: the gift receiving rate is increased by 50 ten thousand, the number of people in vermicelli is increased by 30 ten thousand, and the comprehensive integral is increased by 80. The server searches a first database for first original data corresponding to a target network anchor name of big anchor, zhang Sanand Xiaoshan: the network anchor name is anchor of great owner, gift is 100 tens of thousands, the number of vermicelli is 100 tens of thousands, and the comprehensive integral is 200; the network anchor name is Zhang three anchor, the gift is 90 ten thousand, the number of vermicelli is 80 ten thousand, and the comprehensive integral is 170; the network anchor is named as sweet anchor, the gift is 78 ten thousand, the number of vermicelli is 80 ten thousand, and the comprehensive integral is 158; the server superimposes the first original data corresponding to the target network anchor name and the change integral corresponding to the target network anchor name to obtain first updated data, wherein the first updated data is an anchor with the network anchor name of great owner, the gift is 100 tens of thousands+30 tens of thousands=130 tens of thousands, the number of vermicelli is 100 tens of thousands+10 tens of thousands=110 tens of thousands, and the comprehensive integral is 200+40=240; the network anchor name is Zhang three anchor, the gift is 90 ten thousand+20ten thousand=110 ten thousand, the number of vermicelli is 80 ten thousand-5 ten thousand=75 ten thousand, and the comprehensive integral is 170+15=185; the network anchor is named as sweet anchor, the gift is 78 ten thousand+50 ten thousand=128 ten thousand, the number of vermicelli is 80 ten thousand+30 ten thousand=110 ten thousand, and the comprehensive integral is 158+80=238. As shown in fig. 6, fig. 6 shows first update data in the first database.
In yet another alternative, the processing unit 902 is further configured to search the second database for second original data that is the same as the name of the anchor in the first updated data and has a different anchor score; and replacing the second original data with the same network anchor name and different network anchor points with the first updated data.
For example, if the first original data in the first database is shown in fig. 5, the second original data in the second database is shown in fig. 7, and the first updated data in the first database is shown in fig. 6, the server searches the second original data which has the same name as the webcast in the first updated data and has different webcast points from the first updated data in the second database, and the second original data has the webcast names of 100 tens of thousands, 100 tens of thousands of vermicelli numbers and 200 comprehensive points; the name of the network anchor is Zhang San, the gift is 90 ten thousand, the number of vermicelli is 80 ten thousand, and the comprehensive integral is 170; the network anchor name is sweet, the gift is 78 ten thousand, the number of vermicelli is 80 ten thousand, and the comprehensive integral is 158. The server replaces the second original data with the same network anchor name and different network anchor points with the first updated data, namely the network anchor name is big owner, the gift is 130 ten thousand, the number of vermicelli is 100 ten thousand+10ten thousand=110 ten thousand, and the comprehensive points are 200+40=240; the network anchor name is Zhang three, the gift is 90 ten thousand+20ten thousand=110 ten thousand, the number of vermicelli is 80 ten thousand-5ten thousand=75 ten thousand, and the comprehensive integral is 170+15=185; the network anchor name is sweet, the gift is 78 ten thousand+50 ten thousand=128 ten thousand, the number of vermicelli is 80 ten thousand+30 ten thousand=110 ten thousand, and the comprehensive integral is 158+80=238.
In yet another alternative, the processing unit 902 is further configured to update the second original data in the second database according to the first update data at a preset time interval to obtain the second update data.
For example, if the first updated data in the first database is shown in fig. 6, the second original data in the second database is shown in fig. 7, and the preset time interval is 1 minute, the server obtains the information of the anchor with the comprehensive points ranked in the top 5 in the first updated data, that is, the network anchor name is big anchor, the gift is 130 ten thousand, the number of vermicelli is 110 ten thousand, and the comprehensive points are 240; the name of the network anchor is sweet, the gift is 128 ten thousand, the number of the vermicelli is 110 ten thousand, and the integral is 238; the network anchor name is great, the gift is 80 ten thousand, the number of vermicelli is 70 ten thousand, and the comprehensive integration is 150; the network anchor name is Zhang San, the gift is 110 ten thousand, the number of vermicelli is 75 ten thousand, and the integration is 185; the network anchor name is the like, 89 ten thousand of gift are received, 70 ten thousand of vermicelli people are received, and 159 is integrated. And then the server copies the anchor information of which the comprehensive points are ranked at the top 5 in the first updated data into a second database every 1 minute, and updates the second original data to obtain second updated data. As shown in fig. 8, fig. 8 shows second update data in the second database.
In the device, the second database is updated according to the preset time interval, so that the consistency of the data information in the first database and the second database can be ensured, and errors are avoided.
In yet another alternative, the processing unit 902 is further configured to delete the second update data in the second database if it is detected that a duration in which the second update data in the second database is not accessed exceeds a second preset threshold.
For example, if the second preset threshold is 1 month, the second update data in the second database is as shown in fig. 8, and if the server detects that the second update data in the second database is not accessed for more than 1 month, the server empties the second update data in the second database.
In the device, the memory space can be reasonably utilized by judging whether to delete the data information by detecting whether the accessed time of the data information exceeds the second preset threshold value.
In yet another alternative, the processing unit 902 is further configured to, in a case where a command for calling the second update data in the second database is detected, obtain the second update data from the first database and update the second update data into the second database.
For example, if the first update data in the first database is as shown in fig. 6, because the server deletes the second update data in the second database, then there is no second update data in the second server at this time. When the user clicks the anchor ranking list through the terminal equipment, the server calls second update data in the second database to respond, and if no second update data is found in the second database, the server copies the second update data from the first update data in the first database to the second database, and then calls the second update data in the second database to respond. As shown in fig. 8, fig. 8 shows second update data in the second database.
In the device, when the data information is stored in one database through the two layers of database storage, the situation that the data information is completely lost if the data information is lost can be avoided, and the persistence of the data storage can be ensured. When the data in the second database is lost, the user can acquire the second data information from the first database when the user wants to call the data in the second database, so that the user satisfaction is improved.
It should be noted that, in the embodiment of the present application, the specific implementation of each unit may also correspond to the corresponding description of the method embodiment shown in fig. 2.
Referring to fig. 10, fig. 10 is a schematic structural diagram of a server 1000 according to an embodiment of the invention. As shown, the server 1000 may include: at least one processor 1001, e.g. a CPU, at least one receiver 1003, at least one memory 1004, at least one transmitter 1005, at least one communication bus 1002. Wherein the communication bus 1002 is used to enable connected communication between these components. The receiver 1003 and the transmitter 1005 of the electronic device in the embodiment of the present invention may be a wired transmission port, or may be a wireless device, for example, including an antenna device, for performing signaling or data communication with other node devices. The memory 1004 may be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one disk memory. The memory 1004 may also optionally be at least one storage device located remotely from the processor 1001. The memory 1004 stores a computer program therein, and the processor 1001 is configured to call the computer program stored in the memory to:
when an access command is detected, a first message is obtained, wherein the first message represents the change condition of network anchor points;
For example, as shown in fig. 3, when the user clicks on the anchor leaderboard through the terminal device, the server detects the access command and obtains the first message. Wherein the first message is shown in fig. 4. The first message represents a network anchor with a name of great anchor, the gift is increased by 30 ten thousand, and the number of vermicelli is increased by 10 ten thousand; the network anchor name is the anchor of Zhang san, the gift receiving rate is increased by 20 ten thousand, and the number of vermicelli is reduced by 5 ten thousand; the network anchor is named as sweet anchor, the gift is increased by 50 ten thousand, and the number of vermicelli is increased by 30 ten thousand.
Updating first original data in a first database according to the first message to obtain first updated data;
and updating second original data in the second database according to the first updating data to obtain second updating data, wherein the second original data is a subset of the first original data, and the second updating data is a subset of the first updating data.
In the above server, when the server detects the access command, the server obtains the first message, so that the change condition of the information can be timely obtained, and the first original data in the first database can be timely updated by updating the first original data according to the first message. The server updates the second original data in the second database according to the first updated data to obtain second updated data, two layers of protection can be carried out on the data, and consistency of the data is guaranteed through a two-layer database updating mode, so that a user can timely acquire correct updated data information, and the user is prevented from acquiring outdated data information.
In an optional solution, the second original data is anchor information with an anchor score greater than a first preset threshold in the first original data, and the second updated data is anchor information with an anchor score greater than the first preset threshold in the first updated data.
For example, if the first original data in the first database is shown in fig. 5, the second original data in the second database is shown in fig. 7, the first updated data in the first database is shown in fig. 6, and the second updated data in the second database is shown in fig. 8, where the first original data refers to related information of all network anchors, the second original data refers to related information of network anchors 5 names before the integrated score ranking of the network anchors in the first original data, the first updated data refers to related information of all network anchors after updating, and the second updated data refers to related information of network anchors 5 names before the integrated score ranking after updating.
In yet another alternative, the first message includes a correspondence between a target network anchor name and a change score, and the processor 1001 is configured to update, according to the first message, first original data in a first database to obtain first update data, specifically:
Searching first original data corresponding to the target network anchor name from the first database;
and superposing the first original data corresponding to the target network anchor name and the change integral corresponding to the target network anchor name to obtain first updated data.
For example, if the first original data in the first database is as shown in fig. 5, the first message is as shown in fig. 4. The first message is used for knowing that the target network anchor name is the anchor of the grand owner, and the change integral is as follows: the gift receiving amount is increased by 30 ten thousand, the number of people in vermicelli is increased by 10 ten thousand, and the comprehensive integral is increased by 40; the target network anchor name is anchor of Zhang three, and the change points are as follows: the gift is increased by 20 ten thousand, the number of people in vermicelli is reduced by 5 ten thousand, and the comprehensive integral is increased by 15; the target network anchor is named as sweet anchor, and the change integral is as follows: the gift receiving rate is increased by 50 ten thousand, the number of people in vermicelli is increased by 30 ten thousand, and the comprehensive integral is increased by 80. The server searches a first database for first original data corresponding to a target network anchor name of big anchor, zhang Sanand Xiaoshan: the network anchor name is anchor of great owner, gift is 100 tens of thousands, the number of vermicelli is 100 tens of thousands, and the comprehensive integral is 200; the network anchor name is Zhang three anchor, the gift is 90 ten thousand, the number of vermicelli is 80 ten thousand, and the comprehensive integral is 170; the network anchor is named as sweet anchor, the gift is 78 ten thousand, the number of vermicelli is 80 ten thousand, and the comprehensive integral is 158; the server superimposes the first original data corresponding to the target network anchor name and the change integral corresponding to the target network anchor name to obtain first updated data, wherein the first updated data is an anchor with the network anchor name of great owner, the gift is 100 tens of thousands+30 tens of thousands=130 tens of thousands, the number of vermicelli is 100 tens of thousands+10 tens of thousands=110 tens of thousands, and the comprehensive integral is 200+40=240; the network anchor name is Zhang three anchor, the gift is 90 ten thousand+20ten thousand=110 ten thousand, the number of vermicelli is 80 ten thousand-5 ten thousand=75 ten thousand, and the comprehensive integral is 170+15=185; the network anchor is named as sweet anchor, the gift is 78 ten thousand+50 ten thousand=128 ten thousand, the number of vermicelli is 80 ten thousand+30 ten thousand=110 ten thousand, and the comprehensive integral is 158+80=238. As shown in fig. 6, fig. 6 shows first update data in the first database.
In yet another alternative, the processor 1001 is configured to update, according to the first update data, second original data in a second database to obtain second update data, specifically:
searching second original data which is the same as the name of the network anchor in the first updated data and different in network anchor points from the second database; and replacing the second original data with the same network anchor name and different network anchor points with the first updated data.
For example, if the first original data in the first database is shown in fig. 5, the second original data in the second database is shown in fig. 7, and the first updated data in the first database is shown in fig. 6, the server searches the second original data which has the same name as the webcast in the first updated data and has different webcast points from the first updated data in the second database, and the second original data has the webcast names of 100 tens of thousands, 100 tens of thousands of vermicelli numbers and 200 comprehensive points; the name of the network anchor is Zhang San, the gift is 90 ten thousand, the number of vermicelli is 80 ten thousand, and the comprehensive integral is 170; the network anchor name is sweet, the gift is 78 ten thousand, the number of vermicelli is 80 ten thousand, and the comprehensive integral is 158. The second original data with the same network anchor name and different network anchor points are replaced by the first updated data, namely the network anchor name is big owner, the gift is 130 ten thousand, the number of vermicelli is 100 ten thousand+10ten thousand=110 ten thousand, and the comprehensive points are 200+40=240; the network anchor name is Zhang three, the gift is 90 ten thousand+20ten thousand=110 ten thousand, the number of vermicelli is 80 ten thousand-5ten thousand=75 ten thousand, and the comprehensive integral is 170+15=185; the network anchor name is sweet, the gift is 78 ten thousand+50 ten thousand=128 ten thousand, the number of vermicelli is 80 ten thousand+30 ten thousand=110 ten thousand, and the comprehensive integral is 158+80=238.
In yet another alternative, the processor 1001 is configured to update, according to the first update data, second original data in a second database to obtain second update data, specifically:
and updating the second original data in the second database according to the first updating data at preset time intervals to obtain the second updating data.
For example, if the first updated data in the first database is shown in fig. 6, the second original data in the second database is shown in fig. 7, and the preset time interval is 1 minute, the server obtains the information of the anchor with the comprehensive points ranked in the top 5 in the first updated data, that is, the network anchor name is big anchor, the gift is 130 ten thousand, the number of vermicelli is 110 ten thousand, and the comprehensive points are 240; the name of the network anchor is sweet, the gift is 128 ten thousand, the number of the vermicelli is 110 ten thousand, and the integral is 238; the network anchor name is great, the gift is 80 ten thousand, the number of vermicelli is 70 ten thousand, and the comprehensive integration is 150; the network anchor name is Zhang San, the gift is 110 ten thousand, the number of vermicelli is 75 ten thousand, and the integration is 185; the network anchor name is the like, 89 ten thousand of gift are received, 70 ten thousand of vermicelli people are received, and 159 is integrated. And then the server copies the anchor information of which the comprehensive points are ranked at the top 5 in the first updated data into a second database every 1 minute, and updates the second original data to obtain second updated data. As shown in fig. 8, fig. 8 shows second update data in the second database.
In the server, the second database is updated according to the preset time interval, so that the consistency of the data information in the first database and the second database can be ensured, and errors are avoided.
In yet another alternative, the processor 1001 is further configured to delete the second update data in the second database if it is detected that a duration in which the second update data in the second database is not accessed exceeds a second preset threshold.
For example, if the second preset threshold is 1 month, the second update data in the second database is as shown in fig. 8, and if the server detects that the second update data in the second database is not accessed for more than 1 month, the server empties the second update data in the second database.
In the server, the memory space can be reasonably utilized by judging whether to delete the data information by detecting whether the accessed time of the data information exceeds a second preset threshold value.
In yet another alternative, the processor 1001 is further configured to, after deleting the second update data in the second database, obtain the second update data from the first database and update the second update data into the second database if a command for calling the second update data in the second database is detected.
For example, if the first update data in the first database is as shown in fig. 6, because the server deletes the second update data in the second database, then there is no second update data in the second server at this time. When the user clicks the anchor ranking list through the terminal equipment, the server calls second update data in the second database to respond, and if no second update data is found in the second database, the server copies the second update data from the first update data in the first database to the second database, and then calls the second update data in the second database to respond. As shown in fig. 8, fig. 8 shows second update data in the second database.
In the server, when the data information is stored in one database through the two layers of database storage, the situation that the data information is completely lost if the data information is lost can be avoided, and the data storage persistence can be ensured. When the data in the second database is lost, the user can acquire the second data information from the first database when the user wants to call the data in the second database, so that the user satisfaction is improved.
It should be noted that, in the embodiment of the present application, the specific implementation of each unit may also correspond to the corresponding description of the method embodiment shown in fig. 2.
Embodiments of the present application also provide a computer readable storage medium for storing a computer program which, when executed by a processor, causes the processor to perform the operations performed in the method embodiment shown in fig. 2.
Embodiments of the present application also provide a computer program product for performing the operations performed in the method embodiment shown in fig. 2 when the computer program product is run on a processor.
It should be noted that, for simplicity of description, the foregoing method embodiments are all expressed as a series of action combinations, but it should be understood by those skilled in the art that the present application is not limited by the order of action described, as some steps may be performed in other order or simultaneously according to the present application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required for the present application.
In the foregoing embodiments, the descriptions of the embodiments are focused on, and for those portions of one embodiment that are not described in detail, reference may be made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be implemented by a program to instruct related hardware, the program may be stored in a computer readable storage medium, and the storage medium may include: flash disk, read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), magnetic disk or optical disk.
The foregoing has described in detail the method for downloading content and the related devices and systems provided by the embodiments of the present application, and specific examples have been applied to illustrate the principles and embodiments of the present application, where the foregoing examples are only for aiding in understanding the method and core ideas of the present application; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present application. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present application, the meaning of "plurality" means at least two, for example, two, three, etc., unless specifically defined otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and further implementations are included within the scope of the preferred embodiment of the present application in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.
Logic and/or steps represented in the flowcharts or otherwise described herein, e.g., a ordered listing of executable instructions for implementing logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). In addition, the computer readable medium may even be paper or other suitable medium on which the program is printed, as the program may be electronically captured, via, for instance, optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory.
It is to be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, may be implemented using any one or combination of the following techniques, as is well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
Those of ordinary skill in the art will appreciate that all or a portion of the steps carried out in the method of the above-described embodiments may be implemented by a program to instruct related hardware, where the program may be stored in a computer readable storage medium, and where the program, when executed, includes one or a combination of the steps of the method embodiments.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing module, or each unit may exist alone physically, or two or more units may be integrated in one module. The integrated modules may be implemented in hardware or in software functional modules. The integrated modules may also be stored in a computer readable storage medium if implemented in the form of software functional modules and sold or used as a stand-alone product.
The above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, or the like. While embodiments of the present application have been shown and described above, it will be understood that the above embodiments are illustrative and not to be construed as limiting the application, and that variations, modifications, alternatives and variations may be made to the above embodiments by one of ordinary skill in the art within the scope of the application.

Claims (14)

1. A method of updating data, comprising:
when the server detects an access command, a first message is obtained, wherein the first message represents the change condition of network anchor points;
the server updates first original data in a first database according to the first message to obtain first updated data;
the server updates second original data in a second database according to the first updated data to obtain second updated data, wherein the second original data is a subset of the first original data, the second updated data is a subset of the first updated data, the first original data comprises information of current points of all network anchors, the first updated data comprises information of points of the network anchors, the change condition of the points of the network anchors is overlapped with the point condition of the network anchors before being updated to obtain the point condition of the updated network anchors, the second original data is network anchor information of which the points of the network anchors in the first original data are larger than a first preset threshold, and the second updated data is network anchor information of which the points of the network anchors in the first updated data are larger than the first preset threshold;
And when the data in the second database is lost and the second data information in the second database needs to be called, acquiring the second data information from the first database.
2. The method of claim 1, wherein the first message includes a correspondence between a target network anchor name and a change score, and wherein the server updates first original data in a first database according to the first message to obtain first updated data, including:
the server searches first original data corresponding to the target network anchor name from the first database;
and the server superimposes the first original data corresponding to the target network anchor name and the change integral corresponding to the target network anchor name to obtain the first updated data.
3. The method of claim 2, wherein the server updating the second original data in the second database according to the first updated data to obtain second updated data, comprising:
the server searches second original data which is the same as the name of the network anchor in the first updated data and has different network anchor points from the second database;
The server replaces the second original data with the same network anchor name and different network anchor points with the first updated data.
4. A method according to any one of claims 1-3, wherein the server updating the second original data in the second database according to the first update data to obtain second update data, comprising:
and the server updates the second original data in the second database according to the first updating data according to a preset time interval to obtain the second updating data.
5. A method according to any one of claims 1-3, wherein the method further comprises:
and if the fact that the duration that the second updating data in the second database is not accessed exceeds a second preset threshold value is detected, deleting the second updating data in the second database by the server.
6. The method of claim 5, wherein after the server deletes the second update data in the second database, the method further comprises:
and if a command for calling the second updating data in the second database is detected, the server acquires the second updating data from the first database and updates the second updating data into the second database.
7. A data updating apparatus, comprising:
the communication unit is used for obtaining a first message when the access command is detected, wherein the first message represents the change condition of the network anchor point;
the processing unit is used for updating the first original data in the first database according to the first message to obtain first updated data;
the processing unit is further configured to update second original data in a second database according to the first updated data to obtain second updated data, where the second original data is a subset of the first original data, the second updated data is a subset of the first updated data, the first original data includes information of current points of all network anchors, the first updated data includes information of points of the network anchors that change situation of the network anchors overlaps with points of the network anchors that are not updated to obtain points of the updated network anchors, the second original data is network anchor information that points of the network anchors in the first original data are greater than a first preset threshold, and the second updated data is network anchor information that points of the network anchors in the first updated data are greater than the first preset threshold;
And when the data in the second database is lost and the second data information in the second database needs to be called, acquiring the second data information from the first database.
8. The apparatus of claim 7, wherein the first message comprises a correspondence of a target network anchor name and a change score;
the processing unit is further configured to search, from the first database, first original data corresponding to the target network anchor name;
and the processing unit is further used for superposing the first original data corresponding to the target network anchor name and the change integral corresponding to the target network anchor name to obtain the first updated data.
9. The apparatus of claim 8, wherein the device comprises a plurality of sensors,
the processing unit is further used for searching second original data which are the same as the network anchor name in the first updated data and different in network anchor points from the second database;
the processing unit is further configured to replace second original data with the same name of the anchor and different points of the anchor with the first updated data.
10. The device according to any one of claims 7 to 9, wherein,
The processing unit is further configured to update the second original data in the second database according to the first update data at a preset time interval to obtain the second update data.
11. The device according to any one of claims 7 to 9, wherein,
the processing unit is further configured to delete the second update data in the second database if it is detected that a duration in which the second update data in the second database is not accessed exceeds a second preset threshold.
12. The apparatus of claim 11, wherein the device comprises a plurality of sensors,
the processing unit is further configured to, when a command for calling the second update data in the second database is detected, acquire the second update data from the first database and update the second update data into the second database.
13. A server, comprising: a processor, a memory, a communication interface, and a bus; the processor, the memory and the communication interface are connected through the bus and complete communication with each other; the memory stores a computer program; the processor implements the method of any one of claims 1 to 6 by executing a computer program stored in the memory.
14. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program which, when executed by a processor, causes the processor to implement the method of any one of claims 1 to 6.
CN202010118029.5A 2020-02-25 2020-02-25 Data updating method and related equipment Active CN111367922B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010118029.5A CN111367922B (en) 2020-02-25 2020-02-25 Data updating method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010118029.5A CN111367922B (en) 2020-02-25 2020-02-25 Data updating method and related equipment

Publications (2)

Publication Number Publication Date
CN111367922A CN111367922A (en) 2020-07-03
CN111367922B true CN111367922B (en) 2023-08-22

Family

ID=71206580

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010118029.5A Active CN111367922B (en) 2020-02-25 2020-02-25 Data updating method and related equipment

Country Status (1)

Country Link
CN (1) CN111367922B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111984866B (en) * 2020-08-20 2023-09-05 北京奇艺世纪科技有限公司 Ranking list generation method and device for data
CN113220779A (en) * 2021-04-27 2021-08-06 阿波罗智联(北京)科技有限公司 Data processing method, device, storage medium and program product
CN114817820B (en) * 2022-06-30 2022-10-14 深圳希施玛数据科技有限公司 Early warning method for website data upgrading and related device

Also Published As

Publication number Publication date
CN111367922A (en) 2020-07-03

Similar Documents

Publication Publication Date Title
CN111367922B (en) Data updating method and related equipment
US9558254B2 (en) Automatic wireless device data maintenance
RU2608668C2 (en) System and method for control and organisation of web-browser cache for offline browsing
US10103994B2 (en) Opportunistic network updates
US20090288004A1 (en) System, method, apparatus and computer program product for providing a notification of widget availability
CN106031127B (en) Method and apparatus for management of applications
CN113055451B (en) Resource downloading method and device, electronic equipment and storage medium
CN111143723A (en) Page jump method and device, electronic equipment and storage medium
CN110069739B (en) Page preloading method and device
CN108874426B (en) Application program updating method and device and readable storage medium
CN113961510B (en) File processing method, device, equipment and storage medium
CN104965848A (en) Front-end resource loading method and apparatus
CN107391108B (en) Notification bar information correction method and device and electronic equipment
CN104410660A (en) Method and device of downloading multimedia resources as well as router and server
CN110990825B (en) Method and device for binding recommender and recommended person, storage medium and electronic equipment
CN104063432A (en) Information searching method and information searching device
CN114257532A (en) Server side state detection method and device
CN107861732A (en) Application program silence update method and device
CN104133616A (en) Information display method and device and terminal
CN103685295A (en) Method, terminal and system for downloading multimedia files
CN106302670A (en) A kind of picture update method, communication terminal and server
CN104268206A (en) Showing method, device and mobile terminal for page resource operation interface
CN112800303B (en) Browser data storage and reading method and related device
CN115098290A (en) Intelligent artificial service method and device based on automatically updated NLP model
CN103618961A (en) Method, system and browser for displaying video title

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
TA01 Transfer of patent application right

Effective date of registration: 20210608

Address after: 25, 5th floor, shuangjingfang office building, 3 frisha street, Singapore

Applicant after: Zhuomi Private Ltd.

Address before: Room 1101, Santai Commercial Building, 139 Connaught Road, Hong Kong, China

Applicant before: HONG KONG LIVE.ME Corp.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant