CN111400510B - Data archiving processing method, device, equipment and readable storage medium - Google Patents

Data archiving processing method, device, equipment and readable storage medium Download PDF

Info

Publication number
CN111400510B
CN111400510B CN202010191478.2A CN202010191478A CN111400510B CN 111400510 B CN111400510 B CN 111400510B CN 202010191478 A CN202010191478 A CN 202010191478A CN 111400510 B CN111400510 B CN 111400510B
Authority
CN
China
Prior art keywords
data
identification
activity information
activity
mark
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010191478.2A
Other languages
Chinese (zh)
Other versions
CN111400510A (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.)
Tencent Music Entertainment Technology Shenzhen Co Ltd
Original Assignee
Tencent Music Entertainment 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 Music Entertainment Technology Shenzhen Co Ltd filed Critical Tencent Music Entertainment Technology Shenzhen Co Ltd
Priority to CN202010191478.2A priority Critical patent/CN111400510B/en
Publication of CN111400510A publication Critical patent/CN111400510A/en
Application granted granted Critical
Publication of CN111400510B publication Critical patent/CN111400510B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/40Information retrieval; Database structures therefor; File system structures therefor of multimedia data, e.g. slideshows comprising image and additional audio data
    • G06F16/41Indexing; Data structures therefor; Storage structures
    • 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/43Querying
    • 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/43Querying
    • G06F16/438Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/51Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/53Querying
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/53Querying
    • G06F16/538Presentation of query results
    • 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/71Indexing; Data structures therefor; Storage structures
    • 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/73Querying
    • 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/73Querying
    • G06F16/738Presentation of query results
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the invention discloses a data archiving processing method, a device, equipment and a readable storage medium, wherein the data archiving processing method comprises the following steps: receiving data of participating in an activity, wherein the data of participating in the activity comprises identification data of a participant and activity information data; judging whether the preset marking set has marking data corresponding to the identity marking data, wherein the marking data is generated after marking the identity marking data; if the marking data does not exist, marking the identification data in the marking set to obtain marking data corresponding to the identification data; sequentially storing the identification data and the activity information data using a first data structure; and after the identity identification data and the activity information data are spliced to generate the identity identification activity information data, the second data structure is used for sequentially storing the identity identification activity information data and the activity information data. By adopting the embodiment of the invention, the query speed can be improved, and the consumption of the CPU can be reduced.

Description

