CN113722318A - Storage query method, system, device and medium for user-defined crowd package - Google Patents

Storage query method, system, device and medium for user-defined crowd package Download PDF

Info

Publication number
CN113722318A
CN113722318A CN202110837560.2A CN202110837560A CN113722318A CN 113722318 A CN113722318 A CN 113722318A CN 202110837560 A CN202110837560 A CN 202110837560A CN 113722318 A CN113722318 A CN 113722318A
Authority
CN
China
Prior art keywords
crowd
packet
storage
package
database
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110837560.2A
Other languages
Chinese (zh)
Inventor
田力
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Enyike Beijing Data Technology Co ltd
Original Assignee
Enyike Beijing Data Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Enyike Beijing Data Technology Co ltd filed Critical Enyike Beijing Data Technology Co ltd
Priority to CN202110837560.2A priority Critical patent/CN113722318A/en
Publication of CN113722318A publication Critical patent/CN113722318A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2291User-Defined Types; Storage management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24552Database cache management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to a storage query method, a system, equipment and a medium of a user-defined crowd packet. Wherein, the method comprises the following steps: storing the crowd package into a kv database according to a set storage structure, wherein the storage structure of the crowd package is as follows: the key is identifiable crowd packet id, and the value is a specific tag value of the crowd packet id and a corresponding crowd packet expiration timestamp. The crowd packet storage structure adopted in the technical scheme provided by the invention not only solves the matching of specific tag values which can be needed by a business party, but also solves the timeliness problem of the crowd packet by storing the expiration timestamp of the crowd packet, and is convenient for the business party to effectively store and quickly query the crowd packet.

Description

