CN111459950A - Data updating method and device - Google Patents

Data updating method and device Download PDF

Info

Publication number
CN111459950A
CN111459950A CN201910049825.5A CN201910049825A CN111459950A CN 111459950 A CN111459950 A CN 111459950A CN 201910049825 A CN201910049825 A CN 201910049825A CN 111459950 A CN111459950 A CN 111459950A
Authority
CN
China
Prior art keywords
user
data
information
terminal
user data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910049825.5A
Other languages
Chinese (zh)
Inventor
薛银松
曹圣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN201910049825.5A priority Critical patent/CN111459950A/en
Publication of CN111459950A publication Critical patent/CN111459950A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the disclosure discloses a data updating method and device. One embodiment of the method comprises: in response to receiving a user data sequence sent by a first terminal, writing the user data sequence into a cache database, wherein the user data in the user data sequence comprises a user identifier; for user data in a user data sequence in a cache database, based on a user identifier included in the user data, reading user history data associated with the user identifier from a user history database, and updating the user history data based on the user data. The embodiment realizes the updating of the user history data in the user history database. And avoid causing the loss of user data.

Description

Data updating method and device
Technical Field
The embodiment of the disclosure relates to the technical field of computers, in particular to a data updating method and device.
Background
With the increasing number of internet users, a large amount of user data is generated every moment. In some application scenarios, it is desirable to store such user data. In practice, a terminal used by a user generally uploads user data generated within a certain time to a server in batch.
Disclosure of Invention
The embodiment of the disclosure provides a data updating method and device.
In a first aspect, an embodiment of the present disclosure provides a data updating method, including: in response to receiving a user data sequence sent by a first terminal, writing the user data sequence into a cache database, wherein the user data in the user data sequence comprises a user identifier; for user data in a user data sequence in a cache database, based on a user identifier included in the user data, reading user history data associated with the user identifier from a user history database, and updating the user history data based on the user data.
In some embodiments, before for user data in a sequence of user data in a cache database, based on a user identifier included in the user data, reading user history data associated with the user identifier from a user history database, and updating the user history data based on the user data, the method further includes: in response to receiving a user data acquisition request which is sent by a second terminal and contains a user identifier, reading corresponding user history data from a user history database and reading corresponding user data from a buffer database based on the user identifier contained in the acquisition request; merging the user historical data read from the user historical database and the user data read from the buffer database to obtain target user historical data; and sending the target user history data to the second terminal.
In some embodiments, the user data includes: the type of the information received by the terminal corresponding to the user, the position information displayed by the information received by the terminal corresponding to the user, the time when the information is received by the terminal corresponding to the user, and the related information of the operation executed by the user aiming at the received information.
In some embodiments, the method further comprises: reading corresponding user history data from a user history database based on the user identifier in response to receiving an information acquisition request which is sent by a third terminal and contains the user identifier; acquiring an information set to be pushed, and determining whether the information to be pushed in the information set to be pushed meets the pushing condition or not based on the read user historical data; and responding to the determination that the pushing condition is met, and pushing the information to be pushed to the third terminal.
In a second aspect, an embodiment of the present disclosure provides a data updating apparatus, including: the writing unit is configured to write the user data sequence into the cache database in response to receiving the user data sequence sent by the first terminal, wherein the user data in the user data sequence comprises a user identifier; and the updating unit is configured to read the user history data associated with the user identification from the user history database on the basis of the user identification included in the user data sequence in the cache database, and update the user history data on the basis of the user data.
In some embodiments, the apparatus further comprises: a first reading unit configured to, in response to receiving a user data acquisition request including a user identifier sent by a second terminal, read corresponding user history data from a user history database based on the user identifier included in the acquisition request, and read corresponding user data from a cache database; the merging unit is configured to merge the user history data read from the user history database and the user data read from the buffer database to obtain target user history data; a transmitting unit configured to transmit the target user history data to the second terminal.
In some embodiments, the user data includes: the type of the information received by the terminal corresponding to the user, the position information displayed by the information received by the terminal corresponding to the user, the time when the information is received by the terminal corresponding to the user, and the related information of the operation executed by the user aiming at the received information.
In some embodiments, the apparatus further comprises: a second reading unit configured to read, in response to receiving an information acquisition request containing a user identifier sent by a third terminal, corresponding user history data from a user history database based on the user identifier; the pushing unit is configured to acquire an information set to be pushed, and for the information to be pushed in the information set to be pushed, whether the information to be pushed meets a pushing condition is determined based on the read user historical data; and responding to the determination that the pushing condition is met, and pushing the information to be pushed to the third terminal.
In a third aspect, an embodiment of the present disclosure provides a server, including: one or more processors; a storage device having one or more programs stored thereon; when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the method as described in any implementation manner of the first aspect.
In a fourth aspect, an embodiment of the disclosure provides a computer-readable medium, on which a computer program is stored, which when executed by a processor, implements the method as described in any of the implementations of the first aspect.
The method and the device provided by the embodiment of the disclosure can respond to the received user data sequence sent by the first terminal and write the user data sequence into the cache database. And then updating the user historical data in the user historical database according to the user data in the cache database. Therefore, the problem that the user data cannot be updated completely when the number of the user data in the user data sequence sent by the first terminal is large can be avoided, and the user data is prevented from being lost.
Drawings
Other features, objects, and advantages of the present disclosure will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, with reference to the accompanying drawings in which:
FIG. 1 is a diagram of an exemplary system architecture in which an embodiment of the present disclosure may be applied;
FIG. 2 is a flow diagram for one embodiment of a data update method according to the present disclosure;
FIG. 3 is an illustration of one application scenario of a data update method according to an embodiment of the present disclosure;
FIG. 4 is a flow diagram of yet another embodiment of a data update method according to the present disclosure;
FIG. 5 is a schematic block diagram illustrating one embodiment of a data update apparatus according to the present disclosure;
FIG. 6 is a schematic structural diagram of an electronic device suitable for use in implementing embodiments of the present disclosure.
Detailed Description
The present disclosure is described in further detail below with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant disclosure and that no limitation to the disclosure is intended. It should be noted that, for the convenience of description, only the parts relevant to the related disclosure are shown in the drawings.
It should be noted that, in the present disclosure, the embodiments and the features of the embodiments may be combined with each other without conflict. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 illustrates an exemplary system architecture 100 of a data update method or data update apparatus to which embodiments of the present disclosure may be applied.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, a server 105, and databases 106, 107. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have various client applications installed thereon, such as news-like applications, shopping-like applications, video-like applications, and so forth.
The terminal apparatuses 101, 102, and 103 may be hardware or software. When the terminal devices 101, 102, 103 are hardware, they may be various electronic devices supporting data transmission. When the terminal apparatuses 101, 102, 103 are software, they can be installed in the above-described electronic apparatuses. It may be implemented as multiple pieces of software or software modules (e.g., to provide distributed services) or as a single piece of software or software module. And is not particularly limited herein.
The server 105 may be a server that provides various services, such as a background server that processes data transmitted by the terminal devices 101, 102, 103. The background processing server may write the user data sequence into the cache database in response to receiving the user data sequence sent by the first terminal. And then updating the user historical data in the user historical database according to the user data in the cache database.
The databases 106, 107 may be used to store various types of data. The databases 106, 107 are communicatively connected to the server 105. As desired, may be deployed on the server 105 or on communicatively connected electronic devices. Database management software may be installed on the server 105 as desired for implementation.
It should be noted that the data updating method provided by the embodiment of the present disclosure is generally executed by the server 105, and accordingly, the data updating apparatus is generally disposed in the server 105.
The server may be hardware or software. When the server is hardware, it may be implemented as a distributed server cluster formed by multiple servers, or may be implemented as a single server. When the server is software, it may be implemented as multiple pieces of software or software modules (e.g., to provide distributed services), or as a single piece of software or software module. And is not particularly limited herein.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, databases, and servers, as desired for implementation.
With continued reference to FIG. 2, a flow 200 of one embodiment of a data update method according to the present disclosure is shown. The data updating method comprises the following steps:
step 201, in response to receiving the user data sequence sent by the first terminal, writing the user data sequence into a cache database.
In this embodiment, the user data sequence may be formed by arranging a plurality of user data in a certain order. For example, the order may be by generation time. The user data in the user data sequence comprises a user identification. The user identification may be various forms of identification, as desired. E.g., a nickname set by the user, a user number, etc. In addition, the user data may also include other types of data according to actual needs. In practice, the user data may be recorded by a terminal corresponding to the user and sent to the execution body of the data updating method (e.g., the server 105 shown in fig. 1). When sending user data, a terminal generally adopts a batch sending mode. That is, a plurality of user data recorded in a time period and arranged in sequence are simultaneously transmitted to the execution main body.
On this basis, the execution body may write the user data sequence into the cache database in response to receiving the user data sequence sent by the first terminal. The first terminal may be any terminal. The cache database may be a variety of databases for storing serialized objects. For example, a Redis database. Redis is an open source Key-Value database that provides APIs (Application Program interfaces) in multiple languages. According to actual needs, the cache database may be deployed on the execution main body, and may also be deployed on other electronic devices in communication connection.
In some optional implementations of this embodiment, the user data may further include, but is not limited to, as needed: the type or time of the information received by the terminal corresponding to the user, the position information displayed by the information received by the terminal corresponding to the user, the information related to the operation performed by the user on the received information, and the like.
Step 202, for the user data in the user data sequence in the cache database, based on the user identifier included in the user data, reading the user history data associated with the user identifier from the user history database, and updating the user history data based on the user data.
In this embodiment, for each user data in the user data sequence written in the cache database, the main body may read the user history data associated with the user identifier from the user history database according to the user identifier included in the user data. The user history database may be various pre-established databases in which user identifiers and associated user history data are stored. The user history data may include, but is not limited to: the time when the information is received by the terminal corresponding to the user, the information related to the position where the information is displayed, the operation information of the user on the information, and the like. Here, the type and number of data included in the user history data may be completely the same as or partially the same as those of data included in the user data sequence. The user history database may be disposed on the execution subject or on a communication-connected electronic device, as needed. The disclosure is not limited thereto.
Thereafter, the execution subject may update the user history data based on the user data. The execution subject may update the user history data in various ways according to the actual situation and the difference between the user data and the category and number of data included in the user history data. For example, when the user history data and the user data each include a field of a time when a terminal corresponding to a user last received information, the execution main body may replace a value in the field of the user history data with a value in the same field of the user data. For another example, when the user history data includes a field of the number of times the user receives the information, and the user data includes a corresponding identifier of the user received the information, the value in the field of the number of times the user receives the information in the user history data may be correspondingly increased.
With continued reference to fig. 3, fig. 3 is a schematic diagram of an application scenario of the data updating method according to the present embodiment. In the application scenario of fig. 3, the execution agent may be the server 301. The server 301 is connected to a first terminal (notebook computer) 302 in communication. In the present application scenario, the first terminal 302 may send the user data sequence 303 within a certain time period to the server 301. Thus, the server 301 writes the user data series 303 in the cache database 304 in response to receiving the user data series 303 transmitted by the first terminal 302. As shown, the user data sequence 303 includes two user data 3031 and 3032. Each user data comprises data corresponding to a user identifier, a field 1 and a field 2. It will be appreciated that the figure is a visual representation of the two user data 3031 and 3032 in the user data sequence 303. In practice, the user data sequences 303 are stored in the database 304 in different forms depending on the type of the database 304.
On this basis, taking the user data 3031 as an example, the server 301 may read the user history data 306 associated with the user identifier "1" from the user history database 305 according to the user identifier "1" included in the user data 3031. In the application scenario, the user history data includes data corresponding to field 1, field 2, and field 3, respectively. Thereafter, the user history data 306 is updated based on the user data 3031. In the application scenario, the value in the user history data can be updated to the value in the same field in the user data. Thus, new user history data is obtained, as shown at 307.
Similarly, the corresponding user history data may also be updated based on the user data 3032. Here, it should be noted that the user data sequence 303 may include a plurality of user data with the same user identification. For example, in the context of this application, the user identities of the two data 3031 and 3032 in the user data sequence 303 are the same. That is, the two user data 3031 and 3032 are generated by the same user operation. At this time, after the user history data 306 is updated based on the user data 3031, it is necessary to update based on the user data 3032. At this time, it is necessary to update the new user history data, that is, the user history data 307 based on the user data 3032. Resulting in updated user history data 308.
The method provided by the embodiment of the disclosure can write the user data sequence into the cache database in response to receiving the user data sequence sent by the first terminal. And then updating the user historical data in the user historical database according to the user data in the cache database. Therefore, the problem that the user data cannot be updated completely when the number of the user data in the user data sequence sent by the first terminal is large can be avoided, and the user data loss is avoided.
With further reference to FIG. 4, a flow 400 of yet another embodiment of a data update method is shown. The data updating method 400 includes the following steps:
step 401, in response to receiving the user data sequence sent by the first terminal, writing the user data sequence into a cache database.
In this embodiment, reference may be made to step 201 in the embodiment corresponding to fig. 2 for specific implementation of step 401 and technical effects brought by the implementation of step 401, which are not described herein again.
Step 402, in response to receiving a user data acquisition request which is sent by the second terminal and contains a user identifier, reading corresponding user history data from the user history database and reading corresponding user data from the cache database based on the user identifier contained in the acquisition request.
In this embodiment, the executing body of the data updating method, in response to receiving a user data acquisition request which is sent by the second terminal and contains a user identifier, reads corresponding user history data from the user history database based on the user identifier contained in the acquisition request, and reads corresponding user data from the cache database. In particular. The query can be performed in the user history database based on the user identifier to obtain the user history data corresponding to the user identifier. And inquiring from the cache database based on the user identification to obtain user data corresponding to the user identification.
In this embodiment, the second terminal may be any terminal. It is to be understood that the first and second expressions in the present disclosure are for the convenience of distinguishing and describing the terminals and do not constitute any limitation to the terminals.
Step 403, merging the user history data read from the user history database and the user data read from the buffer database to obtain the target user history data.
In this embodiment, the execution main body may merge the user history data read from the user history database and the user data read from the cache database to obtain the target user history data. According to actual needs, different modes can be adopted for combination. For example, the user identifier of one of the data may be deleted and then spliced. Of course, the two pieces of data may be used as the whole target user history data without splicing.
Step 404, sending the history data of the target user to the second terminal.
Step 405, for the user data in the user data sequence in the cache database, based on the user identifier included in the user data, reading the user history data associated with the user identifier from the user history database, and updating the user history data based on the user data.
In this embodiment, the specific implementation of step 405 and the technical effect thereof may refer to step 202 in the embodiment corresponding to fig. 2, and are not described herein again.
In some optional implementations of this embodiment, the method further includes: in response to receiving an information acquisition request which is sent by a third terminal and contains a user identifier, reading corresponding user history data from a user history database based on the user identifier; acquiring an information set to be pushed, and determining whether the information to be pushed in the information set to be pushed meets the pushing condition or not based on the read user historical data; and responding to the determination that the pushing condition is met, and pushing the information to be pushed to the third terminal.
As an example, the user history data acquired by the execution main body described above shows that the user has received a certain information three times. And the pushing conditions are as follows: when the user receiving times are less than five. At this time, since the push condition is satisfied, the information can be pushed to the third terminal.
As can be seen from fig. 4, compared with the embodiment corresponding to fig. 2, the data are respectively read from the user history database and the cache database and are merged to obtain complete user history data. The user history data loss caused by only reading data from the user history database is avoided.
With further reference to fig. 5, as an implementation of the methods shown in the above figures, the present disclosure provides a data updating apparatus, which corresponds to the method embodiment shown in fig. 2, and which is particularly applicable in various electronic devices.
As shown in fig. 5, the data updating apparatus 500 of the present embodiment includes: a write unit 501 and an update unit 502. Wherein the writing unit 501 is configured to write the user data sequence into the cache database in response to receiving the user data sequence sent by the first terminal, wherein the user data in the user data sequence comprises the user identifier. The updating unit 502 is configured to, for user data in a user data sequence in the cache database, read user history data associated with a user identifier from a user history database based on the user identifier included in the user data, and update the user history data based on the user data.
In this embodiment, specific implementations of the writing unit 501 and the updating unit 502 included in the data updating apparatus 500 and the technical effects thereof can refer to step 201 and step 202 of the embodiment corresponding to fig. 2, and are not described herein again.
In some optional implementations of this embodiment, the apparatus 500 may further include: a first reading unit (not shown in the figure), a merging unit (not shown in the figure) and a sending unit (not shown in the figure). The first reading unit is configured to respond to a user data acquisition request which is sent by the second terminal and contains a user identification, read corresponding user history data from a user history database based on the user identification contained in the acquisition request, and read corresponding user data from a buffer database. The merging unit (not shown in the figure) is configured to merge the user history data read from the user history database and the user data read from the buffer database to obtain target user history data. The transmitting unit (not shown in the figure) is configured to transmit the target user history data to the second terminal.
In some optional implementations of this embodiment, the user data may include: the information processing method comprises the steps of receiving information by a terminal corresponding to a user, displaying position information of the information received by the terminal corresponding to the user, receiving information by the terminal corresponding to the user, and performing operation on the received information by the user.
In some optional implementations of this embodiment, the apparatus 500 may further include: a second reading unit (not shown in the figure) and a pushing unit (not shown in the figure). Wherein the second reading unit (not shown in the figure) is configured to read the corresponding user history data from the user history database based on the user identifier in response to receiving the information acquisition request containing the user identifier sent by the third terminal. The pushing unit (not shown in the figure) is configured to acquire a set of information to be pushed, and for the information to be pushed in the set of information to be pushed, whether the information to be pushed meets a pushing condition is determined based on the read user history data; and responding to the determination that the pushing condition is met, and pushing the information to be pushed to the third terminal.
In this embodiment, the writing unit may write the user data sequence into the cache database in response to receiving the user data sequence sent by the first terminal. And then, the updating unit updates the user history data in the user history database according to the user data in the cache database. Therefore, the problem that the user data cannot be updated completely when the number of the user data in the user data sequence sent by the first terminal is large can be avoided, and the user data is prevented from being lost.
Referring now to FIG. 6, a schematic diagram of an electronic device (e.g., the server of FIG. 1) 600 suitable for use in implementing embodiments of the present disclosure is shown. The electronic device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 6, the electronic device 600 includes a processing means (e.g., central processing unit, graphics processor, etc.) 601 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM603, various programs and data necessary for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
In general, input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc., output devices 607 including, for example, a liquid crystal display (L CD), speaker, vibrator, etc., storage devices 608 including, for example, magnetic tape, hard disk, etc., and communication devices 609, communication devices 609 may allow electronic device 600 to communicate wirelessly or wiredly with other devices to exchange data.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 609, or may be installed from the storage means 608, or may be installed from the ROM 602. The computer program, when executed by the processing device 601, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium described in the embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In embodiments of the disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In embodiments of the present disclosure, however, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF, etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: in response to receiving a user data sequence sent by a first terminal, writing the user data sequence into a cache database, wherein the user data in the user data sequence comprises a user identifier; for the user data in the user data sequence in the cache database, based on the user identifier included in the user data, reading the user history data associated with the user identifier from the user history database, and updating the user history data based on the user data.
Computer program code for carrying out operations of the present disclosure may be written in any combination of one or more programming languages, including AN object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes a write unit and an update unit. The names of the units do not in some cases constitute a limitation on the units themselves, and for example, the writing unit may also be described as "a unit that writes a user data sequence in the cache database in response to receiving the user data sequence transmitted by the first terminal".
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is possible without departing from the inventive concept as defined above. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.