Data archiving processing method, device, equipment and readable storage medium
Technical Field
The present invention relates to the field of data processing, and in particular, to a data archiving processing method, apparatus, device, and readable storage medium.
Background
With the rapid development of communication technology, users can participate in various online activities through terminal devices, so that participation information data of users under various activities may be generated, and the information data needs to be archived and stored, so that the information data can be queried rapidly.
In the prior art, a sequential list is generally adopted to store data, but after the size of the list data becomes large, the query speed is very slow, and the current service requirement of quickly acquiring the data cannot be met; there are also non-relational databases (Not Only SQL, noSql) used to store data, but empty queries may occur when querying data, seriously affecting the overall query performance, and a large number of empty queries may cause resource waste for the central processor (Central Processing Unit, CPU) of the computer.
Disclosure of Invention
The embodiment of the invention provides a method and a device for data archiving processing and a computer readable storage medium, which can quickly inquire stored data.
In a first aspect, an embodiment of the present invention provides a method for data archiving processing, which may include: receiving data of participating in an activity, wherein the data of participating in the activity comprises identification data of a participant and activity information data; judging whether the preset marking set contains marking data corresponding to the identification data or not, wherein the marking data is generated after marking operation is carried out on the identification data; if the marking data does not exist, marking the identification data in the marking set to obtain marking data corresponding to the identification data; sequentially storing the identification data and the activity information data using a first data structure; and after the identity identification data and the activity information data are spliced to generate identity identification activity information data, the identity identification activity information data and the activity information data are sequentially stored by using a second data structure.
Based on the first aspect, in one possible implementation manner, after the sequentially storing the identification data and the activity information data using the first data structure, and the sequentially storing the identification number activity information data and the activity information data using the second data structure, the method further includes: a first query request is received, and a first sequence list is generated after traversing the first data structure in response to the first query request; the first sequence list comprises all the identification data in the first data structure, and the identification data in the first sequence list are arranged according to a preset sequence; or, after receiving a second query request, traversing the second data structure in response to the second query request to generate a second order list; the second sequence list is a list in which the identity activity information data are arranged according to a preset sequence.
Based on the first aspect, in one possible implementation manner, after the sequentially storing the identification data and the activity information data using the first data structure, and the sequentially storing the identification activity information data and the activity information data using the second data structure, the method further includes: receiving a third query request of a query user, wherein the third query request carries preset activity data; the preset activity data comprise identity data of an associated user and preset activity information data; the third query request is used for querying whether the associated user participates in an activity; the associated user is a user with an associated relation with the inquiring user; inquiring a target participant in the associated user according to a preset mark set, wherein the target participant is the associated user with mark data corresponding to the identity mark data in the mark set; and acquiring activity information data corresponding to the identification data of the target participant from the first data structure or the second data structure.
Based on the first aspect, in one possible implementation manner, after the marking operation is performed on the identification data, the method further includes: the count Cache policy is used to store the number of activities that all participants are engaged in.
Based on the first aspect, in one possible implementation manner, the method further includes: and receiving a fourth query request, and responding to the fourth query request to acquire the number of all the participators participating in the activity from the counting Cache strategy.
Based on the first aspect, in one possible implementation manner, the sequentially storing the identification data and the activity information data using the first data structure includes: storing the identification data into a first key field of the first data structure according to a preset sequence of the identification data; and storing the activity information data into a first value field of the first data structure, wherein the first value field is the first value field corresponding to the first key field storing the identification data.
Based on the first aspect, in one possible implementation manner, the sequentially storing the identification activity information data and the activity information data using the second data structure includes: storing the identification activity information data into a second key field of the second data structure according to a preset sequence of the activity information data; and storing the activity information data into a second value field of the second data structure, wherein the second value field is the second value field corresponding to the second key field storing the identification activity information data.
Based on the first aspect, in one possible implementation manner, the determining whether the tag data corresponding to the identity data exists in the preset tag set includes: calculating the identity identification data through an operation function to generate position data; judging whether preset mark data exists at a bit position corresponding to the position data in a preset mark set, wherein the mark set is an array with the length of N bits.
In a second aspect, an embodiment of the present invention provides a data archiving and processing apparatus, which may include: the first receiving unit is used for receiving data of participating in an activity, wherein the data of participating in the activity comprises identification data of a participant and activity information data; the judging unit is used for judging whether the marking data corresponding to the identity data exists in a preset marking set or not, wherein the marking data is generated after marking operation is carried out on the identity data; the mark storage unit is used for carrying out marking operation on the identity identification data in the mark set if the mark data does not exist, so as to obtain mark data corresponding to the identity identification data; a storage unit that sequentially stores the identification data and the activity information data using a first data structure; and after the identity identification data and the activity information data are spliced to generate identity identification activity information data, the identity identification activity information data and the activity information data are sequentially stored by using a second data structure.
Based on the second aspect, in one possible implementation manner, after the sequentially storing, by the first storage unit, the identification data and the activity information data using a first data structure, and sequentially storing, by using a second data structure, the identification activity information data and the activity information data, the method further includes: the first receiving response unit is used for receiving a first query request, and generating a first sequence list after traversing the first data structure in response to the first query request; the first sequence list comprises all the identification data in the first data structure, and the identification data in the first sequence list are arranged according to a preset sequence; the second receiving response unit is used for receiving a second query request, and generating a second sequence list after traversing the second data structure in response to the second query request; the second sequence list is a list in which the identity activity information data are arranged according to a preset sequence.
Based on the second aspect, in one possible implementation manner, after the sequentially storing, by the first storage unit, the identification data and the activity information data using a first data structure, and sequentially storing, by using a second data structure, the identification activity information data and the activity information data, the method further includes: the second receiving unit is used for receiving a third query request of a query user, wherein the third query request is used for querying whether an associated user with an association relationship with the query user participates in an activity; the query unit is used for querying a target participant in the associated user according to a preset mark set, wherein the target participant is the associated user with mark data corresponding to the identity mark data in the mark set; the acquisition unit is used for acquiring the activity information data corresponding to the identity identification data of the target participant from the first data structure or the second data structure.
Based on the second aspect, in one possible implementation manner, after the marking operation is performed on the identification data by the marking storage unit, the method further includes: and the second storage unit is used for storing the number of all participants participating in the activity by using the counting Cache strategy.
Based on the second aspect, in one possible implementation manner, the second storage unit further includes: and the third query response unit is used for receiving a fourth query request and responding to the fourth query request to acquire the number of all participants participating in the activity from the counting Cache strategy.
In a third aspect, an embodiment of the present invention provides a data archiving processing device, including a processor, a memory, and a communication device, where the processor, the memory, and the communication device are connected to each other, and the memory is configured to store a computer program, and the communication device is configured to perform information interaction with an external device; the processor is configured to invoke a computer program to perform the method of the first or second aspect.
In a fourth aspect, embodiments of the present invention provide a computer readable storage medium storing program instructions which, when executed by a processor, cause the processor to perform a method according to the first or second aspect.
According to the embodiment of the invention, the data of participating in the activity can be received, the data of participating in the activity can comprise the identification data and the activity information data of the participant, and the identification data can be marked to generate and store marked data. The identification data and the activity information data may be stored using a first data structure and the identification activity information data and the activity information data may be stored using a second data structure. A count Cache policy may also be used to store the number of participation activities of all participants. When a third query request for querying whether the target participant participates in the activity is received, whether the target participant participates in the activity can be determined by querying the target mark data, so that the waste of calculation capacity caused by empty query, which occurs when the target participant is determined to not participate in the activity by querying the data structure, on the CPU is avoided, and the consumption of the CPU can be reduced. When the external service call is received to acquire the data list, the first data list generated by the first data structure or the second data list generated by the second data structure can be acquired according to the request of the external service, and the query and the acquisition are fast. The first data structure and the second data structure can support the storage of massive list data under a single activity, the first data structure and the second data structure can support various sorts, the first data list or the second data list returned to the external service by the server is sorted, the sorting of the data by the service side is not needed, and the use difficulty of the service side can be reduced. When the total participation amount required to be acquired under each activity is received, the acquisition avoidance can be queried from the counting Cache to count the total participation amount without traversing the first data structure.
Drawings
In order to more clearly describe the embodiments of the present invention or the technical solutions in the background art, the following description will describe the drawings that are required to be used in the embodiments of the present invention or the background art.
Fig. 1 is a schematic diagram of a network architecture of a data archiving method according to an embodiment of the present invention;
FIG. 2 is a timing diagram of a data archiving method according to an embodiment of the present invention;
FIG. 2a is a schematic view of a scenario interface of a target application according to an embodiment of the present invention;
FIG. 2b shows a length 16 bloom filter provided by an embodiment of the present invention;
FIG. 2c is a length 16 bloom filter after marking provided by an embodiment of the present invention;
FIG. 2d is a data structure of size 10 according to an embodiment of the present invention;
FIG. 2e is a diagram of another marked data structure of size 10 according to an embodiment of the present invention;
FIG. 2f is data for each participating event provided by an embodiment of the present invention;
FIG. 3 is a flowchart illustrating another data archiving method according to an embodiment of the present invention;
FIG. 3a is a schematic view of a scenario interface of another target application provided by an embodiment of the present invention;
FIG. 3b is a schematic view of a scenario interface of a further target application provided by an embodiment of the present invention;
FIG. 4 is a flowchart of another data archiving method according to an embodiment of the present invention;
FIG. 4a is a schematic view of a scenario interface of a further target application provided by an embodiment of the present invention;
FIG. 5a is a schematic diagram of a data archiving method according to an embodiment of the present invention;
FIG. 5b is a schematic diagram of another data archiving method according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a data archiving and processing apparatus according to an embodiment of the present invention;
fig. 7 is a schematic hardware structure of a data archiving and processing device according to an embodiment of the present invention.
Detailed Description
Embodiments of the present invention will be described below with reference to the accompanying drawings in the embodiments of the present invention.
The terms "first," "second," "third," and "fourth" and the like in the description and in the claims of this application and in the drawings, are used for distinguishing between different objects and not for describing a particular sequential order. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the present application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
As used in this specification, the terms "component," "module," "system," and the like are intended to refer to a computer-related entity, either hardware, firmware, a combination of hardware and software, or software in execution. For example, a component may be, but is not limited to being, a process running on a processor, an object, an executable, a thread of execution, a program, and/or a computer. By way of illustration, both an application running on a computing device and the computing device can be a component. One or more components may reside within a process and/or thread of execution and a component may be localized on one computer and/or distributed between 2 or more computers. Furthermore, these components can execute from various computer readable media having various data structures stored thereon. The components may communicate by way of local and/or remote processes such as in accordance with a signal having one or more data packets (e.g., data from two components interacting with one another in a local system, distributed system, and/or across a network such as the internet with other systems by way of the signal).
Referring to fig. 1, fig. 1 is a schematic diagram of a network architecture of a data archiving method according to an embodiment of the present invention. The network architecture schematic may include a server and a plurality of terminal devices (as shown in fig. 1, specifically including a terminal device 100a, a terminal device 100b, a terminal device 100c, and a server 200 a), where the server 200a may perform data transmission with each terminal device through a network, each terminal device may install a target application program, a user may participate in multiple activities through the terminal device on which the target application software is installed (for example, the target application software may be singing application software, a series of accompaniment lists are included in the singing application software, the user may select accompaniment of interest to perform a singing activity), the server 200a may be a background server corresponding to the target application software, and when the server 200a receives information data of the participation activity sent by each terminal device, archive statistics may be performed on the information data, and the information data may be stored; when the server 200a receives the query request sent by each terminal device, it can perform quick query according to the query request and send the data obtained by the query to each terminal device, so that each terminal device can display the data through the target application software. The terminal device may include a cell phone, tablet, notebook, palm top, mobile internet device (mobile internet device, MID), wearable device (e.g., smart watch, smart bracelet, etc.).
It should be understood that the system architecture in fig. 1 is only an exemplary implementation of an embodiment of the present invention, and the system architecture in an embodiment of the present invention includes, but is not limited to, the above system architecture.
Referring to fig. 2, fig. 2 is a timing diagram of a data archiving method according to an embodiment of the present invention, where the method includes but is not limited to the following steps:
step S201, terminal equipment participates in an activity;
specifically, the user may participate in an activity (e.g., an accompaniment singing activity) through a terminal device in which a target application (e.g., a singing-type application) is installed.
Step S202, terminal equipment sends data of participating in activities to a server;
specifically, when a user participates in an activity (such as an accompanying singing activity) through a terminal device for installing a target application (such as a singing application), activity information data of the user on the target application may be sent to a server corresponding to the target application, where the activity information data includes identification data and activity information data of a participant, and the activity information data may include: activity information (such as identification information of a participating accompaniment), a time stamp of when the user participated in the activity, a point accumulated in the participation of the user in the activity, a score of the participation of the user in the activity, a nickname of the user, and the like.
For example, as shown in fig. 2a, a schematic view of a scenario interface of a target application provided in an embodiment of the present invention is shown, where after a terminal device 100a in the embodiment corresponding to fig. 1 is taken as an example, and a singing target application interface is opened by the terminal device 100a, when a user selects a "order" button 200c, it is indicated that the user has an intention to participate in singing accompaniment, first, a default interface 200a corresponding to the "order" button 200 may be displayed in a terminal display interface, and at least four function buttons may be displayed in the terminal display interface, which are respectively indicated as a "recommended" button, a "order list" button, a "ascending list" button, and a "age list" button. It can be seen from fig. 2a that the default interface 200a may be a presentation interface corresponding to the "recommend" button 200b that jumps to when the "recommend" button 200b is selected by the user. It should be noted that, the default interface 200a corresponding to the "song requesting" button 200 may also be an interface corresponding to any button selected from "order list", "surge list" and "age list", which is not limited in the embodiment of the present invention. Wherein, when the user selects any one of the buttons of "order list", "surge list" and "age list", the display contents in the display interface 200a may be different. When the user selects any one of the "karaoke" buttons 200d, the user can participate in singing of the song accompaniment, so that the terminal device can send the activity information data participating in singing of the song accompaniment and the identification data of the user to the server, wherein the identification data of the user can be the unique identification which can indicate the identity of the user and is distributed to the user by the server when the user registers on the target application program, and the identification data can be formed by unsigned integer.
Step S203, the server receives data participating in the activity, and judges whether the preset marking set contains marking data corresponding to the identity data, wherein the marking data is generated after marking the identity data;
specifically, when the server receives data of participating in an activity, it needs to determine whether the marking data generated after the marking operation is performed by the identification data exists in a preset marking set, where the data of participating in the activity includes the identification data of the participant and the activity information data. It should be noted that the tag set records which users are involved in the activity, that is, the participants of the activity are recorded. The set of labels may be an array in a bloom filter algorithm or an array in a bitmap algorithm. If there are a plurality of activities, each activity has a corresponding set of marks.
In one possible implementation manner, the determining whether the tag data corresponding to the identification data exists in the preset tag set includes: calculating the identity identification data through an operation function to generate position data; judging whether preset mark data exists at a bit position corresponding to the position data in a preset mark set, wherein the mark set is an array with the length of N bits.
The inventors have found that when the number of participating activities reaches the millions, the data stored in the data structure is substantial, and when empty queries occur, it can result in wasted computing resources. For example, if the participation activity is to sing in the singing target application software, when there are too many singers for each accompaniment, the data storage structure stores many singer information, because it is required to frequently query whether a certain singer participates in playing a certain accompaniment, but in most cases, the result is no singing, and if the data structure is searched every time, there is a great performance waste. To avoid empty queries, this is solved by introducing bloom filters. After the bloom filter is adopted, the time complexity of the original query data structure is O (log N), and N represents the quantity of data stored in the data structure; the time complexity of the query bloom filter is changed into O (1), so that the time complexity is greatly reduced, and the query performance is improved.
For example, the identification data may be generated after the marking operation is performed on the identification data by using an operation function such as a bloom filter, if the identification data needs to be determined whether to exist, the identification data to be determined may be calculated to obtain N position data by using N Hash functions of the bloom filter, and then whether bit positions corresponding to the N position data are all "1" is determined. It should be noted that "1" may be preset flag data. If both are "1", it is indicated that the identification data may be in the tag set, and if one is "0", the identification data is certainly not in the tag set. For example, a Hash function is used to perform a Hash operation on the identification data to be determined, hash1 (identification data) = "5", hash2 (identification data) = "9", hash3 (identification data) = "2", and it should be noted that "5", "9", and "2" may be location data. When locating a position of "2", "5" or "9" of an array of "16" bits in length, if one of the positions is "0", it can be determined that the identification data is not present in the tag set. For example, when the bitmap algorithm is used to mark the identification data, if it is required to determine whether one identification data exists, the identification data needs to be read in, and whether the corresponding bit in the array where the identification data exists is "1", if so, the "1" may indicate that the identification data of the user participating in the activity exists, and the "0" may indicate that the identification data of the user participating in the activity does not exist.
Step S204, if the marking data does not exist, marking the identification data in the marking set to obtain marking data corresponding to the identification data;
specifically, in step S203, it may be determined whether there is tag data, and when it is determined that there is no tag data, the tag operation may be performed on the identity data in the tag set to obtain tag data corresponding to the identity data.
For example, the identification data may be marked using a bloom filter to obtain marking data. The bloom filter is actually a very long binary vector and a series of random mapping functions, the principle of bloom filter is that when an element is added to a set, the element is mapped to N points in an array by K functions, setting them to "1". That is, the bloom filter is configured by an array with a length of N bits (each position in the array occupies only one bit, each bit has two states of "0" and "1") and a set of Hash functions, the input field is subjected to Hash operation by the set of Hash functions to obtain N values, the N values are used for taking the remainder of the length of the array, and then the corresponding position in the bit array can be set to "1", which should be noted that, setting to "1" or setting to "0" does not make any limitation in the embodiment of the present invention. For example, as shown in fig. 2b, if the bloom filter with a length of 16, that is, the 16-bit array, is to be mapped with the identification data to the bloom filter, a plurality of Hash values need to be generated by using a plurality of different Hash functions, and the bit position pointed by each generated Hash value is changed to 1, for example, three different Hash functions are used, so that Hash1 (identification data) =5, hash2 (identification data) =9, hash3 (identification data) =2, and the bit positions with subscripts of "5", "9", and "2" in fig. 2b are changed to 1, as shown in fig. 2c, the bloom filter with a length of 16 after marking provided by the embodiment of the invention can be seen, by performing the Hash function on the identification data, generating the marking data, and marking the bit position of the array corresponding to the marking data.
The bitmap algorithm can also be used for marking the identification data to obtain marking data. Bitmap is a common data structure representing a thick set in a finite field, where each element appears at least once, without other data and elements being associated. The basic principle of the bitmap is that a bit is used for storing a certain state, one bit represents an unsigned integer number, the bitmap is suitable for large-scale data, but the data state is not quite a lot, like the singing target application software has millions of registered users, millions of active users can be obtained per month, the accompaniment with the quantity of millions of steps can be obtained, the data scale is huge, but the registered users can have two states of singing which is participated in the first accompaniment and singing which is not participated in the first accompaniment, and the data state is not a lot, so that the bitmap algorithm can be suitable for. For example, the identification data in the embodiment of the present invention is stored in the form of a digital model by a bitmap algorithm, when the server receives the singing data of a user participating in a certain accompaniment, if the identification data of the user exists under the singing data of the certain accompaniment, the identification data is marked as 1 or true, if the identification data does not exist, the identification data is marked as 0 or false, for example, a batch of users register the target application program, after the registration is successful, an identification data is allocated to each user, and the identification data of each user can be respectively: 1. 2, 3, 4, 5, 6, 7, 9, 10, the user's identification data may be of the unsigned integer type; by the bitmap algorithm, a bit array with the length of 10 is provided, each bit corresponds to 10 integer numbers from 0 to 9, all element values in the initial bit array are 0, the bits are binary, 0 represents no value, and 1 represents a value. For example, a data structure of size 10 is provided in an embodiment of the present invention as shown in fig. 2 d. The identification data of two users with the identification data of 2 and 4 are written into the bit array, the positions of the bit arrays 2 and 4 are written, and the value of the bit position is adjusted from 0 to 1, as shown in fig. 2e, which is another marked data structure with the size of 10.
If it is determined in step S203 that the tag data exists, it is indicated that the identity data stored in the server is stored, which indicates that the user has participated in the activity, and the activity information data of the user can be directly searched for through the identity data of the user.
Step S205, the identity data and the activity information data are stored in sequence by using a first data structure; and after the identity identification data and the activity information data are spliced to generate identity identification activity information data, the identity identification activity information data and the activity information data are sequentially stored by using a second data structure.
Specifically, after the marking operation is performed on the identification data, the identification data and the activity information data are sequentially stored by using two heterogeneous data structures, and the identification marking activity information data and the activity information data are stored. It should be noted that, the identity data and the activity information data are in one-to-one correspondence, and the identity activity information data and the activity information data are also in one-to-one correspondence. That is, one identification data corresponds to one activity information data; similarly, one identification activity information data corresponds to one activity information data. The identification activity information data is generated by performing a splicing operation on the identification data and the activity information data, for example, if the identification data is "210001" and the activity information data is "157035", the identification activity information data is "157035_210001".
In one possible implementation, the sequentially storing the identification data and the activity information data using a first data structure includes: storing the identification data into a first key field of the first data structure according to the size of the identification data; and storing the activity information data into a first value field of the first data structure, wherein the first value field is a value field corresponding to a first key field for storing the identification data.
In one possible implementation manner, the identification activity information data is stored in a second key field of the second data structure according to the size of the activity information data; and storing the activity information data into a second value field of the second data structure, wherein the second value field is a value field corresponding to a second key field for storing the identification activity information data.
In particular, the identification data may consist of unsigned integer data that is assigned by the server when the user registers with the target application. Generally, the identification data may be assigned according to the order in which the users are registered, so that the identification data is in order of magnitude. When the first data structure is used for storing the identification data, the identification data can be written into a key field of the first data structure according to the size sequence of the identification data, and the value field corresponding to the key field can be written into the activity information data. The identity mark activity data is activity data with identity marks, and similarly, the activity data can be written into a key field of the second data structure according to the sequence of the identity marks during storage, and the value field corresponding to the key field can be written into activity information data.
For example, the identification data and the activity information data may be stored by a tree data structure such as a b+ tree, which is specific to ensure that the data is stable and ordered. The internal nodes of the b+ tree include: key field and Index values of Key values can be stored; the leaf nodes of the b+ tree include: the Key field capable of storing Key values, index values, and value fields capable of storing Data, the internal node does not store Data, only for indexing, all Data (or records) are stored in leaf nodes, the internal node of the b+ tree can also be called an Index node, and the leaf nodes can also be called external nodes. Therefore, two heterogeneous b+ trees can be utilized for storage, wherein the Key value stored in the Key field of one b+ tree is identity identification Data, the Key value stored in the Key field of the other b+ tree is identity identification activity information Data, and the Data stored in the value fields of the two b+ trees are activity information Data corresponding to the identity identification Data and activity information Data corresponding to the identity identification activity information Data respectively.
Step S206, the number of the participation activities is stored by using a counting Cache strategy.
Specifically, after the marking operation is performed on the identification data, when the first data structure is used for sequentially storing the identification data and the activity information data, and the second data structure is used for sequentially storing the identification activity information data and the activity information data, the number of participating activities can be stored by using a counting Cache strategy. That is, when the activity has a user to participate, the counting Cache may be called to update the total number of users participating in the activity, and if the activity is to participate in an accompaniment, the counting Cache participating in the accompaniment records the total number of the participants under the accompaniment.
Referring to fig. 2f, fig. 2f is data of each participating activity provided in the embodiment of the present invention, and through steps S201 to S206 in the embodiment of the present invention, it can be seen that there are mainly four types of data under each activity information: the Key Key value is a first data structure of the identity identification data, the Key Key value is a second data structure of the identity identification activity information data, a first array and a counting Cache. Wherein the four types of data are associated with each activity information.
Referring to fig. 3, fig. 3 is a flowchart illustrating another data archiving method according to an embodiment of the present invention. The method includes, but is not limited to, the steps of:
step S301, a terminal device sends a first query request to a server;
specifically, as shown in fig. 3a, fig. 3a is a schematic view of a scenario interface of another target application provided in an embodiment of the present invention, when a user selects a "user identification" button 300a on the target application installed on a terminal device 100a, it indicates that a first query request may be sent to a server, where the first query request is to query the identity data of all participants in a certain activity. The interface shown in fig. 3a may be an interface to which the user has jumped by selecting the "accompaniment 6" button box 200e in the interface shown in fig. 2a, so fig. 3a may indicate that the user wants to query the accompaniment 6 for information of all participants, and selecting the "user identification" button may indicate that the user wants to know a list ordered according to user identification data. It will be appreciated that the first data structure in the server at this point stores identification data and activity information data.
Step S302, a server receives a first query request, and then a first sequence list is generated after traversing the first data structure in response to the first query request;
specifically, when the server receives a first query request for querying the identity data of all the participants, the server may respond to the first query request to traverse a first data structure corresponding to the activity, read all the identity data and activity information data stored in the first data structure, and arrange the identity data according to a first preset sequence to generate a first sequence list. The first preset sequence may be according to the size of the identification data.
Step S303, the server returns a first sequence list to the terminal equipment;
specifically, after the server generates the first order list in response to the first query request, the server sends the first order list to the client.
Step S304, the terminal equipment receives and displays the first sequence list;
specifically, after the client receives the first order list sent by the server, the first order list is displayed on the interface of the target application software, such as the display interface 300b shown in fig. 3 a.
Step S305, the terminal equipment sends a second query request;
Specifically, as shown in fig. 3b, fig. 3b is a schematic view of a scene interface of another target application according to an embodiment of the present invention. When the user selects the "sing time" button 300e on the target application installed on the terminal device 100a, it means that a second query request may be sent to the server, where the second query request is to query the identity of all participants in a certain activity for activity information data, where it is understood that the sing time of all users in a certain activity is taken as activity information data, and the activity information data may also include information data such as points obtained by participating in the activity by the user, scores of the participation of the user in the activity, and ages of the user. Figure 3b may represent a list of information that the user wants to query all participants in the accompaniment 6 for ranking by time of singing. It will be appreciated that the second data structure in the server at this time stores the identification campaign information data and the campaign information data.
Step S306, after receiving a second query request, the server responds to the second query request to traverse the second data structure to generate a second sequence list;
specifically, when the server receives a second query request for querying the identification activity data of all the participants, the server may respond to the second query request to traverse a second data structure corresponding to the activity, read all the identification activity information data and activity information data stored in the second data structure, and arrange the identification activity information data according to a preset sequence to generate a second sequence list. The second preset sequence may be arranged according to the size of the activity information data, and when the sizes of the activity information data are the same, the second preset sequence may be arranged according to the sizes of the identification data. For example, if the activity information data is a singing time, the second preset sequence may be ordered according to the order of the singing time.
Step S307, the server returns a second order list to the terminal equipment;
specifically, after the server generates the second order list in response to the second query request, the server sends the second order list to the client.
In step S308, the terminal device receives and displays the second order list.
Specifically, after receiving the second order list sent by the server, the client displays the second order list on the interface of the target application software. The presentation interface 300f shown in fig. 3b is an example in which the activity information data is a singing time.
Referring to fig. 4, fig. 4 is a flowchart illustrating another data archiving method according to an embodiment of the present invention. The method includes, but is not limited to, the steps of:
step S401, the terminal equipment sends a third query request for querying the user to the server;
specifically, when the user performs a sliding operation or a touch screen operation through the terminal device 100a, a third query request may be sent to the server, where the third query request carries preset activity data; the preset activity data comprise the identity identification data of the associated user and preset activity information data; the third query request is used for querying whether the associated user participates in the activity; wherein the associated user is a user having an association relationship with the inquiring user. It should be noted that, when the querying user logs in the target application program installed in the terminal device, the server side may obtain the relevant user of the querying user, and the terminal device side may request 20 pieces of data from the server at a time, that is, the third querying request sent by the terminal device may carry 20 preset activity information data and identity data of the relevant user. For example, taking the target application software as singing application software, as shown in fig. 2a, when the user logs in the singing application software, the server may obtain what recommended accompaniment may be in the "recommended" 200b class, and the server may obtain the user friends associated with the user, and for how to know what user friends are involved in the singing activities of accompaniment 1 to accompaniment 20, a third query request may be sent to the server by selecting the "song requesting" button 200c, where the third query request carries the activity data of accompaniment 1 to accompaniment 20 and the data of the user friends; as further shown in fig. 4a, for how to know which user friends are involved in the 20 accompaniment singing activities of accompaniment 21 to accompaniment 40, a third query request may be sent to the server by sliding the interface shown in fig. 4a, where the third query request carries the data of the activities of accompaniment 21 to accompaniment 40 and the data of the user friends.
Step S402, a server receives a third query request of a query user, and queries a target participant in the associated user according to a preset mark set, wherein the target participant is the associated user with mark data corresponding to the identity data in the mark set;
specifically, the server receives a third query request sent by the terminal equipment, wherein the third query request carries preset activity data; the preset activity data comprise the identity identification data of the associated user and preset activity information data; the third query request is used for querying whether the associated user participates in the activity; wherein the associated user is a user having an association relationship with the inquiring user. The identification data of the related user can be operated through an operation function to generate position data, and whether target mark data exist in a preset mark set participating in the activity is judged by judging whether preset mark data exist in bit positions corresponding to the position data in the preset mark set of the activity data. Wherein the identification data of the associated user comprises target mark data. The detailed description may refer to step S203, and will not be repeated here.
Step S403, the server acquires the activity information data corresponding to the identification data of the target participant from the first data structure;
specifically, if the target marking data is queried in the marking set of a certain activity, the condition that the target identification data is marked in the activity can be indicated, and the condition that the user participates in the activity can be indicated. If the bitmap algorithm is used for inquiring the target mark data in a mark set of a certain activity, the activity information data corresponding to the identity mark data of the target participant can be obtained from the first data structure of the activity through the target identity mark data; however, if the bloom filter is used to query the target mark data in the mark set of a certain activity, it does not necessarily indicate that the target mark data is necessarily marked, so that it is required to query whether the target mark data exists in the first data structure of the activity, and if so, the activity information data corresponding to the mark data of the target participant can be obtained from the first data structure through the target mark data.
Step S404, the server returns the activity information data corresponding to the target identity data;
Specifically, when the server inquires about which target users participate in the activities under each activity, the activity information data corresponding to the target identity of the target users can be returned to the client. The activity information data corresponding to the returned target identity data may include activity information data corresponding to the target identity data under 20 different activities.
Step S405, the terminal equipment receives and displays the activity information data corresponding to the target identity data;
specifically, the client may receive and display activity information data corresponding to the target identity data of the target user, and may display activity data under 20 activities. For example, taking the target application software as the singing application software as an example, the information list shown in fig. 2a may show 20 accompaniment information lists of accompaniment 1 to accompaniment 20, and fig. 2a does not fully show the entire information content of 20 accompaniment data due to limited space. In practical applications, however, the client may request 20 pieces of data at a time, and the server may return 20 pieces of data according to the request of the client. Fig. 2a may show the singing situation of the user's friends (e.g. "friend a", "friend B", "friend C", "friend D", "friend E", and "friend H" in the display box 200E).
The information shown in fig. 4a is another 20 pieces of accompaniment information data returned by the server after a request is again initiated to the server on the basis of the information list shown in fig. 2 a. The 20 accompaniment information lists, such as the accompaniment 21 to the accompaniment 40 shown in fig. 4a, do not fully show the entire information contents of the 20 accompaniment data due to limited space. The information list shown in fig. 4a may show the singing situation of the friends of the user (e.g. "friend G", "friend H", "friend I", "friend J", "friend K", and "friend L" friends in the display box 400 a).
Step S406, the terminal equipment sends a fourth query request to the server;
specifically, the user may transmit a fourth inquiry request for inquiring about the number of participating activities to the server when performing a sliding operation or a touch screen operation through the terminal device 100 a. It should be noted that, when the user performs the sliding operation or the touch screen operation through the terminal device 100a, the third query request and the fourth query request may be simultaneously sent. For example, taking the target application software as the singing application software as an example, in the same way as step S401, the fourth query request is to query the total number of participants under 20 accompaniment events.
Step S407, the server receives a fourth query request, and responds to the fourth query request to acquire the number of the participating activities from the counting Cache strategy;
specifically, taking the target application software as the singing application software as an example, when the server receives the fourth query request sent by the client, the total number of the singing persons of each accompaniment in 20 accompaniments is directly read from the counting Cache strategy. It should be noted that, the server may receive the third query request and the fourth query request at the same time, and the embodiment of the present invention does not limit the receiving order of the server.
Step S408, the server returns the number of the participation activities;
specifically, when the server queries the number of participation under each activity, the number of participation under each activity may be returned to the client. Wherein the number of participation per activity returned includes the number of participation under 20 different activities. It should be noted that, the server may return the data in response to the third query request or the data in response to the fourth query request at the same time, and the return sequence of the server is not limited in the embodiment of the present invention.
Step S409, the terminal device receives and displays the number of participating activities.
Specifically, the client may receive and display the number of participating activities, and may display the total number of participating activities under 20 activities. For example, taking the target application software as the singing application software as an example, the information list shown in fig. 2a may show 20 accompaniment information lists of accompaniment 1 to accompaniment 20, and fig. 2a does not fully show the entire information content of 20 accompaniment data due to limited space. In practical applications, however, the client may request 20 pieces of data at a time, and the server may return 20 pieces of data according to the request of the client. Fig. 2a may show the singing situation of 20 accompaniments of the whole-network user (e.g., "177.6 tens of thousands", "151.5 tens of thousands", "64.2 tens of thousands", "84.8 tens of thousands", "72.3 tens of thousands", and "177.6 tens of thousands" of accompaniments in the display frame 200 f).
The information shown in fig. 4a is another 20 pieces of accompaniment information data returned by the server after a request is again initiated to the server on the basis of the information list shown in fig. 2 a. The 20 accompaniment information lists, such as the accompaniment 21 to the accompaniment 40 shown in fig. 4a, do not fully show the entire information contents of the 20 accompaniment data due to limited space. The information list shown in fig. 4a may show the singing situation of another 20 accompaniments of the whole network user (e.g. "77.6 ten thousand", "181.5 ten thousand", "164.2 ten thousand", "64.8 ten thousand", "126.3 ten thousand", and "77.6 ten thousand" total singers in accompaniment in the display frame 400 b).
Referring to fig. 5a, fig. 5a is a schematic diagram of a data archiving method according to an embodiment of the present invention. As shown in fig. 5a, the framework diagram may include a client 501 and a server 502, and the server 502 may include an access layer 502a, a business logic layer 502b, and a data storage layer 502c. The client 501 may be installed on any terminal device in the embodiment corresponding to fig. 1, and may be used for data collection 5011; server 502 corresponds to server 200a in the corresponding embodiment of fig. 1, and access layer 502a in server 502 may be used to distribute a user's request to business logic layer 502b; the service logic layer 502b can be responsible for realizing specific service functions and meeting service requirements; the data storage layer 502c may be responsible for storing data required by the service, and providing read-write support for the service data. For example, when a user has an activity taking part in through the client 501, the user's data may be collected, and the access layer 502a may notify the service logic layer 502b to make archival statistics, and write information data into the storage layer.
Further, the data collection 5011 may be used for data collection and reporting of activity information (such as accompaniment singing activities), that is, collecting data of user participating in activities, that is, identity data of the user participating in activities and activity information data, where the activity information data may include information data such as a time stamp of when the user participated in activities, points accumulated in the activities of the user participating in activities, scores of the user participating in activities, nicknames of the user, and the like.
The reception data 5021a may be data for transmitting the activity information to the access layer 502a after data acquisition by the data acquisition 5011 when the receiving user participates in the activity by the client 501.
The archival statistics 5021b can be used for performing logic analysis on the data sent by the received access layer 502a, and then sending the data to the corresponding location of the data storage layer 502c for archival statistics.
The first array 5021c may be an array with a length of N bits, and may perform an operation on the identification data by using an operation function to generate location data, and determine whether the bit position corresponding to the location data in the first array 5021c has the tag data, so as to determine whether the identification data exists in the storage layer 502 c.
The marking operation 5022c may perform an operation on the identification data through an operation function, generate location data, and mark a bit position in the first array 5021c corresponding to the location data.
The first data structure 5023c may be used to store the identification data in the first key field of the first data structure 5023c according to the first preset sequence of the identification data, and store the activity information data in the first value field of the first data structure 5023c, where the first value field is a first value field corresponding to the first key field storing the identification data.
The second data structure 5024c may store the identification activity information data in a second key field of the second data structure 5024c according to a preset sequence of the activity information data, and store the activity information data in a second value field of the second data structure, wherein the second value field is a second value field corresponding to the second key field storing the identification activity information data.
The count Cache5025c can be used to store the number of all participating activities and to synchronize the change data when there is a write operation to the first data structure 8023c or the second data mechanism 5024c to store the data for the participating activities.
Referring to fig. 5b, fig. 5b is a schematic diagram of another data archiving method according to an embodiment of the present invention. As shown in fig. 5b, the client 501 may be installed on any terminal device in the embodiment corresponding to fig. 1, and may be used for displaying the query result 5012; an access layer 502a in the server 502 may be used to distribute the user's request to a business logic layer 502b; the service logic layer 502b can be responsible for realizing specific service functions and meeting service requirements; the data storage layer 502c may be responsible for storing data required by the service, and providing read-write support for the service data. For example, when a user has an action of querying data through the client 501, the access layer 502a may notify the service logic layer 502b to query according to the request when receiving the request, query the data from the data storage layer 502c, and may display the query result on the client 801.
Further, the count Cache5025c may also be used to read the number of participating activities in response to the fourth query request; the first data 5021c may also be used to query whether the target participant participates in the activity in response to the third query request; the first data structure 5023c may be further configured to generate a first order list after traversing the first data structure in response to the first query request; the second data structure 5024c can also be used to generate a second order list after traversing the second data structure in response to a second query request.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a data archiving and processing device according to an embodiment of the invention. As shown in fig. 6, the data archiving processing device 60 may be applied to the server 100 in the embodiment corresponding to fig. 1, where the data archiving processing device 60 may include a first receiving unit 601, a judging unit 602, a tag storage unit 603, and a first storage unit 604;
a first receiving unit 601, configured to receive data of participating in an activity, where the data of participating in an activity includes identification data of a participant and activity information data;
a judging unit 602, configured to judge whether there is tag data corresponding to the identity data in a preset tag set, where the tag data is generated after performing a tag operation on the identity data;
A tag storage unit 603, configured to perform a tag operation on the identification data in the tag set if the tag data does not exist, so as to obtain tag data corresponding to the identification data; a first storage unit 604 for sequentially storing the identification data and the activity information data using a first data structure; and after the identity identification data and the activity information data are spliced to generate identity identification activity information data, the identity identification activity information data and the activity information data are sequentially stored by using a second data structure.
After sequentially storing the identification data and the activity information data by the first storage unit using a first data structure and sequentially storing the identification activity information data and the activity information data using a second data structure, the data archiving processing apparatus 60 may further include a first reception response unit 605, a second reception response unit 606;
a first receiving response unit 605, configured to receive a first query request, and generate a first order list after traversing the first data structure in response to the first query request; the first sequence list comprises all the identification data in the first data structure, and the identification data in the first sequence list are arranged according to a first preset sequence;
A second receiving response unit 606, configured to receive a second query request, and generate a second order list after traversing the second data structure in response to the second query request; the second order list is a list arranged according to a second preset order of the identification activity information data.
After sequentially storing the identification data and the activity information data by the first storage unit using a first data structure and sequentially storing the identification activity information data and the activity information data by using a second data structure, the data archiving processing apparatus 60 may further include a second receiving unit 607, a querying unit 608, an acquiring unit 609;
a second receiving unit 607, configured to receive a third query request of a querying user, where the third query request carries preset activity data; the preset activity data comprise identity data of an associated user and preset activity information data; the third query request is used for querying whether the associated user participates in an activity; the associated user is a user with an associated relation with the inquiring user;
the query unit 608 is configured to query, according to a preset tag set, a target participant in the associated user, where the target participant is the associated user having tag data corresponding to the identity data in the tag set;
An obtaining unit 609, configured to obtain, from the first data structure or the second data structure, activity information data corresponding to the identification data of the target participant.
After the marking operation is performed on the identification data by the marking storage unit 603, the data archiving processing apparatus 60 further includes: a second storage unit 6010;
and the second storage unit 6010 is used for storing the number of the participation activities by using a counting Cache strategy.
The second storage unit 6010 may further include a third query response unit 6011, where the third query response unit 6011 is configured to receive a fourth query request, and obtain the number of participating activities from the count Cache policy in response to the fourth query request.
It should be noted that the implementation of each unit may also correspond to the corresponding description of the method embodiment shown in fig. 1 to 5b, which is not repeated here.
Referring to fig. 7, fig. 7 is a schematic structural diagram of a data archiving and processing apparatus according to an embodiment of the present invention. As shown in fig. 7, an electronic device 700 may include: one or more processors 701, one or more memories 702, and one or more communication interfaces 703. These components may be connected by a bus 704 or other means, fig. 7 being an example of a connection via a bus. Wherein:
The communication interface 703 may be used for the electronic device 700 to communicate with other communication devices, such as other electronic devices. In particular, the communication interface 703 may be a wired interface.
Memory 702 may be coupled to processor 701 through bus 704 or an input/output port, or memory 702 may be integrated with processor 701. Memory 702 is used to store various software programs and/or sets of instructions or data. In particular, memory 702 may be, but is not limited to, read-Only Memory (ROM) or other type of static storage device that may store static information and instructions, random access Memory (random access Memory, RAM) or other type of dynamic storage device that may store information and instructions, or an electrically erasable programmable read-Only Memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), compact disc read-Only Memory (Compact Disc Read-Only Memory) or other optical disk storage, optical disk storage (including compact disc, laser disc, optical disc, digital versatile disc, blu-ray disc, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. The memory 702 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices, or other non-volatile solid state storage devices. The memory 702 may store an operating system (hereinafter referred to as a system), such as an embedded operating system, for example uCOS, vxWorks, RTLinux. The memory 702 may also store network communication programs that may be used to communicate with one or more additional devices, one or more user devices, and one or more electronic devices. The memory may be stand alone and coupled to the processor via a bus. The memory may also be integrated with the processor.
Wherein the memory 702 is used for storing application program codes for executing the above schemes, and the execution is controlled by the processor 701. The processor 701 is configured to execute application code stored in the memory 702.
The processor 701 may be a central processor unit, a general purpose processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic device, a transistor logic device, a hardware component, or any combination thereof. Which may implement or perform the various exemplary logic blocks, modules, and circuits described in connection with this disclosure. The processor may also be a combination that performs certain functions, such as a combination comprising one or more microprocessors, a combination of a digital signal processor and a microprocessor, or the like.
In one embodiment, one or more instructions stored in a computer storage medium may be loaded and executed by processor 701 to implement the corresponding steps of the methods described above in connection with the data archiving process embodiments; in particular implementations, one or more instructions in a computer storage medium are loaded by processor 701 and perform the steps of:
receiving data of participating in an activity through a communication interface 703, the data of participating in the activity including identification data of a participant and activity information data;
Judging whether the preset marking set contains marking data corresponding to the identification data or not, wherein the marking data is generated after marking operation is carried out on the identification data;
if the marking data does not exist, marking the identification data in the marking set to obtain marking data corresponding to the identification data;
sequentially storing the identification data and the activity information data by a memory 702 using a first data structure; and after performing a stitching operation on the identification data and the activity information data to generate identification activity information data, the identification activity information data and the activity information data are sequentially stored by the memory 702 using a second data structure.
In yet another embodiment, after the processor 701 sequentially stores the identification data and the activity information data by the memory 702 using the first data structure, and sequentially stores the identification number activity information data and the activity information data by the memory 702 using the second data structure, the processor 701 is further configured to: receiving a first query request through the communication interface 703, and generating a first order list after traversing the first data structure in response to the first query request; the first sequence list comprises all the identification data in the first data structure, and the identification data in the first sequence list are arranged according to a first preset sequence;
Receiving a second query request through the communication interface 703, and generating a second order list after traversing the second data structure in response to the second query request; the second order list is a list arranged according to a second preset order of the identification activity information data.
In yet another embodiment, after the processor 701 sequentially stores the identification data and the activity information data by the memory 702 structure using the first data, and sequentially stores the identification activity information data and the activity information data by the memory 702 using the second data structure, the method further comprises:
receiving a third query request of a query user through the communication interface 703, wherein the third query request carries preset activity data; the preset activity data comprise identity data of an associated user and preset activity information data; the third query request is used for querying whether the associated user participates in an activity; the associated user is a user with an associated relation with the inquiring user;
inquiring a target participant in the associated user according to a preset mark set, wherein the target participant is the associated user with mark data corresponding to the identity mark data in the mark set; the preset mark set is the mark set of the preset activity data;
And acquiring activity information data corresponding to the identification data of the target participant from the first data structure or the second data structure.
In yet another embodiment, after the processor 701 performs the marking operation on the identification data, the processor 701 is further configured to store the number of participation activities of all the participants using a counter Cache policy.
In yet another embodiment, the processor 701 is further configured to receive a fourth query request through the communication interface 703, and obtain, in response to the fourth query request, the number of participation activities of all the participants from the count Cache policy.
In yet another embodiment, the processor 701 uses the first data structure to sequentially store the identification data and the activity information data by the memory 702 in particular for:
storing the identification data into a first key field of the first data structure according to a first preset sequence of the identification data;
and storing the activity information data into a first value field of the first data structure, wherein the first value field is the first value field corresponding to the first key field storing the identification data.
In yet another embodiment, the processor 701 sequentially storing the identification campaign information data and the campaign information data by the memory 702 using the second data structure comprises:
Storing the identification activity information data in a second key field of the second data structure according to a second preset sequence of the activity information data;
and storing the activity information data into a second value field of the second data structure, wherein the second value field is the second value field corresponding to the second key field storing the identification activity information data.
In yet another embodiment, the processor 701 performs a marking operation on the identification data to generate and store the marking data in the memory 702, where the marking data is specifically used for:
calculating the identity identification data through an operation function to generate position data;
judging whether preset mark data exists at a bit position corresponding to the position data in a preset mark set, wherein the mark set is an array with the length of N bits.
It should be noted that the electronic device 700 shown in fig. 7 is merely an implementation manner of the embodiment of the present invention, and in practical application, the electronic device 700 may further include more or fewer components, which is not limited herein. For specific implementation of the electronic device 700, reference may be made to the foregoing description of the method embodiments shown in fig. 1 to 5b, which is not repeated here.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments.
It should be noted that, for simplicity of description, the foregoing method embodiments are all expressed as a series of action combinations, but it should be understood by those skilled in the art that the present application is not limited by the order of actions described, as some steps may be performed in other order or simultaneously in accordance with the present application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required in the present application.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, such as the above-described division of units, merely a division of logic functions, and there may be additional manners of dividing in actual implementation, such as multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, or may be in electrical or other forms.
The units described above as separate components may or may not be physically separate, and components shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units described above, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be essentially or a part contributing to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server or a network device, etc., specifically may be a processor in the computer device) to perform all or part of the steps of the above-mentioned method of the embodiments of the present application. Wherein the aforementioned storage medium may comprise: various media capable of storing program codes, such as a U disk, a removable hard disk, a magnetic disk, a compact disk, a Read-Only Memory (abbreviated as ROM), or a random access Memory (Random Access Memory, abbreviated as RAM), are provided.
Those of ordinary skill in the art will appreciate that implementing all or part of the above-described method embodiments may be accomplished by a computer program to instruct related hardware, the program may be stored in a computer readable storage medium, and the program may include the above-described method embodiments when executed. And the aforementioned storage medium includes: ROM or random access memory RAM, magnetic or optical disk, etc.