Storage query method, system, device and medium for user-defined crowd package
Technical Field
The invention relates to the field of databases, in particular to a storage query method, a storage query system, storage query equipment and a storage query medium for a user-defined crowd packet.
Background
The user-defined crowd is a special oriented condition, business personnel can create a user-defined audience aiming at any user group according to needs, and can be used for helping the business personnel to lock users with high potential in a specific business field or eliminate non-target users with low potential.
At present, the crowd package id + crowd id can be stored in a database in a common user-defined crowd package mode so that a business party can judge crowds according to requirements, the crowd id can also be used as a key, the crowd package id where the id is located is stored in a kv database as a value, and the query efficiency is improved.
Disclosure of Invention
To overcome the problems in the related art, the invention provides a storage query method, a system, equipment and a medium for a user-defined crowd package.
According to a first aspect of the embodiments of the present invention, there is provided a method for storing and querying a customized crowd packet, including:
storing the crowd package into a kv database according to a set storage structure, wherein the storage structure of the crowd package is as follows: the key is identifiable crowd packet id, and the value is a specific tag value of the crowd packet id and a corresponding crowd packet expiration timestamp.
Further, in the storage structure of the crowd packet, the value structure adopts a hash structure.
Further, a Redis database is adopted as a kv database for storing the crowd packets.
Further, before storing the crowd package into the kv database according to the set storage structure, the method further comprises:
according to the crowd packet expiration timestamp in the value of the crowd packet, eliminating the expired crowd packet;
and storing the rest unexpired crowd packets into a kv database.
According to a second aspect of the embodiments of the present invention, there is provided a storage query system for customized crowd packets, including:
the storage query module is used for storing the crowd package into the kv database according to a set storage structure, wherein the storage structure of the crowd package is as follows: the key is identifiable crowd packet id, and the value is a specific tag value of the crowd packet id and a corresponding crowd packet expiration timestamp.
Further, in the storage structure of the crowd packet, the value structure adopts a hash structure.
Further, a Redis database is adopted as a kv database for storing the crowd packets.
Further, the system further comprises:
the screening module is used for eliminating expired crowd packets according to the expiration timestamp of the crowd packets in the value of the crowd packets before the storage query module stores the crowd packets into the kv database according to the set storage structure;
and the storage query module is used for storing the rest unexpired crowd packets into a kv database.
According to a third aspect of the embodiments of the present invention, there is provided a terminal device, including:
a processor; and
a memory having executable code stored thereon which, when executed by the processor, causes the processor to perform the method as described above.
According to a fourth aspect of embodiments of the present invention, there is provided a non-transitory machine-readable storage medium having stored thereon executable code, which when executed by a processor of an electronic device, causes the processor to perform the method as described above.
The technical scheme provided by the embodiment of the invention can have the following beneficial effects:
the crowd packet storage structure adopted by the invention not only solves the matching of specific tag values which can be needed by a business party, but also solves the timeliness problem of the crowd packet by storing the expiration timestamp of the crowd packet, thereby being convenient for the business party to effectively store and quickly inquire the crowd packet.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention as claimed.
Drawings
The above and other objects, features and advantages of the present invention will become more apparent by describing in more detail exemplary embodiments thereof with reference to the attached drawings, in which like reference numerals generally represent like parts throughout.
FIG. 1 is a flow chart illustrating a method for querying a storage of a custom crowd package according to an exemplary embodiment of the present invention;
FIG. 2 is a block diagram illustrating the architecture of a custom crowd pack storage query system in accordance with an exemplary embodiment of the present invention;
fig. 3 is a schematic structural diagram illustrating a computing device executing a method for storing queries of a custom crowd package according to an exemplary embodiment of the invention.
Detailed Description
Preferred embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While the preferred embodiments of the present invention are shown in the drawings, it should be understood that the present invention may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that, although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, the first information may also be referred to as second information, and similarly, the second information may also be referred to as first information, without departing from the scope of the present invention. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present invention, "a plurality" means two or more unless specifically defined otherwise.
The technical solutions of the embodiments of the present invention are described in detail below with reference to the accompanying drawings.
The embodiment of the invention provides a storage query method for a user-defined crowd packet, which comprises the following steps:
storing the crowd package into a kv database according to a set storage structure, wherein the storage structure of the crowd package is as follows: the key is identifiable crowd packet id, and the value is a specific tag value of the crowd packet id and a corresponding crowd packet expiration timestamp.
Specifically, in this embodiment, the kv database for storing the crowd package may be a Redis database, or other kv databases.
In the storage structure of the crowd packet, the value structure adopts a hash structure. An example hash structure for a value store is as follows:
suppose there are three crowd pack ids that can identify id: p1, p2 and p3, the memory structures are shown in the following table:
p1 specific label value
_p1 The crowd packet expiration timestamp
p2 Specific label value
_p2 The crowd packet expiration timestamp
p3 Concrete labelValue of
_p3 The crowd packet expiration timestamp
The storage query method for the user-defined crowd package provided by the embodiment adopts the crowd package storage structure, the storage is more flexible, the matching of specific tag values which can be needed by a business party is solved, the tags can be accurately output according to the expiration timestamps of the tags in the query process by storing the expiration timestamps of the crowd package, and the timeliness problem of the crowd package is also solved.
Fig. 1 is a flowchart illustrating a storage query method for a custom crowd package according to an exemplary embodiment of the present invention.
Optionally, as an embodiment of the present invention, as shown in fig. 1, the method includes:
110. removing the expired crowd packets according to the expiration time stamps of the crowd packets in the value of the crowd packets;
120. and storing the rest unexpired crowd packets into a kv database.
On the basis of the previous embodiment, whether the crowd packet is expired or not is confirmed according to the expiration timestamp of the crowd packet in the value of the crowd packet during data storage, and the expiration tag is removed, so that the expired time packet is not stored, and only the remaining unexpired crowd packets are stored in the kv database, thereby effectively saving the storage space in the kv database and being beneficial to improving the performance of subsequent processing.
Corresponding to the above method embodiment, an embodiment of the present invention provides a storage query system for a user-defined crowd packet, including:
the storage query module is used for storing the crowd package into the kv database according to a set storage structure, wherein the storage structure of the crowd package is as follows: the key is identifiable crowd packet id, and the value is a specific tag value of the crowd packet id and a corresponding crowd packet expiration timestamp.
Specifically, in this embodiment, a Redis database is used as the kv database for storing the crowd package, and of course, other types of kv databases may be used as needed.
In the storage structure of the crowd packet, the value structure adopts a hash structure.
The storage query system of self-defined crowd's package that this embodiment provided adopts foretell crowd's package storage structure, and the more flexibility of storage both has solved the matching of the concrete tag value that the business side can need to through the expiration timestamp of storage crowd's package, can be in the inquiry according to the accurate output label of the expiration timestamp of label, thereby also solved the timeliness problem of crowd's package.
Fig. 2 is a block diagram illustrating a storage query system for a custom crowd bag according to an exemplary embodiment of the present invention.
Optionally, as an embodiment of the present invention, as shown in fig. 2, the system includes:
the screening module is used for eliminating the expired crowd packets according to the expiration time stamps of the crowd packets in the value of the crowd packets;
and the storage query module is used for storing the rest unexpired crowd packets into the kv database according to a set storage structure.
On the basis of the previous embodiment, whether the crowd packet is expired or not is confirmed according to the expiration timestamp of the crowd packet in the value of the crowd packet during data storage, and the expiration tag is removed, so that the expired time packet is not stored, and only the remaining unexpired crowd packets are stored in the kv database, thereby effectively saving the storage space in the kv database and being beneficial to improving the performance of subsequent processing.
With regard to the system in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
FIG. 3 is a schematic diagram illustrating a computing device according to an exemplary embodiment of the present invention.
Referring to fig. 3, computing device 300 includes memory 310 and processor 320.
The Processor 320 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 310 may include various types of storage units, such as a system memory, a Read Only Memory (ROM), and a permanent storage device. Wherein the ROM may store static data or instructions that are needed by the processor 320 or other modules of the computer. The persistent storage device may be a read-write storage device. The persistent storage may be a non-volatile storage device that does not lose stored instructions and data even after the computer is powered off. In some embodiments, the persistent storage device employs a large capacity storage device (e.g., magnetic or optical disk, flash memory) as the persistent storage device. In other embodiments, the permanent storage may be a removable storage device (e.g., floppy disk, optical drive). The system memory may be a read-write memory device or a volatile read-write memory device, such as a dynamic random access memory. The system memory may store instructions and data that some or all of the processors require at runtime. Further, memory 310 may comprise any combination of computer-readable storage media, including various types of semiconductor memory chips (DRAM, SRAM, SDRAM, flash, programmable read-only memory), magnetic and/or optical disks, may also be employed. In some embodiments, memory 310 may include a removable storage device that is readable and/or writable, such as a Compact Disc (CD), a read-only digital versatile disc (e.g., DVD-ROM, dual layer DVD-ROM), a read-only Blu-ray disc, an ultra-high density optical disc, a flash memory card (e.g., SD card, min SD card, Micro-SD card, etc.), a magnetic floppy disc, or the like. Computer-readable storage media do not contain carrier waves or transitory electronic signals transmitted by wireless or wired means.
The memory 310 has stored thereon executable code that, when processed by the processor 320, may cause the processor 320 to perform some or all of the methods described above.
The aspects of the invention have been described in detail hereinabove with reference to the drawings. In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments. Those skilled in the art should also appreciate that acts and modules referred to in the specification are not necessarily required by the invention. In addition, it can be understood that the steps in the method according to the embodiment of the present invention may be sequentially adjusted, combined, and deleted according to actual needs, and the modules in the device according to the embodiment of the present invention may be combined, divided, and deleted according to actual needs.
Furthermore, the method according to the invention may also be implemented as a computer program or computer program product comprising computer program code instructions for carrying out part or all of the steps of the above-described method of the invention.
Alternatively, the present invention may also be embodied as a non-transitory machine-readable storage medium (or computer-readable storage medium, or machine-readable storage medium) having stored thereon executable code (or a computer program, or computer instruction code) which, when executed by a processor of an electronic device (or computing device, server, etc.), causes the processor to perform part or all of the steps of the above-described method according to the present invention.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems and methods according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Having described embodiments of the present invention, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (10)

