CN111930753A - Data retrieving method and device, electronic equipment and storage medium - Google Patents

Data retrieving method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111930753A
CN111930753A CN202010967446.7A CN202010967446A CN111930753A CN 111930753 A CN111930753 A CN 111930753A CN 202010967446 A CN202010967446 A CN 202010967446A CN 111930753 A CN111930753 A CN 111930753A
Authority
CN
China
Prior art keywords
data
audio
video
target
user
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.)
Granted
Application number
CN202010967446.7A
Other languages
Chinese (zh)
Other versions
CN111930753B (en
Inventor
袁两胜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Yayue Technology Co ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202110110543.9A priority Critical patent/CN114185952A/en
Priority to CN202010967446.7A priority patent/CN111930753B/en
Publication of CN111930753A publication Critical patent/CN111930753A/en
Application granted granted Critical
Publication of CN111930753B publication Critical patent/CN111930753B/en
Priority to EP21868353.0A priority patent/EP4120096A4/en
Priority to PCT/CN2021/112005 priority patent/WO2022057525A1/en
Priority to US17/959,196 priority patent/US11829411B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/25Integrating or interfacing systems involving database management systems
    • 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/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2471Distributed queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/60Information retrieval; Database structures therefor; File system structures therefor of audio data
    • G06F16/65Clustering; Classification
    • 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/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2246Trees, e.g. B+trees
    • 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/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2255Hash tables
    • 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/40Information retrieval; Database structures therefor; File system structures therefor of multimedia data, e.g. slideshows comprising image and additional audio data
    • G06F16/48Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/75Clustering; Classification

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Software Systems (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Computational Linguistics (AREA)
  • Computing Systems (AREA)
  • Library & Information Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a data retrieval method, a data retrieval device, electronic equipment and a storage medium, wherein a target data type (the target audio and video behavior data is historical audio and video behavior data which is not stored in a database at present and is deleted from the database once) to which target audio and video behavior data of an audio and video application requested to be retrieved by a target user belongs is obtained, and the target audio and video behavior data can be searched from a block chain system for storing operation data of the audio and video application (the operation data comprises first operation data representing the audio and video behavior data of the audio and video application) according to the target data type; based on the method, the inquired target audio and video behavior data can be stored in the database, and can be returned to the audio and video application so as to be convenient for a target user to check, and the retrieval of the audio and video behavior data which is deleted from the database once is realized.

Description

Data retrieving method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of computer application technologies, and in particular, to a data retrieving method and apparatus, an electronic device, and a storage medium.
Background
With the rapid development of communication technology, the functional requirements of people on terminals such as mobile phones and computers are continuously increased, various applications based on the terminals are more and more, especially, audio and video applications become essential tools in daily work and life of people, and the audio and video behavior data of users can be generated by the operation behavior of the users on audio and video in the audio and video applications.
In the prior art, the audio and video behavior data of a user is usually stored in a database by an audio and video server. When a user requests the audio and video application to inquire the historical audio and video behavior data, the audio and video server directly inquires the data from the database and returns the data to the audio and video application, so that the user can conveniently execute subsequent operation on the inquired historical audio and video behavior data.
In addition, when the user requests the audio/video application to delete the historical audio/video behavior data, the audio/video server directly and thoroughly deletes the historical audio/video behavior data from the database, and under the condition, the user cannot request the audio/video application to retrieve the deleted historical audio/video behavior data.
Disclosure of Invention
In view of this, the present application provides a data retrieving method, an apparatus, an electronic device, and a storage medium, so as to retrieve historical audio/video behavior data that is deleted once. The technical scheme is as follows:
a method of data retrieval, comprising:
acquiring a target data type to which target audio and video behavior data of an audio and video application requested to be retrieved by a target user belongs, wherein the target audio and video behavior data is historical audio and video behavior data which is not stored in a database at present and is deleted from the database once;
searching the target audio and video behavior data from a block chain system for storing operation data of the audio and video application according to the type of the target data, wherein the operation data comprises first operation data representing the audio and video behavior data;
storing the target audio and video behavior data to the database;
and returning the target audio and video behavior data to the target user.
A data retrieval device, comprising:
the data type acquisition unit is used for acquiring a target data type to which target audio and video behavior data of the audio and video application requested to be retrieved by a target user belongs, wherein the target audio and video behavior data is historical audio and video behavior data which is not stored in a database at present and is deleted from the database once;
the data retrieving unit is used for searching the target audio and video behavior data from a block chain system used for storing the operation data of the audio and video application according to the type of the target data, wherein the operation data comprises first operation data representing the audio and video behavior data;
the data storage unit is used for storing the target audio and video behavior data to the database;
and the data return unit is used for returning the target audio and video behavior data to the target user.
An electronic device, comprising: the system comprises a processor and a memory, wherein the processor and the memory are connected through a communication bus; the processor is used for calling and executing the program stored in the memory; the memory is used for storing programs, and the programs are used for realizing the data retrieving method.
A computer-readable storage medium having stored thereon a computer program which, when loaded and executed by a processor, carries out the steps of the data retrieval method.
The application provides a data retrieval method, a data retrieval device, electronic equipment and a storage medium, wherein a target data type (the target audio and video behavior data is historical audio and video behavior data which is not stored in a database at present and is deleted from the database once) to which target audio and video behavior data of an audio and video application requested to be retrieved by a target user belongs is obtained, and the target audio and video behavior data can be searched from a block chain system for storing operation data of the audio and video application (the operation data comprises first operation data representing the audio and video behavior data of the audio and video application) according to the target data type; based on the method, the inquired target audio and video behavior data can be stored in the database, and can be returned to the audio and video application so as to be convenient for a target user to check, and the retrieval of the audio and video behavior data which is deleted from the database once is realized.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic structural diagram of an audio/video system in the prior art according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a block chain according to an embodiment of the present disclosure;
fig. 3 is a schematic diagram of a new block generation process according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a Merkle tree structure provided by an embodiment of the present application;
FIG. 5 is a schematic structural diagram of a data retrieval system according to an embodiment of the present application;
FIG. 6 is a block diagram of another data retrieval system according to an embodiment of the present disclosure;
fig. 7 is a flowchart of a data retrieving method according to an embodiment of the present application;
fig. 8 is a flowchart of a method for searching target audio/video behavior data from a blockchain system for storing operation data of an audio/video application according to a target data category according to an embodiment of the present application;
fig. 9 is a flowchart of a method for obtaining a data retrieving range indicated by a data retrieving condition according to an embodiment of the present application;
10 a-10 b are schematic diagrams of database and cache interactions provided by embodiments of the present application;
FIGS. 11 a-11 d are schematic diagrams of a data retrieving method according to an embodiment of the present application;
FIG. 12 is a schematic structural diagram of a data retrieving device according to an embodiment of the present application;
fig. 13 is a block diagram of a hardware structure of an electronic device to which a data retrieving method according to an embodiment of the present application is applied.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example (b):
fig. 1 is a schematic structural diagram of an audio/video system in the prior art according to an embodiment of the present application. As shown in fig. 1, an audio/video system in the prior art generally includes a terminal, an audio/video server, and a database, where a user may install a client (an audio/video application) on the terminal, and the audio/video server is used to provide technical support for the audio/video application.
Database (Database), which can be regarded as an electronic file cabinet in short, a place for storing electronic files, a user can add, query, update, delete, etc. to data in files. A "database" is a collection of data that is stored together in a manner that can be shared by multiple users, has as little redundancy as possible, and is independent of the application.
In the audio and video system provided by the prior art, a user generates corresponding audio and video behavior data for the operation behavior of the audio and video in the audio and video application on a terminal, and an audio and video server stores the audio and video behavior data in a database.
The user can send a data query request to the audio and video application, the audio and video server receives the data query request sent by the audio and video application, queries a request result of the data query request from the database, and returns the request result to the audio and video application.
Further, the user can also send a data deletion request to the audio and video application, the audio and video server receives the data deletion request sent by the audio and video application, and the data deleted by the data deletion request is completely deleted from the database. In this case, if the user sends a data query request for querying data that has been completely deleted from the database to the audio/video application, the audio/video server receives the data query request, and cannot query a request result of the data request from the database. Moreover, based on the existing audio and video behavior system, the user cannot find back the audio and video behavior data which is completely deleted from the database.
The embodiment of the application provides a new audio and video system, which can be called as a data retrieval system, and the data retrieval system can retrieve audio and video behavior data deleted from a database; and the retrieved audio and video behavior data can be stored in the database, so that the audio and video behavior data deleted from the database can be inquired from the database after a data inquiry request sent by a user is subsequently received.
In order to implement the data retrieving function, the block chain system is introduced into the data retrieving system according to an embodiment of the present application, and the block chain system is first described in detail.
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism and an encryption algorithm. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product services layer, and an application services layer.
The block chain underlying platform can comprise processing modules such as user management, basic service, intelligent contract and operation monitoring. The user management module is responsible for identity information management of all blockchain participants, and comprises public and private key generation maintenance (account management), key management, user real identity and blockchain address corresponding relation maintenance (authority management) and the like, and under the authorization condition, the user management module supervises and audits the transaction condition of certain real identities and provides rule configuration (wind control audit) of risk control; the basic service module is deployed on all block chain node equipment and used for verifying the validity of the service request, recording the service request to storage after consensus on the valid request is completed, for a new service request, the basic service firstly performs interface adaptation analysis and authentication processing (interface adaptation), then encrypts service information (consensus management) through a consensus algorithm, transmits the service information to a shared account (network communication) completely and consistently after encryption, and performs recording and storage; the intelligent contract module is responsible for registering and issuing contracts, triggering the contracts and executing the contracts, developers can define contract logics through a certain programming language, issue the contract logics to a block chain (contract registration), call keys or other event triggering and executing according to the logics of contract clauses, complete the contract logics and simultaneously provide the function of upgrading and canceling the contracts; the operation monitoring module is mainly responsible for deployment, configuration modification, contract setting, cloud adaptation in the product release process and visual output of real-time states in product operation, such as: alarm, monitoring network conditions, monitoring node equipment health status, and the like.
The platform product service layer provides basic capability and an implementation framework of typical application, and developers can complete block chain implementation of business logic based on the basic capability and the characteristics of the superposed business. The application service layer provides the application service based on the block chain scheme for the business participants to use.
Taking a distributed system as an example of a blockchain system, the blockchain system is composed of a plurality of nodes, when any node in the blockchain system receives input information, other nodes in the blockchain system acquire the input information according to a consensus algorithm and store the input information, so that data stored on all nodes in the blockchain system are consistent.
Each node in the blockchain system has a corresponding node identifier, and each node in the blockchain system can store node identifiers of other nodes in the blockchain system, so that the generated block can be broadcast to other nodes in the blockchain system according to the node identifiers of other nodes. Each node may maintain a node identifier list as shown in the following table, and store the node name and the node identifier in the node identifier list correspondingly. The node identifier may be an IP (Internet Protocol) address and any other information that can be used to identify the node, and table 1 only illustrates the IP address as an example.
TABLE 1
Figure 695289DEST_PATH_IMAGE001
Each node in the blockchain system stores one identical blockchain. The block chain is composed of a plurality of blocks, referring to fig. 2, the block chain is composed of a plurality of blocks, the starting block includes a block header and a block main body, the block header stores an input information characteristic value, a version number, a timestamp and a difficulty value, and the block main body stores input information; the next block of the starting block takes the starting block as a parent block, the next block also comprises a block head and a block main body, the block head stores the input information characteristic value of the current block, the block head characteristic value of the parent block, the version number, the timestamp and the difficulty value, and the like, so that the block data stored in each block in the block chain is associated with the block data stored in the parent block, and the safety of the input information in the block is ensured.
When each block in the block chain is generated, referring to fig. 3, when the node where the block chain is located receives the input information, the input information is verified, after the verification is completed, the input information is stored in the memory pool, and the hash tree for recording the input information is updated; and then, updating the updating time stamp to the time when the input information is received, trying different random numbers, and calculating the characteristic value for multiple times, so that the calculated characteristic value can meet the following formula:
Figure 819234DEST_PATH_IMAGE002
wherein the content of the first and second substances,SHA256a eigenvalue algorithm for calculating eigenvalues;version(version number) is version information of the related block protocol in the block chain;prev_hasha block header feature value of a parent block of the current block;merkle_rootis the characteristic value of the input information;ntimean update time that is an update timestamp;nbitsdetermining the current difficulty value within a period of time, and determining again after the fixed time period is exceeded;xis a random number;TARGETas a threshold value of the characteristic value, the threshold value of the characteristic value may be based onnbitsAnd (5) determining to obtain.
Therefore, when the random number meeting the formula is obtained through calculation, the information can be correspondingly stored, and the block head and the block main body are generated to obtain the current block. And then, the node where the block chain is located respectively sends the newly generated blocks to other nodes in the block chain system where the newly generated blocks are located according to the node identifications of the other nodes in the block chain system, the newly generated blocks are verified by the other nodes, and the newly generated blocks are added to the block chain stored in the newly generated blocks after the verification is completed.
Based on the above detailed description of the blockchain system introduced by the data retrieving system provided in the embodiment of the present application, the data retrieving system provided in the embodiment of the present application will now be further described. The data retrieval system provided by the embodiment of the application at least comprises a terminal, an audio and video server, a database and a block chain system, and the functions of the terminal, the audio and video server, the database and the block chain system are explained below.
The terminal is used for installing a client (audio and video application), and the client can be an application program client or a webpage version client.
The terminal may be any electronic product capable of performing human-computer interaction with a user through one or more modes of a keyboard, a touch pad, a touch screen, a remote controller, voice interaction or handwriting equipment, and the terminal may be, for example, a mobile phone, a tablet computer, a notebook computer, a palm computer, a personal computer, a smart speaker, a wearable device, a smart television, a smart watch, and the like, but is not limited thereto.
The audio and video server is used for providing technical support for the audio and video application. The audio and video server can be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, and can also be a cloud server for providing basic cloud computing services such as cloud service, a cloud database, cloud computing, cloud functions, cloud storage, network service, cloud communication, middleware service, domain name service, security service, CDN (content delivery network), big data and artificial intelligence platforms and the like. The terminal and the audio/video server may be directly or indirectly connected through wired or wireless communication, and the application is not limited herein.
The database is used for storing audio and video behavior data of the audio and video application. The database may be, for example and without limitation, an SQL database, a NoSQL database, or the like. According to the method and the device, the audio and video behavior data can be generated by the operation behavior of the user on the audio and video application on the terminal, and the data retrieval system can store the audio and video behavior data in the database. Preferably, the audio and video behavior data can be stored in the database by an audio and video server in the data retrieval system.
The blockchain located in the blockchain node of the blockchain system is used for storing the operation data of the audio and video application. That is, the operation data of the audio/video application is stored as input information into the tile body of the tile in the tile chain.
Illustratively, the operation data includes first operation data and second operation data, and the first operation data characterizes audio-video behavior data of the audio-video application. The second operation data represents operation information of the audio and video behavior data stored in the database.
The blockchain system can utilize the technical characteristics of traceability (chained structure of blocks), distributed consistency (consensus algorithm) and tamper resistance (cryptography) of the blockchain to realize the storage of the operation data of the audio and video application. The technical implementation of the above three points is described below in conjunction with the operational data of the audio-video application.
Traceability: by utilizing the chain structure of the block, if a user deletes the audio and video behavior data in the database, and the user wants to check the deleted data again, the audio and video behavior data of the user can be traced according to the chain structure.
Distributed consistency: in fact, if each node in the distributed system can guarantee fault-free operation with very strong performance (transient response, high throughput), the implementation of the consensus process is not complicated, and simply voting is performed through the multicast process. Unfortunately, in reality, such a "perfect" system does not exist, for example, there is often a delay in responding to a request, the network is interrupted, a node fails, and even a malicious node exists to intentionally destroy the system. For the operation data of the audio-video application, the condition of malicious response is not considered to exist, so in order to ensure the consistency of the system, a Raft algorithm is used as a consensus mechanism, the network organization structure under the mechanism is a master-slave mode, and failure nodes less than 1/2 can be allowed.
Tamper-proofing: the tamper resistance mainly uses encryption, a Merkle tree, distributed storage and other technologies.
For encryption, the hash value (hash value) of the account information of the user in the audio and video application is used as an encrypted key, so that for the operation data of the user in the audio and video application, when the account information of the user cannot be known, the content before encryption cannot be obtained.
A user can register in the audio and video application to obtain account information (the account information comprises an account and a password); if the user successfully logs in the audio and video application by using the account information, the user can be regarded as a login user, and the account information of the user for logging in the audio and video application can be regarded as the account information of the user in the audio and video application; if the user does not adopt the account information for successful audio and video application, the user can be considered as a user (tourist) who does not log in, under the condition, the account information used for logging in the audio and video application of the user can be considered as the equipment information of the terminal where the audio and video application used by the user is located, and the equipment information comprises the hardware equipment information of the terminal and the password distributed by the audio and video application to the hardware equipment information.
For example, the hardware device information of the terminal may be regarded as a hardware device identifier of the terminal, and the hardware device identifier of the terminal may be regarded as an account.
According to the embodiment of the application, the password of the account information can be subjected to Hash calculation to obtain the first Hash value, then the Hash calculation is carried out on the first Hash value and the account of the account information to obtain the second Hash value, the second Hash value is used for encrypting the operation data of the user, and the encrypted operation data is stored in the block chain system.
For the Merkle tree, the Merkle tree is used to ensure that the data blocks received by other nodes are not damaged and not replaced, the structure of the Merkle tree (hash tree) is shown in fig. 4, the Merkle tree is a binary tree structure and consists of a root node, a group of intermediate nodes and a group of leaf nodes, as shown in fig. 4, the leaf nodes in the Merkle tree contain the stored data or their hash values, and the non-leaf nodes (including the intermediate nodes and the root node) are the hash values of the contents of its two child nodes. Any changes to the underlying data in the Merkle tree are passed on to its parent node, which means that the value of the root of the Merkle tree actually represents a "digital digest" of all the underlying data. The distinguishing chain system can effectively achieve the purpose of preventing operation data of the audio and video application stored in the block chain system from being tampered based on encryption, a Merkle tree and distributed storage.
Based on the above description of the functions of the terminal, the audio/video server, the database, and the blockchain system that form the data retrieval system according to the embodiment of the present application, details of the detailed structures of the two data retrieval systems according to the embodiment of the present application will be described with reference to fig. 4 to 5.
Fig. 5 is a schematic structural diagram of a data retrieving system according to an embodiment of the present application.
The data retrieval system shown in fig. 5 is composed of a terminal, an audio/video server, a database and a blockchain system. The functions of the terminal, the audio/video server, the database, and the blockchain system are referred to the above description, and are not described herein again.
For example, the data retrieving method provided in the embodiment of the present application may be applied to a terminal in the data retrieving system shown in fig. 5, and may also be applied to an audio/video server in the data retrieving system shown in fig. 5.
Fig. 6 is a schematic structural diagram of another data retrieving system according to an embodiment of the present application.
The data retrieval system shown in fig. 6 is composed of a terminal, an audio/video server, a target server, a database, and a blockchain system. The functions of the terminal, the audio/video server, the database, and the blockchain system are referred to the above description, and are not described herein again.
The target server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as cloud service, a cloud database, cloud computing, a cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, CDN, big data and artificial intelligence platform.
For example, the data recovery method provided by the embodiment of the present application may be applied to a target server in a data recovery system as shown in fig. 6.
It should be noted that fig. 5-6 are only exemplary diagrams, and the types of the terminal may be various, and are not limited to the smart phone and the notebook computer in fig. 5-6. Also, only two terminals are shown in fig. 5-6, and the number of terminals in practical application may be determined according to practical situations, and is not limited to the number shown in fig. 5-6.
A data retrieving method provided by the embodiment of the present application will now be described in detail with reference to fig. 5 to 6.
The data retrieving method provided by the embodiment of the application can store audio and video behavior data generated by the operation behavior of a user on audio and video in audio and video application on the terminal into the blockchain system. That is, the first operation data stored in the blockchain system includes the audiovisual behavior data.
The data retrieval method provided by the embodiment of the application can also be used for carrying out traceability operation on the audio and video behavior data in the blockchain system to obtain traceability data, and storing the traceability data in the blockchain system. That is, the first operation data stored in the blockchain system also includes the traceback data.
Further, according to the data retrieving method provided by the embodiment of the application, the operation behavior of the user on the audio and video behavior data in the audio and video application relates to the operation on the audio and video behavior data stored in the database. Correspondingly, according to the data retrieving method provided by the embodiment of the application, the operation behavior of the user on the audio and video behavior data stored in the database generates corresponding second operation data, and the second operation data represents the operation information (namely, the operation behavior) of the user on the audio and video behavior data applied to the audio and video in the database.
According to the data retrieving method provided by the embodiment of the application, the operation data (the operation data comprises the first operation data and the second operation data) of the audio and video application are stored in the block chain system, so that the purpose of retrieving the audio and video behavior data deleted from the database from the block chain system can be achieved after the audio and video behavior data stored in the database are deleted.
For convenience of understanding, taking an example that the data recovery method provided in the embodiment of the present application is applied to an audio and video server in the data recovery system shown in fig. 5, a data recovery function implemented by the data recovery system shown in fig. 5 provided in the embodiment of the present application is described in detail.
The audio and video behavior data related to the operation behavior can be generated by the operation behavior of the user on the audio and video of the audio and video application on the terminal, and the audio and video server respectively stores the audio and video behavior data to the database and the block chain system.
In the embodiment of the application, behaviors of a user in watching, paying, presenting, exchanging and the like of the audio and video application can be regarded as operation behaviors of the user on the audio and video in the audio and video application. The user can generate audio and video behavior data for the audio and video operation behaviors in the audio and video application, and the audio and video behavior data generated by the operation behaviors of different operation types are different in data types.
For example, when the operation behavior is an audio/video viewing behavior, the operation behavior belongs to an operation type of viewing audio/video, audio/video behavior data generated by the audio/video viewing behavior may be referred to as audio/video viewing data, and the audio/video viewing data belongs to an audio/video viewing data category.
For example, when the operation behavior is an audio/video payment behavior, the operation behavior belongs to the operation type of audio/video payment, audio/video behavior data generated by the audio/video payment behavior may be referred to as audio/video purchase data, and the audio/video purchase data belongs to the category of audio/video purchase data.
For example, when the operation behavior is a payment behavior for the member right of the audio/video application (i.e., purchasing an audio/video application member), the operation behavior belongs to the operation type of the member right payment behavior, the audio/video behavior data generated by the member right payment behavior for the audio/video application may be referred to as member right purchase data, and the member right purchase data belongs to a member right purchase data category.
For example, when the operation behavior is an audio-video exchange behavior, the operation behavior belongs to the audio-video exchange operation type, audio-video behavior data generated by the audio-video exchange behavior may be referred to as audio-video exchange data, and the audio-video exchange data belongs to the audio-video exchange data category.
For example, when the operation behavior is an audio/video gift behavior, the operation behavior data is of an audio/video gift type, the audio/video behavior data generated by the audio/video gift behavior can be called as audio/video gift data, and the audio/video gift data belongs to the audio/video gift data category.
The above preferred content of the audio/video behavior data provided in the embodiment of the present application relates to the specific content of the audio/video behavior data, and the inventor can set the content according to his own needs, which is not limited herein.
It should be noted that each piece of audio/video behavior data carries a unique data identifier. Namely, the data identifications carried by different audio and video behavior data are different.
The audio and video behavior data can also carry the data generation time of the audio and video behavior data. For example, a user watches the video 1 on an audio/video application at 03/10: 00-03/11: 00 in 2020, and generates corresponding audio/video behavior data aiming at the operation behavior of the user on the video 1, wherein the generation time of data carried by the generated audio/video behavior data is 03/10: 00 in 2020 and 03/11: 00 in 2020.
The audio and video server can store the audio and video behavior data of the audio and video application to the blockchain system, can perform traceability operation on the audio and video behavior data in the blockchain system to obtain traceability data, and stores the traceability data to the blockchain system. Correspondingly, the audio and video behavior data and the source tracing data of the audio and video application in the blockchain system can be regarded as the first operation data of the blockchain system.
It should be noted that, because the audio-video behavior data is data generated by the operation behavior of the audio and video in the audio-video application, the audio-video behavior data can also be regarded as operation data.
The user can send a data query request to the audio and video application on the terminal, the audio and video server receives the data query request sent by the audio and video application, queries a request result of the data query request in the database (namely, the audio and video behavior data which are queried and indicated by the data query request are obtained from the database), returns the request result to the audio and video application, and the audio and video application displays the request result on the display interface.
The user checks the request result displayed on the display interface of the audio and video application, if the user does not need to request some audio and video behavior data in the result, the user can further send a data deletion request to the audio and video application, and the audio and video server receives the data deletion request sent by the audio and video application and completely deletes the audio and video behavior data which is indicated to be deleted by the data deletion request from the database.
It should be noted that, if the user does not need some audio/video behavior data, a data deletion request may be sent to the audio/video application, and in this case, only the audio/video behavior data that is indicated to be deleted by the data deletion request in the database is deleted, and the audio/video behavior data in the block chain system does not need to be deleted.
Further, the audio and video server can also generate second operation data related to the data deletion request, wherein the second operation data represent operation information of the audio and video behavior data of the audio and video application stored in the database. Specifically, the second operation data related to the data deletion request represents the data deletion operation on the audio and video behavior data which is indicated to be deleted by the data deletion request in the database, and the second operation data is stored in the block chain system.
Illustratively, the second operation data related to the data deletion request indicates the audio-video behavior data for which the data deletion request indicates deletion. That is, the second operation data related to the data deletion request indicates the audio-video behavior data that the data deletion operation corresponding to the data deletion request indicates deletion.
Specifically, the second operation data representing the data deletion operation may include a data identifier of each piece of audio/video behavior data that is indicated to be deleted by the data deletion operation.
For example, the data deletion request indicates to delete two pieces of audio and video behavior data, where the two pieces of audio and video behavior data are audio and video behavior data 1 and audio and video behavior data 2, respectively, a data identifier of the audio and video behavior data 1 is a data identifier 1, and a data identifier of the audio and video behavior data 2 is a data identifier 2; accordingly, the second operation data related to the data deletion request includes a data identifier 1 and a data identifier 2.
Furthermore, if the user wants to retrieve the audio and video behavior data deleted from the database, a data retrieval request can be sent to the audio and video application, the audio and video server receives the data retrieval request sent by the audio and video application, queries a request result of the data retrieval request from the blockchain system (namely, the audio and video behavior data deleted from the database is searched in the blockchain system according to the data retrieval request), and stores the searched audio and video behavior data into the database, so that the purpose of recovering the audio and video behavior data deleted from the database to the database is achieved, and the next user can directly query the recovered audio and video behavior data from the database. In addition, the audio and video server can store the searched audio and video behavior data in the database and return the searched audio and video behavior data to the audio and video application, so that the audio and video application can display the received audio and video behavior data on a display interface and can conveniently check the data by a user.
Further, the audio and video server can also generate second operation data related to the data retrieval request, wherein the second operation data represent operation information of the audio and video behavior data of the audio and video application stored in the database. Specifically, the second operation data related to the data retrieval request represents the operation of retrieving the audio and video behavior data retrieved by the data retrieval request indication to the database, and the second operation data is stored in the block chain system.
Illustratively, the second operation data related to the data retrieval request indicates the retrieved audio-video behavior data indicated by the data retrieval request. Namely, the second operation data related to the data retrieval request indicates the audio and video behavior data retrieved by the data retrieval operation indication corresponding to the data retrieval request.
Specifically, the second operation data representing the data retrieving operation may include a data identifier of each piece of audio/video behavior data that is retrieved by the data retrieving operation indication.
For example, the data retrieval request indicates to retrieve two pieces of audio and video behavior data, the two pieces of audio and video behavior data are audio and video behavior data 3 and audio and video behavior data 4, respectively, the data identifier of the audio and video behavior data 3 is a data identifier 3, the data identifier of the audio and video behavior data 4 is a data identifier 4, and correspondingly, the second operation data related to the data retrieval request includes the data identifier 3 and the data identifier 4.
The user generates audio and video behavior data for the operation behavior of audio and video in the audio and video application, the data deleting operation and the data retrieving operation can be regarded as the operation on the audio and video behavior data in the database, the second operation data representing the data deleting operation can be obtained by performing the data deleting operation on the audio and video behavior data in the database, and the second operation data representing the data retrieving operation can be obtained by performing the data retrieving operation on the audio and video behavior data in the database.
The data retrieval function provided by the application is applied to a data retrieval system, a database in the data retrieval system is used for storing audio and video behavior data stored into the data retrieval system by an audio and video server, and a block chain system in the data retrieval system is not only used for storing the audio and video behavior data stored into the data retrieval system by the audio and video server, but also used for storing traceability data and second operation data (the audio and video behavior data, the traceability data and the second operation data of the audio and video application form operation data of the audio and video application). By storing the operation data of the audio and video application in the blockchain system, the operation data can be retrieved from the blockchain system after the audio and video behavior data in the database are deleted; moreover, the user portrait analysis can be performed on the user according to the operation data of the user in the audio and video application stored in the block chain system to generate the user portrait of the user, and the accuracy of the user portrait analysis result is improved.
With reference to the data retrieving system, the following describes a data retrieving method provided in the embodiment of the present application. Specifically, fig. 7 is a flowchart of a data retrieving method according to an embodiment of the present application. The data retrieving method shown in fig. 7 is applied to an electronic device, which may be a terminal shown in fig. 5, an audio/video server shown in fig. 5, or a target server shown in fig. 6.
S701, acquiring a target data type to which target audio and video behavior data of the audio and video application requested to be retrieved by a target user belongs, wherein the target audio and video behavior data is historical audio and video behavior data which is not stored in a database at present and is deleted from the database once;
the user can use the audio and video application on the account information terminal, if the user successfully logs in the audio and video application through the account information, the user can be considered as a login user, and the account (vuid) of the account information of the user is used as the user identification of the user; if the user does not successfully log in the audio and video application through the account information, the user can be regarded as a non-logged user, and the non-logged user can be regarded as a tourist, and at this time, a hardware device identifier (guid) of a terminal where the audio and video application used for logging in by the user is located can be used as a user identifier of the user.
The method comprises the steps that a user sends a data retrieval request to an audio and video application on a terminal, wherein the data retrieval request carries a data retrieval condition, and the data retrieval condition indicates a target data type of target audio and video behavior data of the audio and video application which the user requests to retrieve, wherein the target audio and video behavior data belong to a plurality of data types. For convenience of distinguishing, the user sending the data retrieval request may be referred to as a target user, and correspondingly, the data retrieval condition carried by the data retrieval request indicates a target data category to which target audio/video behavior data of the audio/video application requested to be retrieved by the target user belongs in the multiple data categories. Further, the data retrieval condition may also carry a user identifier of the target user.
If the target user successfully logs in the audio and video application through the account information when sending the data retrieval request, the user identification in the data retrieval condition of the data retrieval request is the account in the account information; and if the target user does not successfully log in the audio and video application when sending the data retrieval request, the user identifier in the data retrieval condition carried by the data retrieval request is the hardware device identifier of the terminal for sending the data retrieval request.
In the embodiment of the application, the data retrieval request indicates that the retrieved audio and video behavior data is to be retrieved, and may also be referred to as target audio and video behavior data, and the data category to which the target audio and video behavior data belongs is referred to as a target data category. The target data type can be an audio and video watching data type, an audio and video purchasing data type, a member authority purchasing data type, an audio and video exchange data type, an audio and video gift data type and the like.
It should be noted that, the audio and video behavior data is generated by the operation behavior of the audio and video in the audio and video application by the user, and the audio and video server can store the audio and video behavior data in the database; meanwhile, the electronic device can store the audio and video behavior data to the blockchain system.
Illustratively, if the electronic device is a terminal, when the audio/video application generates audio/video behavior data, the audio/video behavior data is stored in the database by the audio/video server, and the audio/video behavior data is stored in the blockchain system by the terminal.
Illustratively, if the electronic device is an audio/video server, when the audio/video application generates audio/video behavior data, the audio/video behavior data is stored in the database by the audio/video server, and the audio/video behavior data is stored in the blockchain system by the audio/video server.
Illustratively, if the electronic device is a target server, when the audio/video application generates audio/video behavior data, the audio/video behavior data is stored in the database by the audio/video server, the audio/video behavior data is transmitted to the target server by the audio/video server, and the audio/video behavior data is stored in the block chain system by the target server.
The above are only some preferred embodiments provided by the embodiments of the present application, and regarding a specific embodiment of storing the audio/video behavior data in the blockchain system, the inventor may set the embodiments according to his own needs, which is not limited herein.
The audio and video behavior data generated in the audio and video application needs to be stored in a database and a block chain system, if the data deletion operation of a user on the audio and video behavior data generated in the audio and video application is involved, the audio and video behavior data deleted by the data deletion operation instruction in the database needs to be deleted, and the audio and video behavior data in the block chain system is not deleted.
Because the audio and video server receives the data query request sent by the user, the request result is the result of directly querying the data query request from the database. Therefore, if the data query request indicates that the queried audio/video behavior data is the audio/video behavior data deleted from the database, the audio/video server cannot query the request result of the data request.
Further, if the user needs to query the audio and video behavior data deleted from the database, a data retrieval request needs to be sent, and after the electronic device receives the data retrieval request, the electronic device queries the target audio and video behavior data (i.e., a request result of the data retrieval request) indicated by the data retrieval request. After the electronic equipment finds the request result of the data retrieval request from the block chain system, the electronic equipment can not only return the request result to the audio and video application so as to display the request result by the audio and video application, but also store the request result to the database so as to query the retrieved audio and video behavior data from the database after a subsequently received data query request.
S702, searching target audio and video behavior data from a block chain system for storing operation data of audio and video application according to the type of the target data, wherein the operation data comprises first operation data representing the audio and video behavior data;
the method comprises the steps that after receiving a data retrieval request sent by a target user, electronic equipment obtains a user identifier carried by the data retrieval request and determines a target data type to which target audio and video behavior data retrieved by the data retrieval request indication belong; target audio and video behavior data can be inquired from the blockchain system according to the target data type.
It should be noted that the blockchain system stores operation data of each user using the audio/video application. The operation data of the user comprises first operation data and second operation data of the user.
Illustratively, the first operation data of the user comprises audio-video behavior data of the user to the audio-video application. Furthermore, the electronic device can also perform traceability operation on the audio and video behavior data of the user stored in the blockchain system to obtain traceability data of the user, and store the traceability data of the user to the blockchain system. Correspondingly, the first operation data of the user can be considered to include two parts of data, one part of data is audio and video behavior data generated by the operation behavior of the user on the audio and video application, and the other part of data is user tracing data obtained by performing tracing operation on the audio and video behavior data of the user.
Illustratively, if a data deletion operation/a data retrieval operation of the audio and video behavior data by the user is involved, the electronic device generates second operation data representing operation information of the audio and video behavior data, and stores the second operation data in the block chain system.
It should be noted that, regardless of the data deletion operation of the user on the audio/video behavior data or the data retrieval operation of the user on the audio/video behavior data, the operations on the audio/video behavior data in the database are involved. For example, the data deletion operation of the user on the audio and video behavior data relates to the data deletion operation of the user on the audio and video behavior data in the database; the user retrieves the data of the audio and video behavior data, and finally stores the retrieved audio and video behavior data into the database, or the data can be regarded as the operation of the user on the audio and video behavior data in the database.
Thus, the second operational data may characterize user operational information on audio-visual behavior data in the database. Namely, the operation behavior of the user on the audio and video behavior data in the database is represented.
According to the embodiment of the application, the audio and video behavior data of all users using the audio and video application can be regarded as the audio and video behavior data of the audio and video application.
The operation data of the user corresponding to the user identification carried by the request can be retrieved from the query data in the block chain system; and inquiring the target audio and video behavior data of the user from the operation data of the user according to the target data type. For a specific process of searching the target audio/video behavior data from the block chain system according to the target data type, please refer to the detailed description of fig. 8, which is not described herein again.
S703, storing the target audio and video behavior data to a database;
and S704, returning target audio and video behavior data to the target user.
Illustratively, if the electronic device is a terminal, the electronic device may return target audio/video behavior data to the audio/video application after querying the target audio/video behavior data from the blockchain system; and storing the target audio and video behavior data to a database. In one embodiment, the terminal may first send the target audio/video behavior data to the audio/video server, and then the audio/video server stores the target audio/video behavior data in the database. In another implementation mode, the terminal directly stores the target audio and video behavior data to the database.
Illustratively, if the electronic device is an audio/video server, after the audio/video server queries the target audio/video behavior data from the blockchain system, the target audio/video behavior data can be returned to the audio/video application through the terminal, and the audio/video server can also store the target audio/video behavior data in the database.
Illustratively, if the electronic device is a target server, after the target audio/video behavior data is queried from the blockchain system, the target audio/video behavior data can be sent to the audio/video server by the target server, then the target audio/video behavior data is returned to the audio/video application by the audio/video server through the terminal, and the target audio/video data is stored in the database by the audio/video server.
According to the method and the device, after the electronic equipment finds the target audio and video behavior data from the block chain system, the found target audio and video behavior data can be returned to the audio and video application, so that the target audio and video behavior data can be conveniently displayed on a display interface of the audio and video application, and a user can conveniently check the target audio and video behavior data. In addition, after the electronic equipment finds the target audio and video behavior data from the block chain system, the target audio and video behavior data can be stored in the database, so that when a user needs to query the target audio and video behavior data, a data query request can be sent to the audio and video application, the audio and video server can directly query the target audio and video behavior data from the database in response to the data query request, and data finding in the block chain system is not needed.
A method for searching for target audio/video behavior data from a blockchain system for storing operation data of an audio/video application by an electronic device according to a target data category is described in detail below with reference to fig. 8, where as shown in fig. 8, the method includes:
s801, at least one tracing data of a target user is inquired from first operation data of audio and video application stored in a block chain system, and the tracing data is generated by tracing audio and video behavior data of the target user in the audio and video application;
the operation data of the user in the audio and video application in the blockchain system at least comprises audio and video behavior data of the user in the audio and video application. The electronic device executes a tracing operation at preset time intervals (standard time length), wherein the tracing operation involves a tracing operation for each user respectively. Taking a user as an example, the tracing operation for the user can be understood as: and carrying out tracing operation on the audio and video behavior data of the user in the audio and video application in the blockchain system to generate tracing data of the user.
Taking a user as an example, two ways of generating the traceability data of the user by performing traceability operation on the audio and video behavior data of the user in the audio and video application in the blockchain system may be as follows.
The first tracing mode is as follows: determining a time period between the current time and the last past tracing operation (the last past tracing operation time) on the user from the history; for ease of understanding, this time period may be referred to as an actual time period; and carrying out traceability operation on the audio and video behavior data of the user generated in the actual time period by the audio and video application stored in the block chain system to obtain traceability data of the user in the actual time period. The audio and video behavior data of the user generated in the actual time period by the audio and video application stored in the block chain system are counted to obtain the traceability data of the user in the actual time period.
It should be noted that, the manner of determining the audio/video behavior data of the user generated in the actual time period by the audio/video application stored in the blockchain system may be: and determining audio and video behavior data of the audio and video application of the user, wherein the data generation time stored in the blockchain system is within an actual time period.
For example, if the activation time of a data retrieval method provided in the embodiment of the present application is 10:00 on 02/03/2020; if the standard time length is 1 day, taking the user 1 as an example, performing first source tracing on the user 1 in 04 th 10:00 in 02 th in 2020, and counting all audio and video behavior data of the user 1 in audio and video application in 03 th in 02 th in 2020, 10: 00-02 th in 2020, 04 th in 04: 00 based on a block chain system; performing second source tracing on the user 1 at 10:00 of 05 month 02 in 2020, and counting all audio and video behavior data of the user 1 in audio and video application at 10:00 of 04 month 02 in 2020 and at 10:00 of 05 month 02 in 2020 based on a block chain system; performing third source tracing on the user 1 at 10:00 of 06 days of 2020, and counting all audio and video behavior data … of the user 1 in audio and video application at 10:00 of 05 days of 02 month of 2020 to 10:00 of 06 days of 02 month of 2020 based on a block chain system
The second tracing mode is as follows: and performing historical traceability operation on the audio and video behavior data of the user in the audio and video application stored in the blockchain system to generate traceability data. That is, all audio and video behavior data of the user generated in the audio and video application until now are counted, which are stored in the blockchain system, to obtain one tracing data of the user. That is, all the audio/video behavior data of the user in the history of the audio/video application stored in the blockchain system are counted to obtain one tracing data of the user.
For example, if the activation time of a data retrieval method provided in the embodiment of the present application is 10:00 on 02/03/2020; if the standard time length is 1 day, taking the user 1 as an example, performing first source tracing on the user 1 in 04 th 10:00 in 02 th in 2020, and counting all audio and video behavior data of the user 1 in audio and video application until the time of 10:00 in 04 th in 02 th in 2020 based on a block chain system; performing second source tracing on the user 1 at 10:00 of 05 of 02 month in 2020, and performing statistics based on a block chain system until 10:00 of 05 days of 02 month in 2020, wherein the user 1 has all audio and video behavior data applied to the audio and video; performing third traceability on the user 1 in 10:00 of 06 days of 02 and month in 2020, and performing statistics based on the blockchain system until 10:00 of 06 days of 02 and month in 2020, wherein the user 1 has all audio and video behavior data … in the audio and video application
It should be noted that the enabling time of the data recovery method provided by the embodiment of the present application may be considered as the time for performing the first tracing operation. The activation time of the data recovery method may be considered as the time at which the data recovery method is first applied.
According to the embodiment of the application, the server executes the source tracing operation at intervals of a preset time (standard duration), and for each source tracing operation, after the source tracing operation is executed, one source tracing data can be obtained for each user which uses the audio and video application before the source tracing operation is executed, and the obtained source tracing data of all the users is regarded as the source tracing data generated by the source tracing operation.
S802, acquiring a data retrieval range indicated by the data retrieval condition;
in the embodiment of the present application, the data retrieving condition indicates that there is a data retrieving range. For a manner of obtaining the data retrieving range indicated by the data retrieving condition, please refer to the detailed description of fig. 9, which is not described herein.
And S803, inquiring data which is located in the data retrieval range and belongs to the target data type from the at least one tracing data.
At least one tracing data of a target user is inquired from first operation data of audio and video application stored in a block chain system, and a data retrieval range indicated by a data retrieval condition is obtained; from the at least one tracing data, audio-video behavior data which is within the data retrieval range and belongs to the target data category can be inquired.
According to the method and the device, each tracing data of the target user, which is inquired from the first operation data of the audio and video application stored in the blockchain system, can be regarded as at least one tracing data of the target user.
According to the first tracing mode, at least one tracing data of a target user is inquired from first operation data of audio and video application stored in a block chain system, actual time periods corresponding to each tracing data in the at least one tracing data are different, and time overlapping does not exist between the actual time periods corresponding to different tracing data in the at least one tracing data. Correspondingly, the manner of querying the audio/video behavior data which is located in the data retrieval range and belongs to the target data category from the at least one tracing data may be: the method comprises the steps of acquiring a data retrieval range indicating data generation time of retrieved audio and video behavior data (namely determining data generation time of target audio and video behavior data), determining tracing data matched with the acquired data generation time in at least one tracing data (for convenience of distinguishing, the determined tracing data are called as first tracing data), and inquiring the audio and video behavior data which are located in the data retrieval range and belong to the target data type from the first tracing data.
The method for determining the tracing data matched with the data generation time in the at least one tracing data may be as follows: determining an actual time period corresponding to each tracing data in at least one tracing data, acquiring each actual time period of the data generation time from each determined actual time period, and determining the obtained tracing data of each actual time period as one tracing data matched with the data generation time.
In this embodiment of the application, the manner of obtaining each actual time period in which the data generation time is located from each determined actual time period may be: and if the determined actual time period is overlapped with the data generation time, the determined actual time period is considered as the actual time period of the data generation time.
For example, if the at least one piece of tracing data includes tracing data with an actual time period of 10:00-11:00, tracing data with an actual time period of 11:00-12:00, and tracing data with an actual time period of 12:00-13:00, and if the data generation time is 10:30-11:30, the tracing data matched with the data generation time in the at least one piece of tracing data includes tracing data with an actual time period of 10:00-11:00 and tracing data with an actual time period of 11:00-12: 00. It should be noted that there is no time overlap between 10:00-11:00 and 11:00-12:00, and there is no time overlap between 11:00-12:00 and 12:00-13: 00. For example, 10:00-11:00 may exclude 11: 00; 11:00-12:00 may exclude 12: 00.
For the second tracing manner, the manner of querying the audio/video behavior data which is located in the data retrieval range and belongs to the target data category from at least one tracing data may be: determining historical recently-generated tracing data in the at least one tracing data (for convenience of distinguishing, the historical recently-generated tracing data in the at least one tracing data is called second tracing data); and querying data which is located in the data recovery range and belongs to the target data category from the second tracing data.
In the second tracing method, the execution time of the tracing operation is proportional to the generation time of the tracing data generated by the tracing operation. That is, the later the traceback operation is performed, the later the generation time of the traceback data generated by the traceback operation is. In this way, historical newly generated tracing data is searched from the at least one tracing data of the target user, and the historical newly generated tracing data is the latest generated tracing data in the at least one tracing data of the target user.
The later the tracing operation is performed, the more audio and video behavior data are included in the generated tracing data. For example, tracing the source of the user 1 at 10:00 of 03/02/2020, and obtaining source tracing data 1 from all audio and video behavior data of the user 1 in audio and video application based on block chain system statistics until 10:00 of 03/02/2020; tracing the source of the user 1 at 03/10: 00 of 2020, and obtaining source tracing data 2 from all audio and video behavior data of the audio and video application by the user 1 based on block chain system statistics until 03/10: 00 of 2020, wherein the source tracing data 1 is included in the source tracing data 2.
In the embodiment of the application, data belonging to the target data category is queried from the first tracing data/the second tracing data, and data located in the data retrieval range is further queried from the queried data, and the data located in the data retrieval range can be considered as target audio and video behavior data retrieved by the data retrieval request. The data recovery is realized based on the traceability data, data traceability of the audio and video behavior data stored in the block chain system is not needed in the data recovery process, and the data recovery efficiency can be effectively improved.
In the embodiment of the present application, please refer to fig. 9 for a method for acquiring a data retrieving range indicated by a data retrieving condition by an electronic device. Specifically, fig. 9 is a flowchart of a method for obtaining a data retrieving range indicated by a data retrieving condition according to an embodiment of the present application.
As shown in fig. 9, the method includes:
s901, detecting whether the data retrieval condition indicates a target data deleting operation; if the data retrieval condition indicates a target data deletion operation, executing step S902; if the data retrieval condition does not indicate the target data deletion operation, step S903 is executed;
when the target user sends the data retrieval request to the audio and video application, the data retrieval request can be sent based on the selected data deleting operation, so that the data retrieval condition carried by the data retrieval request is related to the selected data deleting operation. For the sake of convenience of distinction, the data deletion operation selected by the target user is referred to as a target data deletion operation.
And the target data deleting operation is a historical data deleting operation which is executed by the audio and video behavior data in the database by the target user requesting the audio and video application.
For example, the target data deleting operation selected by the target user may be a data deleting operation executed last time by the target user history, a data deleting operation executed last 3 times by the target user history, a data deleting operation executed last 10 times by the target user history, and the like. The specific content target user related to the target data deleting operation may be set according to the requirement of the user, which is not limited herein.
S902; target second operation data representing target data deletion operation are inquired from second operation data of the audio and video application stored in the block chain system;
in the embodiment of the application, if the data retrieval condition indicates a target data deletion operation, the operation data of the target user stored in the blockchain system may be determined first, the second operation data of the target user is determined from the operation data of the target user, and then the second operation data representing the target data deletion operation is queried from the second operation data of the target user, so that the queried second operation data representing the target data deletion operation may be referred to as target second operation data for convenience of distinguishing.
S903, acquiring a target data identifier of the audio and video behavior data deleted by the target data deleting operation request from the target second operation data;
in the embodiment of the application, the second operation data includes a data identifier of audio and video behavior data which is represented by the second operation data and indicates deletion of data deletion operation. Based on this, the data identifier included in the target second operation data may be acquired (for convenience of distinction, the data identifier included in the acquired target second operation data may be referred to as a target data identifier), and the target data identifier may be determined as the data retrieval range indicated by the data retrieval condition.
Correspondingly, if the data retrieval range is the target data identifier, the data belonging to the target data category is queried from the first tracing data/the second tracing data, and the manner of further querying the data located in the data retrieval range from the queried data may be: and querying data belonging to the target data type from the first tracing data/the second tracing data, and acquiring data carrying the target data identifier from the queried data.
And S904, acquiring a data retrieval time range indicated by the data retrieval condition, wherein the data retrieval time range is related to the data generation time of the target audio and video behavior data.
Further, if the data retrieving condition does not indicate the target data deleting operation, it is determined whether the data retrieving condition carries time information characterizing the data retrieving time range, and if the data retrieving condition carries the time information characterizing the data retrieving time range, the time information carried by the data retrieving condition is acquired (the time information carried by the data retrieving condition can be regarded as the data retrieving time range indicated by the data retrieving condition); and if the data recovery condition does not carry time information representing the data recovery time range, determining the history as the data recovery time range indicated by the data recovery condition.
Correspondingly, if the data retrieval range is the data retrieval time range, the data belonging to the target data category is queried from the first tracing data/the second tracing data, and the manner of further querying the data located in the data retrieval range from the queried data may be: and querying data belonging to the target data category from the first tracing data/the second tracing data, and further querying data located in the data retrieval time range from the queried data. That is, data whose query data generation time is within the data retrieval time range.
In one embodiment, if there is time overlap between the data generation time of the audio/video data and the data recovery time range, the audio/video data is considered as data within the data recovery time range.
In another embodiment, if the data generation time of the audio and video data is completely covered by the data retrieval time range, the audio and video data is considered as the data in the data retrieval time range. And the data generating time of the audio and video data is overlapped with the data retrieving time range, but the data generating time of the audio and video data is not completely covered by the data retrieving time, and the audio and video data is not considered as the data in the data retrieving time range.
It should be noted that, as long as the same time exists between two time periods, the two time periods can be considered to have time overlap; a time range characterized by one time period (first time period) may be considered to cover a second time period if it covers a time range characterized by another time period (second time period).
The above are only two preferred implementations for determining whether the audio and video data is located in the data retrieval time range provided by the embodiment of the present application, and the inventor may set the two preferred implementations according to his own needs, which is not limited herein, regarding the specific implementation for determining whether the audio and video data is located in the data retrieval time range.
In the embodiment of the application, when a target user sends a data retrieval request to an audio/video application, if the data retrieval request is sent based on a selected data deletion operation, a data retrieval condition carried by the data retrieval request is related to the selected data deletion operation; if the data retrieval request is sent based on the selected data retrieval time range, the data retrieval condition carried by the data retrieval request is related to the selected data retrieval time range.
Further, if the target user does not select the data deleting operation nor the data retrieving time range when sending the data retrieving request, the data retrieving condition carried by the data retrieving request sent by the target user indicates a default data retrieving time range, and the default data retrieving time range is history. That is, the time when the target user uses the audio/video application for the first time is taken as a starting time point, the time when the data retrieval request sent by the target user is currently received is taken as an ending time point, and a time period formed by the starting time point and the ending time point can be regarded as history.
The embodiment of the application can realize different data retrieval scenes based on different setting modes of the data retrieval range. Correspondingly, more data retrieving ways are provided for the user at the audio and video application side, and the convenience of retrieving the user data is improved.
Based on the above detailed description of the data retrieving method and system provided in the embodiments of the present application, the database in the data retrieving system is further described. The database is used for storing audio and video behavior data; for example, mysql is used for storing audio and video behavior data of a user, and in terms of storage design, a user account number vuid is used as an identifier for a logged-in user, and a device guid is used as an identifier for an unregistered user. In the mysql table, taking the audio and video viewing data as an example, the structure of the table for logging in the audio and video viewing data of the user can be shown in table 2:
TABLE 2 Table structure of audio/video viewing data of logged-in user
Figure 152127DEST_PATH_IMAGE003
In addition, the database provided by the embodiment of the application is designed based on the user scale and the request amount as follows:
1. since the number of users or devices is in billions, tables are divided in storage design into 512 tables in accordance with the dimension of vuid.
2. The design of the database is separated from reading and writing, and for an online query interface, a request is made for reading the database (the user checks historical data), and for an online writing request (when the user plays a video, the historical data is deleted), a request is made for writing the database.
3. Data redundancy, in order to prevent data loss, the historical data of the user is backed up in multiple databases.
4. The data redundancy is distributed in five central cities across the country in order to reduce the request delay of users in different ranges across the country in different places and multiple lives.
Moreover, since the read/write amount of the audio/video viewing data is very large (when the user views video and presents a home page similar to TV, the data of the viewing history is pulled), if all the requests read/write the database, the database can not be supported at the request peak, therefore, in order to reduce the burden of the database, a buffer layer is added during the read/write request, the read/write request processing process of the request, and the consistency design of the buffer and the database are shown in fig. 10 a-10 b.
Referring to fig. 10a, when data is requested, if the data is in the cache, the data is directly returned, otherwise, the database is requested, and after the database finds the data, the cache is updated at the same time. Referring to fig. 10b, when the data is updated, the database is updated first, and the cached data is invalidated.
The video behavior data of the user is similar to the storage design of the audio and video watching data basically except the audio and video watching data, the audio and video purchasing data, the presentation data and the exchange data which are staring praise and waist supporting data, and the design of the storage scheme is different from the structure of the table and part of the design (for example, the online request amount of other audio and video behavior data except the audio and video watching data does not reach the magnitude of the audio and video watching data, so that the database storage is directly read without buffering when in request).
The database provided by the embodiment of the application adopts a multi-database backup mechanism, so that the stability of the database is effectively improved, and the risk resistance of the database is improved; in addition, the database not only adopts a remote multi-activity strategy, but also realizes data query by combining a cache layer, thereby effectively lightening the burden of the database and improving the efficiency of data query.
Further, an embodiment of the present application provides a data recovery scenario to implement a detailed description of a data recovery method provided in the embodiment of the present application.
A first user interface, in which the item "viewing history" is displayed, is opened on the audiovisual application for a user named "zhang san" as shown in fig. 11 a. Taking the example that the history never deletes the audio and video behavior data with the user name of "three pages", after the user opens the first user interface, the item "viewing history" of the first user interface displays the recent audio and video behavior data of "three pages", and the user clicks "more" on the item "viewing history" to jump to the second user interface as shown in fig. 11 b.
A detailed viewing history of "three sheets" is displayed in the second user interface as shown in fig. 11 b. Referring to fig. 11b, the user may delete data from the audio and video behavior data in the detailed viewing history of "zhang san" displayed in the second user interface by using an "edit" button on the second user interface.
Taking the example that the audio and video behavior data in the detailed viewing history of "zhang san" is cleared through the "edit" button shown in fig. 11b, after the detailed viewing history of "zhang san" is cleared (correspondingly, the detailed viewing history of "zhang san" stored in the database is deleted), if the user returns to the first user interface, the display content of the first user interface is shown in fig. 11 c.
As can be seen from fig. 11c, after the detailed viewing history of "zhang san" is cleared, if the first user interface is returned, the first user interface cannot query any audiovisual behavior data of "zhang san" from the database, and therefore, the content in the item of "viewing history" in fig. 11c is empty.
Referring to fig. 11c, in the case that the "viewing history" is empty, the first user interface further provides a "retrieve viewing history" button, and the user clicks the "retrieve viewing history" button to jump to the retrieve viewing history interface, which is shown in fig. 11 d.
The user can fill in the retrieval viewing history interface as shown in fig. 11d with the data deleted by the last data deletion operation; alternatively, fill in the data retrieval time range in the retrieval view history interface as shown in FIG. 11 d; after the user completes the completion, click the "confirm" button as shown in FIG. 11d to perform the data retrieval operation from the blockchain system.
The present application is described by taking as an example that the user does not fill any information in the interface shown in fig. 11 d. That is, the user has not filled in either the data delete operation or the data retrieval time range, but has directly clicked the "confirm" button. At the moment, the server of the audio and video application retrieves all audio and video behavior data of the history of Zhang III from the blockchain and displays all the retrieved audio and video behavior data of the history of Zhang III. That is, the jump displays the interface as shown in FIG. 11 b.
In addition, in the embodiment of the application, all retrieved audio and video behavior data of the history of "zhang san" may be stored in the database, so that the audio and video application may directly query the audio and video behavior data of "zhang san" from the database next time the user opens the first user interface, so that the displayed first user interface is as shown in fig. 11 a.
The viewing history may be considered as the audiovisual viewing data, and the data retrieval diagrams shown in fig. 11a to 11d provided in the embodiments of the present application relate to the retrieval of data of a data category "audiovisual viewing data". If the user wants to retrieve data of other data types from other positions in the interface, for example, the order displayed in fig. 11a may be considered as audio/video purchase data, and the user clicks the "order" button shown in fig. 11a, so that the query on all audio/video purchase data of "zhang san" in the database can be implemented, and further, the operations of deleting, retrieving and the like of the audio/video purchase data of "zhang san" are implemented. The manner in which data of the data category "audiovisual purchase data" is retrieved is not described in detail herein.
According to the data retrieving method provided by the embodiment of the application, a new function is added for a user in product experience, and records deleted before can be retrieved; compared with the current traditional storage scheme based on NoSQL or SQL, the security is enhanced, so that the risk of mistaken deletion of the operator is avoided for the user data; the existing storage scheme only stores audio and video behavior data of a user, such as viewing history, purchase records and the like, but the data retrieval method provided by the embodiment of the application not only stores the audio and video behavior data of the user, but also stores operation data of the user on the audio and video behavior data, such as second operation data of characteristic data deletion operation, second operation data of characteristic data retrieval operation and the like, and the data can be better used for user portrait drawing and analysis, so that the accuracy of user portrait drawing is improved, and a better data basis is provided for user portrait analysis.
Fig. 12 is a schematic structural diagram of a data retrieving device according to an embodiment of the present application.
As shown in fig. 12, the apparatus includes:
a data type obtaining unit 1201, configured to obtain a target data type to which target audio/video behavior data of an audio/video application requested to be retrieved by a target user belongs, where the target audio/video behavior data is historical audio/video behavior data that is not currently stored in a database and has been deleted from the database;
the data retrieving unit 1202 is configured to search target audio and video behavior data from a blockchain system used for storing operation data of the audio and video application according to the type of the target data, where the operation data includes first operation data representing the audio and video behavior data;
the data storage unit 1203 is used for storing the target audio and video behavior data into a database;
and a data returning unit 1204, configured to return the target audio/video behavior data to the target user.
In this embodiment of the application, preferably, the data type obtaining unit includes:
the data retrieval request receiving unit is used for receiving a data retrieval request sent by a target user;
and the data type acquisition subunit is used for acquiring a data retrieval condition carried by the data retrieval request, wherein the data retrieval condition indicates a target data type to which target audio and video behavior data of the audio and video application requested to be retrieved by the target user belongs in a plurality of data types, and the audio and video behavior data generated by operation behaviors of different operation types belong to different data types.
In this embodiment, preferably, the data retrieving unit includes:
the tracing data determining unit is used for inquiring at least one tracing data of a target user from the first operation data of the audio and video application stored in the block chain system, and the tracing data is generated by tracing the audio and video behavior data of the target user in the audio and video application;
a data retrieval range acquisition unit for acquiring a data retrieval range indicated by the data retrieval condition;
and the data retrieval subunit is used for inquiring the audio and video behavior data which are located in the data retrieval range and belong to the target data category from the at least one tracing data.
In this embodiment of the present application, preferably, the operation data further includes second operation data representing operation information of audio/video behavior data of an audio/video application stored in the database, and the data retrieval range obtaining unit, correspondingly, includes:
the operation detection unit is used for detecting whether the data retrieval condition indicates a target data deletion operation, wherein the target data deletion operation is a historical data deletion operation which is executed by a target user for requesting the audio and video application to the audio and video behavior data in the database;
the query unit is used for querying target second operation data representing target data deletion operation from second operation data of the audio and video application stored in the block chain system if the data retrieval condition indicates the target data deletion operation;
and the data identifier acquisition unit is used for acquiring the target data identifier of the audio and video behavior data deleted by the target data deletion operation request from the target second operation data.
Further, the obtaining unit provided in the embodiment of the present application further includes:
and the data retrieval time range acquisition unit is used for acquiring the data retrieval time range indicated by the data retrieval condition, and the data retrieval time range is related to the data generation time of the target audio and video behavior data.
In this embodiment, preferably, the data retrieving time range obtaining unit includes:
the time information detection unit is used for detecting whether the data retrieval condition carries time information representing the data retrieval time range;
the time information acquisition unit is used for acquiring time information if the data retrieval condition carries the time information representing the data retrieval time range;
and the time range determining unit is used for determining the data recovery time range indicated by the data recovery condition as the history till now if the data recovery condition does not carry the time information representing the data recovery time range.
The data recovery device provided by the embodiment of the application further comprises a source tracing data generation unit.
As an implementation manner of the embodiment of the present application, the tracing data generating unit includes:
the first detection unit is used for detecting whether the duration represented by the actual time period formed by the current time and the time of the last historical traceability operation reaches a preset standard duration or not;
and the first generation unit is used for performing traceability operation on the audio and video behavior data generated in the actual time period by the audio and video application stored in the block chain system if the time represented by the actual time period reaches the standard time period, so as to generate traceability data of the actual time period.
Accordingly, a data retrieval subunit comprises:
the data generation time acquisition unit is used for acquiring the data generation time of the retrieved audio and video behavior data indicated by the data retrieval range;
the first tracing data determining unit is used for determining first tracing data matched with data generation time in at least one tracing data;
and the first retrieving unit is used for inquiring the data which is positioned in the data retrieving range and belongs to the target data type from the first tracing data.
As an implementation manner of the embodiment of the present application, the tracing data generating unit includes:
the second detection unit is used for detecting whether the duration represented by the actual time period formed by the current time and the time of the last historical traceability operation reaches a preset standard duration or not;
and the second generation unit is used for performing historical traceability operation on the audio and video behavior data of the audio and video application stored in the block chain system to generate traceability data if the duration represented by the actual time period reaches the standard duration.
Accordingly, a data retrieval subunit comprises:
the second tracing data determining unit is used for determining second tracing data which are generated recently in history in at least one piece of tracing data;
and the second retrieving unit is used for inquiring the data which is positioned in the data retrieving range and belongs to the target data type from the second tracing data.
Further, the data retrieving device provided in the embodiment of the present application further includes a data storage unit, where the data storage unit includes:
the second operation data generation unit is used for generating second operation data related to the data retrieval request according to the target audio and video behavior data;
and the second operation data storage subunit is used for storing the second operation data to the block chain system.
Further, the data retrieval device provided by the embodiment of the application further comprises a user portrait unit, and the user portrait unit is used for analyzing the operation data of the target user in the audio and video application to generate the user portrait of the target user.
The data retrieval device can acquire a target data type (the target audio and video behavior data is historical audio and video behavior data which is not stored in a database at present and is deleted from the database once) to which target audio and video behavior data of an audio and video application requested to be retrieved by a target user belong, and can search the target audio and video behavior data from a block chain system for storing operation data of the audio and video application (the operation data comprises first operation data representing the audio and video behavior data of the audio and video application) according to the target data type. Based on the data retrieval device, the queried target audio and video behavior data can be stored in the database, and can be returned to the audio and video application so as to be convenient for a target user to check, and the retrieval of the audio and video behavior data deleted from the database once is realized.
As shown in fig. 13, which is a structural diagram of an implementation manner of an electronic device provided in an embodiment of the present application, the electronic device includes:
a memory 1301 for storing programs;
a processor 1302, configured to execute a program, the program specifically configured to:
acquiring a target data type to which target audio and video behavior data of the audio and video application requested to be retrieved by a target user belongs, wherein the target audio and video behavior data is historical audio and video behavior data which is not stored in a database at present and is deleted from the database once;
searching target audio and video behavior data from a block chain system for storing operation data of audio and video application according to the type of the target data, wherein the operation data comprises first operation data representing the audio and video behavior data;
storing the target audio and video behavior data to a database;
and returning the target audio and video behavior data to the target user.
The processor 1302 may be a central processing unit CPU or an Application Specific Integrated Circuit (ASIC).
The control device may further include a communication interface 1303 and a communication bus 1304, where the memory 1301, the processor 1302, and the communication interface 1303 complete communication with each other through the communication bus 1304.
The embodiment of the present application further provides a readable storage medium, where a computer program is stored, and the computer program is loaded and executed by a processor to implement the steps of the data retrieving method, where a specific implementation process may refer to the description of the corresponding parts in the foregoing embodiment, and details are not repeated in this embodiment.
The present application also proposes a computer program product or a computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and executes the computer instruction, so that the computer device executes the method provided in the various optional implementation manners in the aspect of the data retrieving method or the aspect of the data retrieving apparatus.
The application provides a data retrieval method, a data retrieval device, electronic equipment and a storage medium, wherein a target data type (the target audio and video behavior data is historical audio and video behavior data which is not stored in a database at present and is deleted from the database once) to which target audio and video behavior data of an audio and video application requested to be retrieved by a target user belongs is obtained, and the target audio and video behavior data can be searched from a block chain system for storing operation data of the audio and video application (the operation data comprises first operation data representing the audio and video behavior data of the audio and video application) according to the target data type; based on the method, the inquired target audio and video behavior data can be stored in the database, and can be returned to the audio and video application so as to be convenient for a target user to check, and the retrieval of the audio and video behavior data which is deleted from the database once is realized.
The above detailed description is provided for a data retrieving method, an apparatus, an electronic device and a storage medium provided by the present invention, and a specific example is applied in the present document to explain the principle and the implementation of the present invention, and the description of the above embodiment is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
It is further noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include or include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (15)

1. A method for retrieving data, comprising:
acquiring a target data type to which target audio and video behavior data of an audio and video application requested to be retrieved by a target user belongs, wherein the target audio and video behavior data is historical audio and video behavior data which is not stored in a database at present and is deleted from the database once;
searching the target audio and video behavior data from a block chain system for storing operation data of the audio and video application according to the type of the target data, wherein the operation data comprises first operation data representing the audio and video behavior data;
storing the target audio and video behavior data to the database;
and returning the target audio and video behavior data to the target user.
2. The method according to claim 1, wherein the obtaining of the target data type to which the target audio/video behavior data of the audio/video application retrieved by the target user belongs comprises:
receiving a data retrieval request sent by a target user;
acquiring a data retrieval condition carried by the data retrieval request;
the data retrieval condition indicates a target data category to which target audio and video behavior data of the audio and video application requested to be retrieved by the target user belongs in a plurality of data categories, and audio and video behavior data generated by operation behaviors of different operation types belong to different data categories.
3. The method according to claim 2, wherein the searching for the target audio/video behavior data from a blockchain system for storing operation data of the audio/video application according to the target data category comprises:
inquiring at least one tracing data of the target user from first operation data of the audio and video application stored in a block chain system, wherein the tracing data is generated by tracing the audio and video behavior data of the target user in the audio and video application;
acquiring a data retrieval range indicated by the data retrieval condition;
and inquiring audio and video behavior data which are located in the data retrieval range and belong to the target data category from the at least one tracing data.
4. The method according to claim 3, wherein the operation data further includes second operation data representing operation information on audio-video behavior data of the audio-video application stored in the database, and the obtaining of the data retrieval range indicated by the data retrieval condition includes:
detecting whether the data retrieval condition indicates a target data deleting operation, wherein the target data deleting operation is a historical data deleting operation which is executed by the target user for requesting the audio and video application to the audio and video behavior data in the database;
if the data retrieval condition indicates the target data deleting operation, inquiring target second operation data representing the target data deleting operation from second operation data of the audio and video application stored in the blockchain system;
and acquiring a target data identifier of the audio and video behavior data deleted by the target data deletion operation instruction from the target second operation data.
5. The method of claim 4, wherein if the data recovery condition does not indicate the target data deletion operation, the method further comprises:
and acquiring a data retrieval time range indicated by the data retrieval condition, wherein the data retrieval time range is related to the data generation time of the target audio and video behavior data.
6. The method of claim 5, wherein the obtaining the data recovery time range indicated by the data recovery condition comprises:
detecting whether the data retrieval condition carries time information representing a data retrieval time range;
if the data retrieval condition carries time information representing a data retrieval time range, acquiring the time information;
and if the data recovery condition does not carry time information representing the data recovery time range, determining the data recovery time range indicated by the data recovery condition as the history till now.
7. The method of claim 3, wherein the at least one tracing data generation method comprises:
detecting whether the duration represented by an actual time period formed by the current time and the time of the last historical traceability operation reaches a preset standard duration or not;
if the time represented by the actual time period reaches the standard time, performing traceability operation on the audio and video behavior data generated in the actual time period by the audio and video application stored in the block chain system to generate traceability data of the actual time period.
8. The method according to claim 7, wherein the querying of the audio-video behavior data, which is within the data retrieval range and belongs to the target data category, from the at least one tracing datum comprises:
acquiring data generation time of the retrieved audio and video behavior data indicated by the data retrieval range;
determining first tracing data matched with the data generation time in the at least one tracing data;
and querying data which is located in the data retrieval range and belongs to the target data category from the first tracing data.
9. The method of claim 3, wherein the at least one tracing data generation method comprises:
detecting whether the duration represented by an actual time period formed by the current time and the time of the last historical traceability operation reaches a preset standard duration or not;
and if the time represented by the actual time period reaches the standard time, performing historical traceability operation on the audio and video behavior data of the audio and video application stored in the block chain system to generate traceability data.
10. The method of claim 9, wherein the querying the data within the data recovery range and belonging to the target data category from the at least one tracing datum comprises:
determining second tracing data which is generated recently in history in the at least one piece of tracing data;
and querying data which is located in the data retrieval range and belongs to the target data category from the second tracing data.
11. The method of claim 2, further comprising:
generating second operation data related to the data retrieval request according to the target audio and video behavior data;
storing the generated second operation data to the blockchain system.
12. The method of claim 4, further comprising:
and analyzing the operation data of the target user in the audio and video application to generate the user portrait of the target user.
13. A data retrieval device, comprising:
the data type acquisition unit is used for acquiring a target data type to which target audio and video behavior data of the audio and video application requested to be retrieved by a target user belongs, wherein the target audio and video behavior data is historical audio and video behavior data which is not stored in a database at present and is deleted from the database once;
the data retrieving unit is used for searching the target audio and video behavior data from a block chain system used for storing the operation data of the audio and video application according to the type of the target data, wherein the operation data comprises first operation data representing the audio and video behavior data;
the data storage unit is used for storing the target audio and video behavior data to the database;
and the data return unit is used for returning the target audio and video behavior data to the target user.
14. An electronic device, comprising: the system comprises a processor and a memory, wherein the processor and the memory are connected through a communication bus; the processor is used for calling and executing the program stored in the memory; the memory is used for storing a program for implementing the data retrieval method according to any one of claims 1 to 12.
15. A computer-readable storage medium, having stored thereon, a computer program which, when loaded and executed by a processor, carries out the steps of the data retrieval method as claimed in any one of claims 1 to 12.
CN202010967446.7A 2020-09-15 2020-09-15 Data retrieving method and device, electronic equipment and storage medium Active CN111930753B (en)

Priority Applications (5)

Application Number Priority Date Filing Date Title
CN202110110543.9A CN114185952A (en) 2020-09-15 2020-09-15 Data retrieving method and device, electronic equipment and storage medium
CN202010967446.7A CN111930753B (en) 2020-09-15 2020-09-15 Data retrieving method and device, electronic equipment and storage medium
EP21868353.0A EP4120096A4 (en) 2020-09-15 2021-08-11 Method and device for data retrieval, electronic device, and storage medium
PCT/CN2021/112005 WO2022057525A1 (en) 2020-09-15 2021-08-11 Method and device for data retrieval, electronic device, and storage medium
US17/959,196 US11829411B2 (en) 2020-09-15 2022-10-03 Data recovery method and apparatus, electronic device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010967446.7A CN111930753B (en) 2020-09-15 2020-09-15 Data retrieving method and device, electronic equipment and storage medium

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202110110543.9A Division CN114185952A (en) 2020-09-15 2020-09-15 Data retrieving method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111930753A true CN111930753A (en) 2020-11-13
CN111930753B CN111930753B (en) 2021-01-22

Family

ID=73335292

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202010967446.7A Active CN111930753B (en) 2020-09-15 2020-09-15 Data retrieving method and device, electronic equipment and storage medium
CN202110110543.9A Pending CN114185952A (en) 2020-09-15 2020-09-15 Data retrieving method and device, electronic equipment and storage medium

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN202110110543.9A Pending CN114185952A (en) 2020-09-15 2020-09-15 Data retrieving method and device, electronic equipment and storage medium

Country Status (4)

Country Link
US (1) US11829411B2 (en)
EP (1) EP4120096A4 (en)
CN (2) CN111930753B (en)
WO (1) WO2022057525A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022057525A1 (en) * 2020-09-15 2022-03-24 腾讯科技(深圳)有限公司 Method and device for data retrieval, electronic device, and storage medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116932277A (en) * 2022-03-31 2023-10-24 华为技术有限公司 Background application recovery method and device, electronic equipment and readable storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109492049A (en) * 2018-09-21 2019-03-19 上海点融信息科技有限责任公司 Data processing, block generation and synchronous method for block chain network
CN109978551A (en) * 2019-03-29 2019-07-05 北京投肯科技有限公司 A kind of account information confirmation and method for retrieving and device based on block chain
CN110263015A (en) * 2019-05-07 2019-09-20 深圳壹账通智能科技有限公司 Data source tracing method, device, equipment and readable storage medium storing program for executing based on block chain
CN110688261A (en) * 2019-11-13 2020-01-14 杭州新链科技有限公司 Heterogeneous electronic file cloud disaster recovery system based on block chain
US10628450B1 (en) * 2018-09-30 2020-04-21 Innoplexus Ag System and method for blockchain-based secure data processing
CN111125776A (en) * 2019-12-12 2020-05-08 成都四方伟业软件股份有限公司 Operation data tamper-proofing method based on block chain
US10691648B2 (en) * 2018-07-03 2020-06-23 International Business Machines Corporation Controlling volatility via blockchain
CN111342966A (en) * 2020-05-22 2020-06-26 支付宝(杭州)信息技术有限公司 Data storage method, data recovery method, device and equipment
CN111651300A (en) * 2020-06-05 2020-09-11 成都质数斯达克科技有限公司 Block chain data recovery method, device, equipment and medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100754626B1 (en) * 2005-09-13 2007-09-05 삼성전자주식회사 Method for offering seeing and hearing record information in digital broadcasting reception terminal
KR101547466B1 (en) * 2014-03-28 2015-08-26 고려대학교 산학협력단 Apparatus and method for recovering data in oracle database
US20220019575A1 (en) * 2018-12-04 2022-01-20 Zeu Technologies, Inc. System And Method For Augmenting Database Applications With Blockchain Technology
CN110362571A (en) * 2019-06-25 2019-10-22 智链万源(北京)数字科技有限公司 Data safety retroactive method and device based on block chain
CN110933468A (en) * 2019-10-17 2020-03-27 宇龙计算机通信科技(深圳)有限公司 Playing method, playing device, electronic equipment and medium
CN111651296A (en) * 2020-04-30 2020-09-11 中国平安财产保险股份有限公司 Interception backup method, device, equipment and storage medium for data deletion operation
CN111930753B (en) * 2020-09-15 2021-01-22 腾讯科技(深圳)有限公司 Data retrieving method and device, electronic equipment and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10691648B2 (en) * 2018-07-03 2020-06-23 International Business Machines Corporation Controlling volatility via blockchain
CN109492049A (en) * 2018-09-21 2019-03-19 上海点融信息科技有限责任公司 Data processing, block generation and synchronous method for block chain network
US10628450B1 (en) * 2018-09-30 2020-04-21 Innoplexus Ag System and method for blockchain-based secure data processing
CN109978551A (en) * 2019-03-29 2019-07-05 北京投肯科技有限公司 A kind of account information confirmation and method for retrieving and device based on block chain
CN110263015A (en) * 2019-05-07 2019-09-20 深圳壹账通智能科技有限公司 Data source tracing method, device, equipment and readable storage medium storing program for executing based on block chain
CN110688261A (en) * 2019-11-13 2020-01-14 杭州新链科技有限公司 Heterogeneous electronic file cloud disaster recovery system based on block chain
CN111125776A (en) * 2019-12-12 2020-05-08 成都四方伟业软件股份有限公司 Operation data tamper-proofing method based on block chain
CN111342966A (en) * 2020-05-22 2020-06-26 支付宝(杭州)信息技术有限公司 Data storage method, data recovery method, device and equipment
CN111651300A (en) * 2020-06-05 2020-09-11 成都质数斯达克科技有限公司 Block chain data recovery method, device, equipment and medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022057525A1 (en) * 2020-09-15 2022-03-24 腾讯科技(深圳)有限公司 Method and device for data retrieval, electronic device, and storage medium
US11829411B2 (en) 2020-09-15 2023-11-28 Tencent Technology (Shenzhen) Company Limited Data recovery method and apparatus, electronic device, and storage medium

Also Published As

Publication number Publication date
US20230026780A1 (en) 2023-01-26
EP4120096A4 (en) 2023-11-01
CN114185952A (en) 2022-03-15
US11829411B2 (en) 2023-11-28
EP4120096A1 (en) 2023-01-18
CN111930753B (en) 2021-01-22
WO2022057525A1 (en) 2022-03-24

Similar Documents

Publication Publication Date Title
CN110495132B (en) System and method for generating, uploading and executing code blocks within distributed network nodes
EP3111406B1 (en) Systems and methods for ephemeral eventing
WO2021143497A1 (en) Infringement evidence storage method, apparatus, and device based on evidence storage blockchain
JP4470069B2 (en) Input assist device, input assist system, input assist method, and input assist program
US20140365523A1 (en) Push subscriptions
US11829411B2 (en) Data recovery method and apparatus, electronic device, and storage medium
US8799321B2 (en) License management apparatus, license management method, and computer readable medium
US20140020079A1 (en) Method for providing network service and apparatus thereof
CN111291394B (en) False information management method, false information management device and storage medium
US10152538B2 (en) Suggested search based on a content item
US8352442B2 (en) Determination of an updated data source from disparate data sources
CN111352986A (en) Method and device for exporting database table structure and terminal equipment
CN110807209B (en) Data processing method, device and storage medium
CN112434062A (en) Quasi-real-time data processing method, device, server and storage medium
CN111104408A (en) Data exchange method and device based on map data and storage medium
CN114422586B (en) Event notification method, event notification device, computer equipment and storage medium
CN116414854A (en) Data asset query method, device, computer equipment and storage medium
JP2023547715A (en) merkle proof entity
CN112783842A (en) Log collection method and device
JP7249453B1 (en) Contract management program, information processing device, information processing system, information processing method
CN115098837B (en) Data processing method and device
AU2022215281B2 (en) Securing hash chains via hybrid consensus
US11949774B2 (en) Securing hash chains via hybrid consensus
CN111814063B (en) Media information processing method, device, equipment and medium based on block chain
CN114491324A (en) Information pushing method and device, computer 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
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20221130

Address after: 1402, Floor 14, Block A, Haina Baichuan Headquarters Building, No. 6, Baoxing Road, Haibin Community, Xin'an Street, Bao'an District, Shenzhen, Guangdong 518000

Patentee after: Shenzhen Yayue Technology Co.,Ltd.

Address before: 518000 Tencent Building, No. 1 High-tech Zone, Nanshan District, Shenzhen City, Guangdong Province, 35 Floors

Patentee before: TENCENT TECHNOLOGY (SHENZHEN) Co.,Ltd.