Claims (10)

1. A data update method, comprising:
in response to receiving a user data sequence sent by a first terminal, writing the user data sequence into a cache database, wherein user data in the user data sequence comprises a user identifier;
and for the user data in the user data sequence in the cache database, reading the user history data associated with the user identification from a user history database based on the user identification included in the user data, and updating the user history data based on the user data.
2. The method according to claim 1, wherein before said reading, for the user data in the user data sequence in the cache database, the user history data associated with the user identifier from the user history database based on the user identifier included in the user data, and updating the user history data based on the user data, the method further comprises:
in response to receiving a user data acquisition request which is sent by a second terminal and contains a user identifier, reading corresponding user historical data from the user historical database and reading corresponding user data from the cache database based on the user identifier contained in the acquisition request;
merging the user historical data read from the user historical database and the user data read from the cache database to obtain target user historical data;
and sending the target user history data to the second terminal.
3. The method of claim 1, wherein the user data comprises at least one of: the information processing method comprises the steps of obtaining the type of information received by a terminal corresponding to a user, the position information displayed by the information received by the terminal corresponding to the user, the time when the information is received by the terminal corresponding to the user, and the related information of the operation executed by the user aiming at the received information.
4. The method according to any one of claims 1-3, wherein the method further comprises:
in response to receiving an information acquisition request which is sent by a third terminal and contains a user identifier, reading corresponding user history data from the user history database based on the user identifier;
acquiring an information set to be pushed, and determining whether the information to be pushed in the information set to be pushed meets the pushing condition or not based on the read user historical data; and responding to the determination that the pushing condition is met, and pushing the information to be pushed to the third terminal.
5. A data update apparatus comprising:
the writing unit is configured to write a user data sequence into a cache database in response to receiving the user data sequence sent by a first terminal, wherein the user data in the user data sequence comprises a user identifier;
and the updating unit is configured to read user history data associated with the user identification from a user history database on the basis of the user identification included in the user data sequence in the cache database, and update the user history data on the basis of the user data.
6. The apparatus of claim 5, wherein the apparatus further comprises:
a first reading unit, configured to, in response to receiving a user data acquisition request containing a user identifier sent by a second terminal, read corresponding user history data from the user history database based on the user identifier contained in the acquisition request, and read corresponding user data from the cache database;
a merging unit configured to merge the user history data read from the user history database and the user data read from the cache database to obtain target user history data;
a transmitting unit configured to transmit the target user history data to the second terminal.
7. The apparatus of claim 5, wherein the user data comprises: the information processing method comprises the steps of obtaining the type of information received by a terminal corresponding to a user, the position information displayed by the information received by the terminal corresponding to the user, the time when the information is received by the terminal corresponding to the user, and the related information of the operation executed by the user aiming at the received information.
8. The apparatus of any of claims 5-7, wherein the apparatus further comprises:
a second reading unit configured to read, in response to receiving an information acquisition request containing a user identifier sent by a third terminal, corresponding user history data from the user history database based on the user identifier;
the pushing unit is configured to acquire an information set to be pushed, and for the information to be pushed in the information set to be pushed, whether the information to be pushed meets a pushing condition is determined based on the read user historical data; and responding to the determination that the pushing condition is met, and pushing the information to be pushed to the third terminal.
9. A server, comprising:
one or more processors;
a storage device having one or more programs stored thereon,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-4.
10. A computer-readable medium, on which a computer program is stored, wherein the program, when executed by a processor, implements the method of any one of claims 1-4.
CN201910049825.5A 2019-01-18 2019-01-18 Data updating method and device Pending CN111459950A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910049825.5A CN111459950A (en) 2019-01-18 2019-01-18 Data updating method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910049825.5A CN111459950A (en) 2019-01-18 2019-01-18 Data updating method and device