1. A storage query method of a user-defined crowd packet is characterized by comprising the following steps:
storing the crowd package into a kv database according to a set storage structure, wherein the storage structure of the crowd package is as follows: the key is identifiable crowd packet id, and the value is a specific tag value of the crowd packet id and a corresponding crowd packet expiration timestamp.
2. The method as claimed in claim 1, wherein in the storage structure of the crowd package, a hash structure is adopted as a value structure.
3. The method as claimed in claim 1, wherein the kv database for storing the crowd package is a Redis database.
4. The method for self-defining crowd storage and query according to any one of claims 1 to 3, wherein before storing the crowd package into the kv database according to the set storage structure, the method further comprises:
according to the crowd packet expiration timestamp in the value of the crowd packet, eliminating the expired crowd packet;
and storing the rest unexpired crowd packets into a kv database.
5. A system for storing and querying a custom crowd pack, comprising:
the storage query module is used for storing the crowd package into the kv database according to a set storage structure, wherein the storage structure of the crowd package is as follows: the key is identifiable crowd packet id, and the value is a specific tag value of the crowd packet id and a corresponding crowd packet expiration timestamp.
6. The system according to claim 5, wherein in the storage structure of the crowd package, the value structure adopts a hash structure.
7. The system of claim 5, wherein the kv database for storing the crowd package is a Redis database.
8. The system of any one of claims 5-7, further comprising:
the screening module is used for eliminating expired crowd packets according to the expiration timestamp of the crowd packets in the value of the crowd packets before the storage query module stores the crowd packets into the kv database according to the set storage structure;
and the storage query module is used for storing the rest unexpired crowd packets into a kv database.
9. A terminal device, comprising:
a processor; and
a memory having executable code stored thereon, which when executed by the processor, causes the processor to perform the method of any one of claims 1-4.
10. A non-transitory machine-readable storage medium having executable code stored thereon, wherein the executable code, when executed by a processor of an electronic device, causes the processor to perform the method of any of claims 1-4.
CN202110837560.2A 2021-07-23 2021-07-23 Storage query method, system, device and medium for user-defined crowd package Pending CN113722318A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110837560.2A CN113722318A (en) 2021-07-23 2021-07-23 Storage query method, system, device and medium for user-defined crowd package

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110837560.2A CN113722318A (en) 2021-07-23 2021-07-23 Storage query method, system, device and medium for user-defined crowd package