Claims (13)

1. A data archiving processing method, the method comprising:
receiving data of participating in an activity, wherein the data of participating in the activity comprises identification data of a participant and activity information data;
judging whether the mark data corresponding to the identity data exists in a preset mark set or not, wherein the mark data is generated after the mark operation is performed on the identity data, and the mark set is used for recording active participants and comprises the following steps: calculating the identity identification data through an operation function to generate position data; judging whether preset mark data exists at bit positions corresponding to the position data in a preset mark set, wherein the mark set is an array with the length of N bits;
If the marking data do not exist, the marking set is indicated that the user identification data do not exist, and marking operation is carried out on the identification data in the marking set so as to obtain marking data corresponding to the identification data;
storing the identity data and the activity information data according to the size sequence of the identity data by using a first data structure; after the identity identification data and the activity information data are spliced to generate identity identification activity information data, the identity identification activity information data and the activity information data are sequentially stored by using a second data structure;
the method further comprises the steps of:
a first query request is received, and a first sequence list is generated after traversing the first data structure in response to the first query request; the first sequence list comprises all the identification data in the first data structure, the identification data in the first sequence list are arranged according to a first preset sequence, and the first query request is used for querying the identification data of all the participants; or alternatively, the first and second heat exchangers may be,
a second query request is received, and a second sequence list is generated after traversing the second data structure in response to the second query request; the second order list is a list in which the identification activity information data are arranged according to a second preset order, and the second query request is used for querying the identification activity data of all participants.
2. The method of claim 1, wherein after sequentially storing the identification data and the activity information data using a first data structure and sequentially storing the identification activity information data and the activity information data using a second data structure, the method further comprises:
receiving a third query request of a query user, wherein the third query request carries preset activity data; the preset activity data comprise identity data of an associated user and preset activity information data; the third query request is used for querying whether the associated user participates in an activity; the associated user is a user with an associated relation with the inquiring user;
inquiring a target participant in the associated user according to a preset mark set, wherein the target participant is the associated user with mark data corresponding to the identity mark data in the mark set; the preset mark set is the mark set of the preset activity data;
and acquiring activity information data corresponding to the identification data of the target participant from the first data structure or the second data structure.
3. The method of claim 1, wherein after the marking the identification data in the marking set, further comprising:
the count Cache policy is used to store the number of activities that all participants are engaged in.
4. A method according to claim 3, characterized in that the method further comprises:
and receiving a fourth query request, and responding to the fourth query request to acquire the number of all the participators participating in the activity from the counting Cache strategy.
5. The method of claim 1, wherein sequentially storing the identification data and the activity information data using a first data structure comprises:
storing the identification data into a first key field of the first data structure according to a first preset sequence of the identification data;
and storing the activity information data into a first value field of the first data structure, wherein the first value field is the value field corresponding to the first key field storing the identification data.
6. The method of claim 1, wherein the sequentially storing the identification campaign information data and the campaign information data using a second data structure comprises:
Storing the identification activity information data in a second key field of the second data structure according to a second preset sequence of the activity information data;
and storing the activity information data into a second value field of the second data structure, wherein the second value field is the value field corresponding to the second key field storing the identification activity information data.
7. The method of claim 1, wherein the determining whether the tag data corresponding to the identification data exists in the preset tag set includes:
calculating the identity identification data through an operation function to generate position data;
judging whether preset mark data exists at a bit position corresponding to the position data in a preset mark set, wherein the mark set is an array with the length of N bits.
8. A data archiving and processing apparatus, comprising:
the first receiving unit is used for receiving data of participating in an activity, wherein the data of participating in the activity comprises identification data of a participant and activity information data;
the judging unit is used for judging whether the mark data corresponding to the identity mark data exists in a preset mark set or not, the mark data are generated after the mark operation is carried out on the identity mark data, the mark set is used for recording active participants, and the judging unit is also used for carrying out operation on the identity mark data through an operation function to generate position data; judging whether preset mark data exists at bit positions corresponding to the position data in a preset mark set, wherein the mark set is an array with the length of N bits;
The mark storage unit is used for indicating that the mark set does not have the identification data of the user if the mark data do not exist, and marking the identification data in the mark set to obtain the mark data corresponding to the identification data;
a first storage unit for storing the identification data and the activity information data according to the size sequence of the identification data by using a first data structure; after the identity identification data and the activity information data are spliced to generate identity identification activity information data, the identity identification activity information data and the activity information data are sequentially stored by using a second data structure;
the apparatus further comprises:
the first receiving response unit is used for receiving a first query request, and generating a first sequence list after traversing the first data structure in response to the first query request; the first sequence list comprises all the identification data in the first data structure, the identification data in the first sequence list are arranged according to a first preset sequence, and the first query request is used for querying the identification data of all the participants;
The second receiving response unit is used for receiving a second query request, and generating a second sequence list after traversing the second data structure in response to the second query request; the second order list is a list of the identification activity information data which are arranged according to a second preset order, and the second query request is used for querying the identification activity data of all participants.
9. The apparatus of claim 8, further comprising, after sequentially storing the identification data and the activity information data by the first storage unit using a first data structure, and sequentially storing the identification activity information data and the activity information data using a second data structure:
the second receiving unit is used for receiving a third query request of the query user, wherein the third query request carries preset activity data; the preset activity data comprise identity data of an associated user and preset activity information data; the third query request is used for querying whether the associated user participates in an activity; the associated user is a user with an associated relation with the inquiring user;
The query unit is used for querying a target participant in the associated user according to a preset mark set, wherein the target participant is the associated user with mark data corresponding to the identity mark data in the mark set;
the acquisition unit is used for acquiring the activity information data corresponding to the identity identification data of the target participant from the first data structure or the second data structure.
10. The apparatus of claim 8, wherein after the marking operation of the identification data by the marking storage unit, the apparatus further comprises:
and the second storage unit is used for storing the number of the participation activities by using a counting Cache strategy.
11. The apparatus of claim 10, wherein the second storage unit further comprises:
and the third query response unit is used for receiving a fourth query request and responding to the fourth query request to acquire the number of the participation activities from the counting Cache strategy.
12. A data archiving and processing device comprising a processor, wherein the processor is configured to invoke a stored program to perform the method of any of claims 1-7.
13. A computer readable storage medium storing program instructions which, when executed by a processor, cause the processor to perform the method of any of claims 1-7.
CN202010191478.2A 2020-03-18 2020-03-18 Data archiving processing method, device, equipment and readable storage medium Active CN111400510B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010191478.2A CN111400510B (en) 2020-03-18 2020-03-18 Data archiving processing method, device, equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010191478.2A CN111400510B (en) 2020-03-18 2020-03-18 Data archiving processing method, device, equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN111400510A CN111400510A (en) 2020-07-10
CN111400510B true CN111400510B (en) 2024-02-27

