CN113971195A - Data synchronization method, device, electronic equipment and medium - Google Patents

Data synchronization method, device, electronic equipment and medium Download PDF

Info

Publication number
CN113971195A
CN113971195A CN202010716142.3A CN202010716142A CN113971195A CN 113971195 A CN113971195 A CN 113971195A CN 202010716142 A CN202010716142 A CN 202010716142A CN 113971195 A CN113971195 A CN 113971195A
Authority
CN
China
Prior art keywords
data
data object
source
interface
data source
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
CN202010716142.3A
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 CN202010716142.3A priority Critical patent/CN113971195A/en
Priority to PCT/CN2021/107844 priority patent/WO2022017458A1/en
Publication of CN113971195A publication Critical patent/CN113971195A/en
Pending legal-status Critical Current

Links

Images

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/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • 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
    • 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/28Databases characterised by their database models, e.g. relational or object models
    • 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/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/283Multi-dimensional databases or data warehouses, e.g. MOLAP or ROLAP

Abstract

The embodiment of the disclosure discloses a method, a device, electronic equipment and a medium for synchronizing data. One embodiment of the method comprises: in response to detecting a change in a first data object in a first data source of a data warehouse, updating a second data object in a second data source of the data warehouse in accordance with the change in the first data object such that the second data object is consistent with the first data object; responding to the change of the second data object, updating a first interface data object based on the second data object and presenting the updated first interface data object in a first display interface corresponding to the first interface data object; the first data object and the second data object are copies of the same data object in different data sources. The embodiment realizes synchronous updating of different page data.

Description