Publications (1)

Publication Number Publication Date
CN111459950A true CN111459950A (en) 2020-07-28

Family

ID=71682114

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910049825.5A Pending CN111459950A (en) 2019-01-18 2019-01-18 Data updating method and device

Country Status (1)

Country Link
CN (1) CN111459950A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101556591A (en) * 2008-04-09 2009-10-14 北京闻言科技有限公司 Method for efficiently writing complex contents to database
CN105989129A (en) * 2015-02-15 2016-10-05 腾讯科技(深圳)有限公司 Real-time data statistic method and device
CN107895011A (en) * 2017-11-03 2018-04-10 携程旅游网络技术(上海)有限公司 Processing method, system, storage medium and the electronic equipment of session information
CN108629029A (en) * 2018-05-09 2018-10-09 北京京东尚科信息技术有限公司 A kind of data processing method and device applied to data warehouse

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101556591A (en) * 2008-04-09 2009-10-14 北京闻言科技有限公司 Method for efficiently writing complex contents to database
CN105989129A (en) * 2015-02-15 2016-10-05 腾讯科技(深圳)有限公司 Real-time data statistic method and device
CN107895011A (en) * 2017-11-03 2018-04-10 携程旅游网络技术(上海)有限公司 Processing method, system, storage medium and the electronic equipment of session information
CN108629029A (en) * 2018-05-09 2018-10-09 北京京东尚科信息技术有限公司 A kind of data processing method and device applied to data warehouse