Family

ID=71432606

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010191478.2A Active CN111400510B (en) 2020-03-18 2020-03-18 Data archiving processing method, device, equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN111400510B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113099255B (en) * 2021-04-01 2023-05-30 北京沃东天骏信息技术有限公司 Data generation method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104184656A (en) * 2014-08-22 2014-12-03 广州华多网络科技有限公司 Information display method and application server
CN108830632A (en) * 2018-04-24 2018-11-16 深圳市轱辘车联数据技术有限公司 A kind of integration managing method, block chain node device and client
CN110064640A (en) * 2019-03-27 2019-07-30 宁波加多美机械科技有限公司 A kind of resident's day refuse intelligence categorised collection processing method
CN110113393A (en) * 2019-04-18 2019-08-09 北京奇艺世纪科技有限公司 A kind of information push method, device, electronic equipment and medium
CN110523083A (en) * 2019-09-05 2019-12-03 网易(杭州)网络有限公司 Processing method, device and the server device of log-in events
CN110609970A (en) * 2019-08-29 2019-12-24 北京大米科技有限公司 User identity identification method and device, storage medium and electronic equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10419907B2 (en) * 2012-02-22 2019-09-17 Qualcomm Incorporated Proximity application discovery and provisioning

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104184656A (en) * 2014-08-22 2014-12-03 广州华多网络科技有限公司 Information display method and application server
CN108830632A (en) * 2018-04-24 2018-11-16 深圳市轱辘车联数据技术有限公司 A kind of integration managing method, block chain node device and client
CN110064640A (en) * 2019-03-27 2019-07-30 宁波加多美机械科技有限公司 A kind of resident's day refuse intelligence categorised collection processing method
CN110113393A (en) * 2019-04-18 2019-08-09 北京奇艺世纪科技有限公司 A kind of information push method, device, electronic equipment and medium
CN110609970A (en) * 2019-08-29 2019-12-24 北京大米科技有限公司 User identity identification method and device, storage medium and electronic equipment
CN110523083A (en) * 2019-09-05 2019-12-03 网易(杭州)网络有限公司 Processing method, device and the server device of log-in events