Data synchronization method, device, electronic equipment and medium
Technical Field
Embodiments of the present disclosure relate to the field of computer technologies, and in particular, to a method, an apparatus, an electronic device, and a medium for synchronizing data.
Background
An MVVM (Model-View-ViewModel) framework is a bottom layer framework for developing Android-side presentation, and the total three layers of the MVVM framework are as follows: model (data) -View (Exhibit) -ViewModel. The communication between the ViewModel and View is no longer interface dependent. The problem of the method is that the data synchronization can not be realized at the same time in a plurality of pages. For example, in some communication applications, user a changes the avatar of the user, and only if the avatar of user a on the terminal device that changes the avatar is changed, other devices need to refresh the data to update the avatar of user a.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
It is an object of some embodiments of the present disclosure to provide a method, an apparatus, an electronic device and a medium for synchronizing data to solve the technical problems mentioned in the background section above.
In a first aspect, some embodiments of the present disclosure provide a method of synchronizing data, the method comprising: in response to detecting a change in a first data object in a first data source of a data warehouse, updating a second data object in a second data source of the data warehouse in accordance with the change in the first data object such that the second data object is consistent with the first data object; responding to the change of the second data object, updating a first interface data object based on the second data object, and presenting the updated first interface data object in a first display interface corresponding to the first interface data object; the first data object and the second data object are copies of the same data object in different data sources.
In a second aspect, some embodiments of the present disclosure provide a synchronous data device, the device comprising: an updating unit, configured to respond to the detection of the change of the first data object in the first data source of the data warehouse, and update the second data object in the second data source of the data warehouse according to the change of the first data object, so that the second data object is consistent with the first data object; the presentation unit is configured to respond to the change of the second data object, update a first interface data object based on the second data object and present the updated first interface data object in a first display interface corresponding to the first interface data object; the first data object and the second data object are copies of the same data object in different data sources.
In a third aspect, some embodiments of the present disclosure provide an electronic device, comprising: one or more processors; a storage device having one or more programs stored thereon which, when executed by one or more processors, cause the one or more processors to implement a method as in any one of the first aspects.
In a fourth aspect, some embodiments of the disclosure provide a computer readable medium having a computer program stored thereon, wherein the program when executed by a processor implements a method as in any one of the first aspect.
One of the above-described various embodiments of the present disclosure has the following advantageous effects: updating the second data object by determining that the first data object has changed, such that the second data object is consistent with the first data object. Then, it is determined that the second data object changes, the first interface data object based on the second data object is updated, and the updated first interface data object is presented in the first display interface corresponding to the first interface data object. Synchronous updating of different page data is realized.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic and that elements and elements are not necessarily drawn to scale.
FIG. 1 is a schematic diagram of one application scenario of a method of synchronizing data according to some embodiments of the present disclosure;
FIG. 2 is a flow diagram of some embodiments of a method of synchronizing data according to the present disclosure;
FIG. 3 is a flow diagram of further embodiments of a method of synchronizing data according to the present disclosure;
FIG. 4 is a schematic block diagram of some embodiments of a synchronous data device according to the present disclosure;
FIG. 5 is a schematic block diagram of some embodiments of a synchronous data device according to the present disclosure;
FIG. 6 is a structural schematic diagram of an electronic device suitable for use in implementing some embodiments of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be noted that, for convenience of description, only the relevant portions of the related invention are shown in the drawings. The embodiments and features of the embodiments in the present disclosure may be combined with each other without conflict.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
FIG. 1 is a schematic diagram of one application scenario of a method of synchronizing data according to some embodiments of the present disclosure;
in the application scenario as shown in fig. 1, first, the terminal device 101 may update the second data object 1012 in the second data source 104 of the data warehouse 102 according to the change of the first data object 1011 in response to detecting that the first data object 1011 changes in the first data source 103 of the data warehouse 102, so that the second data object 1012 is consistent with the first data object 1011. Then, in response to a change in the second data object 1012, the first interface data object 1013 based on the second data object 1012 is updated and the updated first interface data object 1014 is presented in the first display interface 105 corresponding to the first interface data object 1013. The first data object 1011 and the second data object 1012 are copies of the same data object in different data sources.
It is understood that the method of synchronizing data may be performed by the terminal device 101, or may be performed by a server, or may be performed by various software programs. The terminal device 101 may be, for example, various electronic devices having a display screen, including but not limited to a smart phone, a tablet computer, an e-book reader, a laptop portable computer, a desktop computer, and the like. Furthermore, the execution body may also be embodied as a server, software, or the like. When the execution subject is software, the software can be installed in the electronic device listed above. It may be implemented as multiple software or software modules, for example to provide distributed services, or as a single software or software module. And is not particularly limited herein.
It should be understood that the number of handsets in fig. 1 is merely illustrative. There may be any number of handsets, as desired for implementation.
With continued reference to fig. 2, a flow 200 of some embodiments of a method of synchronizing data according to the present disclosure is shown. The data synchronization method comprises the following steps:
step 201, in response to detecting that a first data object changes in a first data source of a data warehouse, updating a second data object in a second data source of the data warehouse according to the change of the first data object, so that the second data object is consistent with the first data object.
In some embodiments, an executing entity (e.g., the terminal device 101 shown in fig. 1) of the synchronized data method may update, in a second data source of the data warehouse, a second data object according to a change of a first data object when it is determined that the first data object is detected to be changed in the first data source of the data warehouse, so that the second data object is consistent with the first data object. The data warehouse may be obtained by encapsulating a local data source and a remote data source. And the data warehouse has a corresponding data access interface. The data access interface may be for connecting the data repository to a terminal device. For example, the data in the data repository may be called on the terminal device via the data access interface described above. As an example, when the avatar in the personal information of user a changes from picture a to picture B, the avatar in the personal information of user a in the second data source is updated to picture B.
In some optional implementations of some embodiments, the first data source is a remote data source, and the second data source is a local data source; or, the first data source is a local data source, and the second data source is a remote data source. The local data source comprises a local sub data source and a memory data source. The local sub-data sources may be locally stored data. The memory data source may be data stored in a memory. The remote data source may be data stored on a network. As an example, a synchronization relationship may be established for local sub-data sources, memory data sources, and remote data sources in a data warehouse. When the synchronization relationship is established, since the interfaces of the data sources may be different, the interfaces are agreed according to a protocol of a uniform key value pair, so that when any data source is updated, other data sources are automatically synchronized.
In some optional implementations of some embodiments, in response to the first data object being a set of key-value pairs, the second data object is updated in the second data source of the data warehouse according to the change of the first data object based on a key corresponding to the first data object. As an example, the user changes the username corresponding to the ID "010031" to "zhangsan" in the personal information on the terminal device, and updates the username having the ID "010031" to "zhangsan" in the second data source of the data warehouse.
In some optional implementations of some embodiments, determining condition information corresponding to the first data object; updating the second data object in the second data source of the data warehouse according to the change of the first data object based on the condition information. As an example, the condition information of the first data object may indicate that the first two digits of the IDs of the students in the student table are "01", and the first data object may be "one shift", so that the class of the student whose first two digits of the IDs of the students in the student table are "01" is updated to "one shift".
Step 202, in response to the change of the second data object, updating a first interface data object based on the second data object and presenting the updated first interface data object in a first display interface corresponding to the first interface data object.
In some embodiments, the execution subject may update a first interface data object based on the second data object and present the updated first interface data object in a first display interface corresponding to the first interface data object when it is determined that the second data object changes. The first data object and the second data object are copies of the same data object in different data sources. The first display interface may be a page for displaying the first interface data object. By way of example, taking the above example as an example, when the avatar in the personal information of user a in the second data source is updated from picture a to picture B, the first interface data object may be a second data object displayed on the terminal device, the first interface data object is updated to picture B, and picture B is presented in the first display interface corresponding to the first interface data object.
In some optional implementations of some embodiments, a target remote data source is generated; the target remote data source may be where the creation of the agent is performed for storing data. And in response to the detection of the data request aiming at the target remote data source, storing target updating data corresponding to the data request into the target local data source associated with the target remote data source and the target remote data source. The data request may refer to a request for data update of target update data in the target remote data source. The target local data source associated with the target remote data source may be a location for locally storing data of the terminal device receiving the data request. As an example, the data stored in the target remote data source may be a question and a corresponding answer, and the answer may be a word, a web page, text, or the like. The user inputs a question "maintenance method of flowers and plants" in the first display interface? The corresponding answer can be 'underwater cutting, cutting branches in water to avoid air blocking moisture absorption, prolonging the life of fresh cut flowers', 'enlarging the section, cutting the tail ends of the stems of the flowers as much as possible when cutting the flowers, aiming at increasing the water absorption function of the flowers or the flowers', 'soaking in water, wilting phenomena' of the inflorescences and leaves of the flowers after cutting the flowers due to long-distance transportation, high air temperature, long dehydration time and the like, storing the problems and the corresponding answers in the target remote data source, and storing the problems and the corresponding answers in the target local data source related to the target remote data source.
Some embodiments of the present disclosure disclose a method for synchronizing data, wherein a second data object is updated by determining that a first data object has changed, such that the second data object is consistent with the first data object. Then, it is determined that the second data object changes, the first interface data object based on the second data object is updated, and the updated first interface data object is presented in the first display interface corresponding to the first interface data object. Synchronous updating of different page data is realized.
With continued reference to fig. 3, a flow 300 of some embodiments of a method of synchronizing data according to the present disclosure is shown. The data synchronization method comprises the following steps:
step 301, in response to detecting a change in a first data object in a first data source of a data warehouse, updating a second data object in a second data source of the data warehouse according to the change in the first data object, so that the second data object is consistent with the first data object.
Step 302, in response to the change of the second data object, updating a first interface data object based on the second data object and presenting the updated first interface data object in a first display interface corresponding to the first interface data object.
In some embodiments, the specific implementation and technical effects of steps 301 and 302 may refer to steps 201 and 202 in the embodiments corresponding to fig. 2, which are not described herein again.
Step 303, in response to detecting a data update operation in a second display interface, determining the first data object corresponding to the data update operation in a second interface data object corresponding to the second display interface.
In some embodiments, an execution subject of the data synchronization method (for example, the terminal device 101 shown in fig. 1) may determine that a data update operation is detected in the second display interface, and determine the first data object corresponding to the data update operation in the second interface data object corresponding to the second display interface. The data updating operation may be data adding, data modifying, and the like performed on the second display interface. As an example, in the MVVM framework, the second display interface may belong to a View (presentation) layer, the second interface data object may belong to a ViewModel layer, and the first data object may belong to a Model (data) layer. And a user performs data updating operation on a View layer, acquires the first data object corresponding to the data updating operation, and updates the second interface data object so that the second interface data object and the first data object corresponding to the acquired data updating operation.
Step 304, updating the first data object in the first data source of the data warehouse according to the data updating operation, so that the first data object is changed.
In some embodiments, the executing entity may update the first data object in the first data source of the data warehouse according to the data update operation, so that the first data object is changed. By way of example, the user modifies the user name corresponding to the ID of 010031 from Zhang III to ' Anan ' in the second display interface of the View layer, and modifies the user name corresponding to the ID of 010031 ' in the first data source of the data warehouse to ' Anan '.
As an example, first, the user modifies the data on the display page of the View layer, and the modified data is converted into a modified data object (ViewModel) in the MVVM framework. The modified data object 401 is then stored in the data warehouse through a data access interface 402 (hierarchy), as shown in fig. 4. The data interface 402 may provide a data access interface to the View layer, and may internally access a remote/local data source through the Fetcher/Cache. The data warehouse is mainly divided into a remote data source 403(Fetcher) and a local data source 404 (Cache). The local data source may be further divided into disk405 and memory406, and the remote data source may be webservice 407. Wherein the remote data source provides an interface to remote data requests. The local data source provides an interface for access to local data. disk405, memory406, and webservice407 may each represent data sources that may request data and may continuously observe changes in the data.
As an example, data flow visualization may be implemented using JDT. The JDT may be a tool for monitoring data flow, changes, performance (duration), etc. For example, if a user performs a data adding operation on a page, the added data a is stored in all data sources in the data warehouse through the data access interface. These are usually invisible to the naked eye, and the data flow direction, data change and the like of the data inside the system can be seen through the tool. The visualization of the data flow direction can be realized, and various problems in the data change process can be more intuitively seen, so that the working efficiency is improved.
As can be seen from fig. 3, compared with the description of some embodiments corresponding to fig. 2, the process 300 of the information display method in some embodiments corresponding to fig. 3 embodies that, in response to detecting a data update operation in a second display interface, the first data object corresponding to the data update operation is determined in a second interface data object corresponding to the second display interface, and the first data object is updated in a first data source of the data warehouse. Therefore, the scheme described in the embodiments can introduce that the same data is updated in different pages, and the data can be updated in the same data warehouse.
With further reference to fig. 5, as an implementation of the above-described method for the above-described figures, the present disclosure provides some embodiments of a synchronous data device, which correspond to those of the above-described method embodiments of fig. 2, and which may be applied in various electronic devices.
As shown in fig. 5, the synchronized data device 500 of some embodiments includes: an updating unit 501 and a presentation unit 502. The updating unit 501 is configured to, in response to detecting that a first data object changes in a first data source of a data warehouse, update a second data object in a second data source of the data warehouse according to the change of the first data object, so that the second data object is consistent with the first data object; a presentation unit 502, configured to update a first interface data object based on the second data object and present the updated first interface data object in a first display interface corresponding to the first interface data object in response to a change of the second data object; the first data object and the second data object are copies of the same data object in different data sources.
In some embodiments, the synchronization data apparatus 500 is further configured to: in response to detecting a data updating operation in a second display interface, determining the first data object corresponding to the data updating operation in a second interface data object corresponding to the second display interface; and updating the first data object in the first data source of the data warehouse according to the data updating operation so as to change the first data object.
In some embodiments, the first data source is a remote data source, and the second data source is a local data source; or, the first data source is a local data source, and the second data source is a remote data source.
In some embodiments, the synchronization data apparatus 500 is further configured to: in response to the first data object being a set of key-value pairs, updating a second data object in a second data source of the data warehouse in accordance with changes to the first data object based on a key corresponding to the first data object.
In some embodiments, the synchronization data apparatus 500 is further configured to: determining condition information corresponding to the first data object; and updating the second data object in the second data source of the data warehouse according to the change of the first data object based on the condition information.
In some embodiments, the synchronization data apparatus 500 is further configured to: generating a target remote data source; and in response to the detection of the data request aiming at the target remote data source, storing target update data corresponding to the data request into the target remote data source and a target local data source associated with the target remote data source.
It will be understood that the units described in the apparatus 500 correspond to the various steps in the method described with reference to fig. 2. As such, the operations, features, and resulting benefits described above for the method are equally applicable to the device 500 and the units included therein, and are not redundantly described here.
Referring now to FIG. 6, a schematic diagram of an electronic device (e.g., server in FIG. 1) 600 suitable for use in implementing some embodiments of the present disclosure is shown. The terminal device in some embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle-mounted terminal (e.g., a car navigation terminal), and the like, and a fixed terminal such as a digital TV, a desktop computer, and the like. The terminal device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the use range of the embodiments of the present disclosure.
As shown in fig. 6, electronic device 600 may include a processing means (e.g., central processing unit, graphics processor, etc.) 601 that may 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 RAM 603, 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 RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Generally, the following devices may be connected to the I/O interface 605: 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 (LCD), a speaker, a vibrator, and the like; a storage device 608 including, for example, a memory card; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 illustrates an electronic device 600 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided. Each block shown in fig. 6 may represent one device or may represent multiple devices as desired.
In particular, according to some embodiments of the present disclosure, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, some embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such embodiments, the computer program may be downloaded and installed from a network through the communication device 609, or installed from the storage device 608, or 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 some embodiments of the present disclosure.
It should be noted that the computer readable medium described above in some 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 some 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 some embodiments of the present disclosure, however, a computer readable signal medium may include 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 (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
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 detecting a change in a first data object in a first data source of a data warehouse, updating a second data object in a second data source of the data warehouse in accordance with the change in the first data object such that the second data object is consistent with the first data object; responding to the change of the second data object, updating a first interface data object based on the second data object, and presenting the updated first interface data object in a first display interface corresponding to the first interface data object; the first data object and the second data object are copies of the same data object in different data sources.
Computer program code for carrying out operations for embodiments 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 + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
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 some embodiments of the present disclosure may be implemented by software, and may also be implemented by hardware. The described units may also be provided in a processor, and may be described as: a processor includes an update unit and a presentation unit. The names of these units do not form a limitation on the units themselves in some cases, for example, the updating unit may also be described as a "unit that updates a second data object in a second data source of the data warehouse according to a change of a first data object in response to detecting the change of the first data object in the first data source of the data warehouse, so that the second data object is consistent with the first data object".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
According to one or more embodiments of the present disclosure, there is provided a method of synchronizing data, including: in response to detecting a change in a first data object in a first data source of a data warehouse, updating a second data object in a second data source of the data warehouse in accordance with the change in the first data object, such that the second data object remains consistent with the first data object; responding to the change of the second data object, updating a first interface data object based on the second data object, and presenting the updated first interface data object in a first display interface corresponding to the first interface data object; the first data object and the second data object are copies of the same data object in different data sources.
In accordance with one or more embodiments of the present disclosure, the method further comprises: in response to detecting a data updating operation in a second display interface, determining the first data object corresponding to the data updating operation in a second interface data object corresponding to the second display interface; and updating the first data object in the first data source of the data warehouse according to the data updating operation so as to change the first data object.
According to one or more embodiments of the present disclosure, the first data source is a remote data source, and the second data source is a local data source; or, the first data source is a local data source, and the second data source is a remote data source.
In accordance with one or more embodiments of the present disclosure, in response to the first data object being a set of key-value pairs, the second data object is updated in the second data source of the data warehouse in accordance with changes to the first data object based on the key corresponding to the first data object.
According to one or more embodiments of the present disclosure, determining condition information corresponding to the first data object; updating the second data object in the second data source of the data warehouse according to the change of the first data object based on the condition information.
In accordance with one or more embodiments of the present disclosure, the method further comprises: generating a target remote data source; and in response to the detection of the data request aiming at the target remote data source, storing target update data corresponding to the data request into a target local data source associated with the target remote data source and the target remote data source.
According to one or more embodiments of the present disclosure, there is provided a synchronous data device including: an updating unit, configured to respond to the detection of the change of a first data object in a first data source of a data warehouse, and update a second data object in a second data source of the data warehouse according to the change of the first data object, so that the second data object is consistent with the first data object; the presentation unit is configured to respond to the change of the second data object, update a first interface data object based on the second data object and present the updated first interface data object in a first display interface corresponding to the first interface data object; the first data object and the second data object are copies of the same data object in different data sources.
In accordance with one or more embodiments of the present disclosure, the apparatus is further configured to: in response to detecting a data updating operation in a second display interface, determining the first data object corresponding to the data updating operation in a second interface data object corresponding to the second display interface; and updating the first data object in the first data source of the data warehouse according to the data updating operation so as to change the first data object.
According to one or more embodiments of the present disclosure, the first data source is a remote data source, and the second data source is a local data source; or, the first data source is a local data source, and the second data source is a remote data source.
In accordance with one or more embodiments of the present disclosure, in response to the first data object being a set of key-value pairs, the second data object is updated in the second data source of the data warehouse in accordance with changes to the first data object based on the key corresponding to the first data object.
According to one or more embodiments of the present disclosure, determining condition information corresponding to the first data object; updating the second data object in the second data source of the data warehouse according to the change of the first data object based on the condition information.
In accordance with one or more embodiments of the present disclosure, the apparatus is further configured to: generating a target remote data source; and in response to the detection of the data request aiming at the target remote data source, storing target update data corresponding to the data request into the target local data source associated with the target remote data source and the target remote data source.
According to one or more embodiments of the present disclosure, there is provided an electronic device including: one or more processors; a storage device having one or more programs stored thereon, which when executed by one or more processors, cause the one or more processors to implement a method as described in any of the embodiments above.
According to one or more embodiments of the present disclosure, a computer-readable medium is provided, on which a computer program is stored, wherein the program, when executed by a processor, implements the method as described in any of the embodiments above.
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 embodiments of the present disclosure is not limited to the specific combination of the above-mentioned features, and other embodiments formed by any combination of the above-mentioned features or their equivalents are also encompassed by the present invention without departing from the above-mentioned inventive concept. For example, the above features and (but not limited to) the features with similar functions disclosed in the embodiments of the present disclosure are mutually replaced to form the technical solution.

Claims (9)

1. A method of synchronizing data, comprising:
in response to detecting a change in a first data object in a first data source of a data warehouse, updating a second data object in a second data source of the data warehouse in accordance with the change in the first data object such that the second data object is consistent with the first data object;
responding to the change of the second data object, updating a first interface data object based on the second data object, and presenting the updated first interface data object in a first display interface corresponding to the first interface data object;
the first data object and the second data object are copies of the same data object in different data sources.
2. The method of claim 1, further comprising:
in response to detecting a data updating operation in a second display interface, determining a first data object corresponding to the data updating operation in a second interface data object corresponding to the second display interface;
updating the first data object in the first data source of the data warehouse according to the data updating operation, so that the first data object is changed.
3. The method of claim 1,
the first data source is a remote data source, and the second data source is a local data source;
or the like, or, alternatively,
the first data source is a local data source, and the second data source is a remote data source.
4. The method of claim 1, wherein updating the second data object in the second data source of the data warehouse in accordance with the change in the first data object comprises:
in response to the first data object being a set of key-value pairs, updating a second data object in a second data source of the data warehouse as changed by the first data object based on a key corresponding to the first data object.
5. The method of claim 1, wherein updating the second data object in the second data source of the data warehouse in accordance with the change in the first data object comprises:
determining condition information corresponding to the first data object;
updating a second data object in a second data source of the data warehouse in accordance with the change in the first data object based on the condition information.
6. The method of any one of claims 1-5, further comprising:
generating a target remote data source;
in response to detecting a data request for the target remote data source, storing target update data corresponding to the data request into the target remote data source and a target local data source associated with the target remote data source.
7. A synchronous data device, comprising:
an updating unit configured to respond to the detection of the change of a first data object in a first data source of a data warehouse, and update a second data object in a second data source of the data warehouse according to the change of the first data object so that the second data object is consistent with the first data object;
the presentation unit is configured to respond to the change of the second data object, update a first interface data object based on the second data object and present the updated first interface data object in a first display interface corresponding to the first interface data object;
the first data object and the second data object are copies of the same data object in different data sources.
8. An electronic device, 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-6.
9. 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-6.
CN202010716142.3A 2020-07-23 2020-07-23 Data synchronization method, device, electronic equipment and medium Pending CN113971195A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010716142.3A CN113971195A (en) 2020-07-23 2020-07-23 Data synchronization method, device, electronic equipment and medium
PCT/CN2021/107844 WO2022017458A1 (en) 2020-07-23 2021-07-22 Data synchronization method and apparatus, electronic device, and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010716142.3A CN113971195A (en) 2020-07-23 2020-07-23 Data synchronization method, device, electronic equipment and medium

Publications (1)

Publication Number Publication Date
CN113971195A true CN113971195A (en) 2022-01-25

Family

ID=79585303

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010716142.3A Pending CN113971195A (en) 2020-07-23 2020-07-23 Data synchronization method, device, electronic equipment and medium

Country Status (2)

Country Link
CN (1) CN113971195A (en)
WO (1) WO2022017458A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114579667A (en) * 2022-04-28 2022-06-03 深圳市华曦达科技股份有限公司 Method, device and system for incremental synchronization of HBase data

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103309818B (en) * 2012-03-09 2015-07-29 腾讯科技(深圳)有限公司 Store method and the device of data
US9165046B2 (en) * 2013-01-15 2015-10-20 Realnetworks, Inc. Core data synchronization systems and methods
CN108845856B (en) * 2018-06-11 2021-12-14 腾讯科技(深圳)有限公司 Object-based synchronous updating method and device, storage medium and equipment
CN109376163A (en) * 2018-09-18 2019-02-22 广州视源电子科技股份有限公司 A kind of method, apparatus, terminal and the storage medium of data double-way binding
CN110019279B (en) * 2019-04-11 2020-12-04 北京字节跳动网络技术有限公司 Online document collaborative updating method, device, equipment and storage medium

Also Published As

Publication number Publication date
WO2022017458A1 (en) 2022-01-27

Similar Documents

Publication Publication Date Title
CN110909521B (en) Online document information synchronous processing method and device and electronic equipment
CN110781373B (en) List updating method and device, readable medium and electronic equipment
CN115757400B (en) Data table processing method, device, electronic equipment and computer readable medium
CN111596991A (en) Interactive operation execution method and device and electronic equipment
CN111262907B (en) Service instance access method and device and electronic equipment
CN111596992B (en) Navigation bar display method and device and electronic equipment
CN112148744A (en) Page display method and device, electronic equipment and computer readable medium
CN113971195A (en) Data synchronization method, device, electronic equipment and medium
CN111756953A (en) Video processing method, device, equipment and computer readable medium
CN110619101B (en) Method and apparatus for processing information
CN114327453B (en) Page display method, device, equipment and storage medium
CN112507676B (en) Method and device for generating energy report, electronic equipment and computer readable medium
CN114428925A (en) Page rendering method and device, electronic equipment and computer readable medium
CN111460020B (en) Method, device, electronic equipment and medium for resolving message
CN110113416B (en) Method and device for displaying information
CN111580890A (en) Method, apparatus, electronic device, and computer-readable medium for processing features
CN112711457A (en) Method and device for field drawing and electronic equipment
CN110633324B (en) Method, apparatus, electronic device and computer readable medium for synchronizing data
CN112148417A (en) Page adjusting method and device, electronic equipment and computer readable medium
CN111753238A (en) Data mapping method and device and electronic equipment
CN111240657A (en) Method and device for generating SDK and electronic equipment
CN111294657A (en) Information processing method and device
CN112637048B (en) Information sending method, information sending device, electronic equipment and computer readable medium
CN112468849B (en) Method, apparatus, electronic device and medium for video information transmission
CN111400322B (en) Method, apparatus, electronic device and medium for storing data

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
CB02 Change of applicant information

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant after: Douyin Vision Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant before: Tiktok vision (Beijing) Co.,Ltd.

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant after: Tiktok vision (Beijing) Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant before: BEIJING BYTEDANCE NETWORK TECHNOLOGY Co.,Ltd.

CB02 Change of applicant information