Similar Documents

Publication Publication Date Title
CN108282529B (en) System, method and device for publishing and subscribing data
CN109447635B (en) Information storage method and device for block chain
CN109508326B (en) Method, device and system for processing data
CN110708237A (en) Message interaction method and device, readable medium and electronic equipment
CN108011949B (en) Method and apparatus for acquiring data
CN109829164B (en) Method and device for generating text
CN111177433B (en) Method and apparatus for parallel processing of information
CN112765152B (en) Method and apparatus for merging data tables
CN111679990B (en) Test data generation method and device, readable medium and electronic equipment
CN110098998B (en) Method and apparatus for processing information
CN110909521A (en) Synchronous processing method and device for online document information and electronic equipment
CN110619100A (en) Method and apparatus for acquiring data
CN112131013A (en) Monitoring method, device, equipment and storage medium of call chain in distributed system
CN107220375B (en) Data reading and writing method and server
CN111338834A (en) Data storage method and device
CN111626802A (en) Method and apparatus for processing information
CN111459950A (en) Data updating method and device
CN112507676B (en) Method and device for generating energy report, electronic equipment and computer readable medium
CN111625745B (en) Recommendation method, recommendation device, electronic equipment and computer readable medium
CN114785770A (en) Mirror layer file sending method and device, electronic equipment and computer readable medium
CN110113416B (en) Method and device for displaying information
CN112311842A (en) Method and device for information interaction
CN112346870A (en) Model processing method and system
CN116820354B (en) Data storage method, data storage device and data storage system
CN113253991A (en) Task visualization processing method and device, electronic equipment and storage medium

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