Also Published As

Publication number Publication date
CN111400510A (en) 2020-07-10

Similar Documents

Publication Publication Date Title
CN110399487B (en) Text classification method and device, electronic equipment and storage medium
CN107122431A (en) A kind of real-time calculating platform and the method for computing data based on real-time calculating platform
CN110704677B (en) Program recommendation method and device, readable storage medium and terminal equipment
CN115544183B (en) Data visualization method, device, computer equipment and storage medium
CN109359237A (en) It is a kind of for search for boarding program method and apparatus
CN111475105A (en) Monitoring data storage method, device, server and storage medium
CN111159563A (en) Method, device and equipment for determining user interest point information and storage medium
CN108665513B (en) Drawing method and device based on user behavior data
CN112860777B (en) Data processing method, device and equipment
CN112307264A (en) Data query method and device, storage medium and electronic equipment
CN110046155A (en) The update of property data base, data characteristics determination method, device and equipment
CN111400510B (en) Data archiving processing method, device, equipment and readable storage medium
CN114862140A (en) Behavior analysis-based potential evaluation method, device, equipment and storage medium
CN111782587A (en) Snapshot information recording method, device, equipment and storage medium
CN115225308B (en) Attack partner identification method for large-scale group attack flow and related equipment
CN115481026A (en) Test case generation method and device, computer equipment and storage medium
CN102906740A (en) Method and system for compressing data records and for processing compressed data records
CN111143006B (en) Method and device for acquiring command help information
CN113422826A (en) Information pushing method and device
CN116012118B (en) Product recommendation method and device
CN110245208B (en) Retrieval analysis method, device and medium based on big data storage
WO2023152965A1 (en) Data providing device, data providing method, and program
CN110598072B (en) Feature data aggregation method and device
CN116634008A (en) Information pushing method, device, computer equipment and storage medium
CN117033451A (en) Searching method, searching 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