Publications (1)

Publication Number Publication Date
CN113722318A true CN113722318A (en) 2021-11-30

Family

ID=78673843

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110837560.2A Pending CN113722318A (en) 2021-07-23 2021-07-23 Storage query method, system, device and medium for user-defined crowd package

Country Status (1)

Country Link
CN (1) CN113722318A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110968582A (en) * 2019-11-01 2020-04-07 苏宁云计算有限公司 Crowd generation method and device
CN111292137A (en) * 2020-03-10 2020-06-16 联通沃音乐文化有限公司 Method for accurately delivering internet advertisements
CN111951040A (en) * 2020-07-20 2020-11-17 上海淇馥信息技术有限公司 Information sending method and device, electronic equipment and storage medium
CN112559857A (en) * 2020-12-10 2021-03-26 上海明略人工智能(集团)有限公司 Redis-based crowd pack application method and system, electronic device and storage medium
CN112819531A (en) * 2021-01-30 2021-05-18 北京奇保信安科技有限公司 User-defined online method and device for crowd package and electronic equipment
US20210226927A1 (en) * 2015-10-28 2021-07-22 Qomplx, Inc. System and method for fingerprint-based network mapping of cyber-physical assets

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210226927A1 (en) * 2015-10-28 2021-07-22 Qomplx, Inc. System and method for fingerprint-based network mapping of cyber-physical assets
CN110968582A (en) * 2019-11-01 2020-04-07 苏宁云计算有限公司 Crowd generation method and device
CN111292137A (en) * 2020-03-10 2020-06-16 联通沃音乐文化有限公司 Method for accurately delivering internet advertisements
CN111951040A (en) * 2020-07-20 2020-11-17 上海淇馥信息技术有限公司 Information sending method and device, electronic equipment and storage medium
CN112559857A (en) * 2020-12-10 2021-03-26 上海明略人工智能(集团)有限公司 Redis-based crowd pack application method and system, electronic device and storage medium
CN112819531A (en) * 2021-01-30 2021-05-18 北京奇保信安科技有限公司 User-defined online method and device for crowd package and electronic equipment

Similar Documents

Publication Publication Date Title
WO2015106711A1 (en) Method and device for constructing nosql database index for semi-structured data
WO2017219858A1 (en) Streaming data distributed processing method and device
CN108846749A (en) A kind of sliced transaction execution system and method based on block chain technology
CN107085570A (en) Data processing method, application server and router
CN108512726B (en) Data monitoring method and equipment
CN107391544B (en) Processing method, device and equipment of column type storage data and computer storage medium
CN116450759A (en) High-precision map data query method, rendering method and related devices
CN105183399A (en) Data writing and reading method and device based on elastic block storage
WO2017020735A1 (en) Data processing method, backup server and storage system
CN113656397A (en) Index construction and query method and device for time series data
CN114721594A (en) Distributed storage method, device, equipment and machine readable storage medium
CN113722318A (en) Storage query method, system, device and medium for user-defined crowd package
CN109271097B (en) Data processing method, data processing device and server
CN109901991A (en) A kind of method, apparatus and electronic equipment for analyzing exception call
CN103324733A (en) File reconstructable storage and management method based on database
US20140067751A1 (en) Compressed set representation for sets as measures in olap cubes
CN109542860B (en) Service data management method based on HDFS and terminal equipment
CN113468180A (en) MySQL-based table design method and system for dynamically expanding data fields
CN107193821A (en) Monitoring method and system
CN113609175A (en) E-commerce commodity attribute data processing method and device based on graph database
US8533167B1 (en) Compressed set representation for sets as measures in OLAP cubes
CN113672687B (en) E-commerce big data processing method, device, equipment and storage medium
CN110262758B (en) Data storage management method, system and related equipment
CN113486627B (en) Single number generation method and device and electronic equipment
US9367582B2 (en) Systems and methods involving information objects

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