CN115599976B - User grouping method, device, electronic equipment and storage medium - Google Patents

User grouping method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115599976B
CN115599976B CN202211496334.3A CN202211496334A CN115599976B CN 115599976 B CN115599976 B CN 115599976B CN 202211496334 A CN202211496334 A CN 202211496334A CN 115599976 B CN115599976 B CN 115599976B
Authority
CN
China
Prior art keywords
grouping
user
information
mapping
condition
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
CN202211496334.3A
Other languages
Chinese (zh)
Other versions
CN115599976A (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.)
China Foreign Transport Co ltd
Original Assignee
China Foreign Transport 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 China Foreign Transport Co ltd filed Critical China Foreign Transport Co ltd
Priority to CN202211496334.3A priority Critical patent/CN115599976B/en
Publication of CN115599976A publication Critical patent/CN115599976A/en
Application granted granted Critical
Publication of CN115599976B publication Critical patent/CN115599976B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/906Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • 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

Landscapes

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

Abstract

The invention relates to the technical field of computers, and provides a user grouping method, a device, electronic equipment and a storage medium, wherein the method comprises the following steps: determining a grouping information table, a user event table and a user grouping mapping table; based on any grouping information in the grouping information table, a user event table and a user grouping mapping table are applied to determine a grouping result corresponding to the grouping information; the grouping information comprises a grouping identifier and a grouping conditional expression; the grouping information is created and modified based on the grouping conditions and the condition logic input by the front end; the user grouping mapping in the user grouping mapping table is determined based on the user event table and the grouping conditional expression in the grouping information at regular time; the user event table is used for recording user information and user operation event information, so that the mapping relation among grouping information, user information and event information is completed through the user grouping mapping table, a grouping result is obtained only through grouping identification, the time complexity of user grouping is reduced, and the efficiency is improved.

Description

User grouping method, device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a user grouping method, a device, an electronic device, and a storage medium.
Background
With the rapid development of big data technology, big data processing algorithms are also becoming more important for the user operation part. The application configuration manager for user behavior analysis can define different groups so that other modules analyze the characteristics of target groups and get insight into the habit of users; and simultaneously, the attribute of each user and the operation flow of each access service system are supported to be recorded and queried.
The existing user grouping method mostly applies a trained grouping model, or groups users based on grouping conditions, but the grouping model cannot well cope with the change of the grouping conditions, a new sample corresponding to the grouping conditions is needed to be used for training the grouping model, and the grouping of the users based on the grouping conditions is that each time the user grouping is checked, the user identification is obtained by searching with the user attribute conditions, and then the corresponding user behavior is searched through the user identification.
Disclosure of Invention
The invention provides a user grouping method, a device, electronic equipment and a storage medium, which are used for solving the defect of low efficiency caused by higher complexity of query flow events of user grouping in the prior art.
The invention provides a user grouping method, which comprises the following steps:
determining a grouping information table, a user event table and a user grouping mapping table;
based on any grouping information in the grouping information table, the user event table and the user grouping mapping table are applied to determine a grouping result corresponding to the any grouping information; any grouping information comprises a grouping identifier and a grouping conditional expression;
any grouping information is created and modified based on the front-end input grouping conditions and condition logic; the user grouping mapping in the user grouping mapping table is determined based on the grouping conditional expression in the user event table and any grouping information at regular time; the user event table is used for recording user information and user operation event information.
According to the user grouping method provided by the invention, the user grouping mapping in the user grouping mapping table is determined as follows:
analyzing the grouping condition expression in any piece of grouping information to obtain each grouping condition of any piece of grouping information and a logic relation between each grouping condition;
based on the logic relation between the grouping conditions of any grouping information, splicing the grouping conditions of any grouping information to obtain a query condition statement of any grouping information;
determining a grouping query statement of any grouping information based on the table name of the user event table and the query condition statement of any grouping information;
based on the user event table, the grouping query statement of any grouping information is applied, the user grouping mapping of any grouping information is determined, and the user grouping mapping of any grouping information is written into the user grouping mapping table.
According to the user grouping method provided by the invention, the grouping query statement of any grouping information is applied based on the user event table, and the user grouping mapping of any grouping information is determined, which comprises the following steps:
based on the user event table, applying the grouping query statement of any grouping information to determine a user identification list;
and determining a user grouping mapping of any grouping information based on any user identification in the user identification list and the grouping identification in the any grouping information.
According to the user grouping method provided by the invention, before analyzing the grouping condition expression in any piece of grouping information to obtain each grouping condition of any piece of grouping information and the logic relationship between each grouping condition, the method further comprises the following steps: and clearing the original user grouping mapping in the user grouping mapping table.
According to the user grouping method provided by the invention, the grouping result corresponding to any grouping information is determined by applying the user event table and the user grouping mapping table based on any grouping information in the grouping information table, and the method comprises the following steps:
connecting the user grouping mapping table with the user event table to obtain an association table;
and based on the association table, inquiring by using the grouping identification in any piece of grouping information to obtain a grouping result corresponding to any piece of grouping information.
According to the user grouping method provided by the invention, any grouping information is created and modified based on the grouping condition and the condition logic input by the front end, and the method comprises the following steps:
responding to a grouping identifier, a grouping name, the grouping condition and the condition logic which are transmitted by a user at the front end;
formatting the grouping conditions and the condition logic to obtain a conditional expression to be put in storage;
if the grouping identification is not empty and the grouping identification is recorded in the grouping information table, updating the grouping name and the conditional expression to be put in storage into the grouping information table based on the grouping identification;
otherwise the first set of parameters is selected,
under the condition that the grouping identification is empty, a new grouping identification is constructed based on the grouping name and the conditional expression to be put in storage, and the new grouping identification, the grouping name and the conditional expression to be put in storage are used as a piece of new grouping information to be written into the grouping information table;
and under the condition that the grouping identification is not empty, writing the grouping identification, the grouping name and the conditional expression to be put in storage into the grouping information table as a new piece of grouping information.
According to the user grouping method provided by the invention, the grouping conditions comprise user attribute conditions and user behavior conditions; the number of user attribute conditions and the number of user behavior conditions are each in the range of 1 to 3.
The invention also provides a user grouping device, which comprises:
the determining module is used for determining a grouping information table, a user event table and a user grouping mapping table;
the grouping module is used for determining a grouping result corresponding to any grouping information by applying the user event table and the user grouping mapping table based on any grouping information in the grouping information table; any grouping information comprises a grouping identifier and a grouping conditional expression;
any grouping information is created and modified based on the front-end input grouping conditions and condition logic; the user grouping mapping in the user grouping mapping table is determined based on the grouping conditional expression in the user event table and any grouping information at regular time; the user event table is used for recording user information and user operation event information.
The invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the user grouping method as described in any one of the above when executing the program.
The invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a user grouping method as described in any of the above.
The invention also provides a computer program product comprising a computer program which when executed by a processor implements a user grouping method as described in any one of the above.
According to the user grouping, device, electronic equipment and storage medium, the user grouping information table, the user event table and the user grouping mapping table are constructed, the user grouping mapping table is dynamically updated according to the conditional expression in the grouping information table and the user event in the user event table, then the user grouping mapping table is used as an intermediate table to obtain the grouping result corresponding to any grouping information, the mapping relation among the grouping information, the user information and the event information is achieved through the user grouping mapping table, the grouping result is obtained only through the grouping identification in the grouping information, the time complexity of the user grouping is reduced, the user grouping inquiring efficiency is improved, and meanwhile the mapping relation among the grouping information, the user information and the event information is dynamically updated through dynamically updating the user grouping mapping table, so that the user grouping accuracy is improved, and the user experience is improved.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a user grouping method provided by the invention;
FIG. 2 is a flow chart of a method for writing data in a user grouping mapping table provided by the invention;
FIG. 3 is a flow chart of a method for writing data in a grouping information table according to the present invention;
fig. 4 is a schematic structural diagram of a user grouping device provided by the present invention;
fig. 5 is a schematic structural diagram of an electronic device provided by the present invention.
Detailed Description
Embodiments of the present invention are described in further detail below with reference to the accompanying drawings and examples. The following examples are illustrative of the invention but are not intended to limit the scope of the invention.
In the description of the embodiments of the present invention, it should be noted that the directions or positional relationships indicated by the terms "upper", "lower", "front", "rear", "left", "right", etc. are based on the directions or positional relationships shown in the drawings, are merely for convenience of describing the embodiments of the present invention and to simplify the description, and do not indicate or imply that the devices or elements to be referred to must have a specific orientation, be configured and operated in a specific orientation, and thus should not be construed as limiting the embodiments of the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In describing embodiments of the present invention, it should be noted that, unless explicitly stated and limited otherwise, the terms "coupled," "coupled," and "connected" should be construed broadly, and may be either a fixed connection, a removable connection, or an integral connection, for example; can be mechanically or electrically connected; can be directly connected or indirectly connected through an intermediate medium. The specific meaning of the above terms in embodiments of the present invention will be understood in detail by those of ordinary skill in the art.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the embodiments of the present invention. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
At present, users are clustered based on clustering conditions, namely, user identification is obtained by searching under user attribute conditions every time when user clustering is checked, and then corresponding user behaviors are searched through the user identification.
Therefore, a technical problem to be solved by those skilled in the art is to simplify the query flow of the user grouping information after changing the grouping condition so as to improve the efficiency of the user grouping with the time complexity.
Aiming at the technical problems, the embodiment of the invention provides a user grouping method. Fig. 1 is a flow chart of a user grouping method provided by the invention. As shown in fig. 1, the method includes:
step 110, determining a grouping information table, a user event table and a user grouping mapping table;
it should be noted that, the user grouping mapping table may be used for recording a table of mapping relationships between user grouping information and user information, a mapping relationship may be established by using a user identifier and a grouping identifier, and a mapping relationship may also be established by using a grouping name and a user identifier, which is not limited in the embodiment of the present invention; the grouping information table may be used for recording a table of grouping information, where the grouping information may include a grouping name, a grouping identifier, a grouping condition, etc., which is not limited in the embodiment of the present invention; the user event table may be used to record user information and user operation event information, where the user information may include user attributes and user identifications, and the user operation event information may include event identifications and user behavior information.
Step 120, based on any grouping information in the grouping information table, a user event table and a user grouping mapping table are applied to determine a grouping result corresponding to the grouping information; the grouping information comprises a grouping identifier and a grouping conditional expression;
the grouping information is created and modified based on the grouping conditions and the condition logic input by the front end; the user grouping mapping in the user grouping mapping table is determined based on the user event table and the grouping conditional expression in the grouping information at regular time; the user event table is used for recording user information and user operation event information.
Specifically, any grouping information is obtained from a grouping information table, the grouping information comprises a grouping identifier and a grouping condition expression, wherein the grouping identifier is a unique identifier of the grouping information, for example, the grouping identifier is a GUID or a unique identifier defined in a system, the grouping condition expression is a format text recording one or more grouping conditions and a logical relationship between the grouping conditions under the condition that a plurality of grouping conditions exist, and the grouping result corresponding to the grouping information is obtained by searching the grouping identifier in the grouping information according to each user event in a user event table and each user grouping map in a user grouping map. The user grouping mapping in the user grouping mapping table can be determined based on the user information and the grouping information by searching in the user event table at regular time according to the grouping condition and the grouping logic in the grouping condition expression in the grouping information.
It should be noted that, the data in the grouping information table may be based on the front-end user inputting one or more grouping conditions, and a logical relationship between the grouping conditions, for example: whether an and or greater or lesser, embodiments of the invention are not limited in this respect. The grouping condition expression may be JSON text, XML text, or SQL language text, and when the grouping condition expression is a non-SQL language text, the grouping condition expression needs to be converted to generate an executable SQL language text, which is not limited by the embodiment of the present invention.
In addition, according to each user event in the user event table and each user grouping mapping in the user grouping mapping table, the searching by applying the grouping identification in the grouping information may be by using the user grouping mapping table as an intermediate table to perform joint searching on each user event in the user event table and each user grouping mapping in the user grouping mapping table in a connection searching manner, or a view may be constructed by first constructing a view through the user grouping mapping table and the user event table through the user information, the view realizes the mapping relationship among the user information, the grouping information and the event information, then applies the grouping identification in the grouping information to perform searching in the view, or connects the user grouping mapping table and the user event table to construct an association table, and after the user grouping mapping is acquired, the corresponding user event in the user grouping mapping table and the user event table is written in the association table as a record according to the user information, and then the association table is searched.
According to the user grouping method provided by the embodiment of the invention, the grouping information table, the user event table and the user grouping mapping table are constructed, the user grouping mapping table is dynamically updated according to the conditional expression in the grouping information table and the user event in the user event table, then the user grouping mapping table is used as an intermediate table to obtain the grouping result corresponding to any grouping information, the mapping relation among the grouping information, the user information and the event information is achieved through the user grouping mapping table, the grouping result is obtained only through the grouping identification in the grouping information, the time complexity of user grouping is reduced, the user grouping query efficiency is improved, and meanwhile, the mapping relation among the grouping information, the user information and the event information is dynamically updated through dynamically updating the user grouping mapping table, so that the user grouping accuracy is improved, and the user experience is improved.
Based on the above embodiments, fig. 2 is a flowchart illustrating a data writing method in a user grouping mapping table according to the present invention. As shown in fig. 2, the determining steps of the user grouping map in the user grouping map table are as follows:
step 210, analyzing the grouping condition expression in any grouping information to obtain each grouping condition of the grouping information and a logic relationship between each grouping condition;
step 220, based on the logical relation between the grouping conditions of the grouping information, splicing the grouping conditions of the grouping information to obtain the query condition statement of the grouping information;
step 230, determining a grouping query statement of the grouping information based on the table name of the user event table and the query condition statement of the grouping information;
step 240, based on the user event table, the grouping query statement of the grouping information is applied, the user grouping mapping of the grouping information is determined, and the user grouping mapping of the grouping information is written into the user grouping mapping table.
Specifically, according to the format of a preset grouping condition expression, analyzing the grouping condition expression in any grouping information in a grouping information table to obtain each grouping condition of the grouping information and a logic relation between each grouping condition, then according to the logic relation between each grouping condition of the grouping information, splicing each grouping condition according to SQL grammar to obtain a query condition statement of the grouping information, namely a statement of a part after a window in the SQL statement, then according to the table name of a user event table and the query condition statement of the grouping information, applying SQL grammar to form a grouping query statement of the grouping information, finally executing the grouping query statement of the grouping information to finish the query operation of the user event table to obtain user information corresponding to the grouping information, and writing the user information corresponding to the grouping information into a user grouping mapping table as a user grouping mapping.
It should be noted that, considering that the number of data records in the user event table may be huge, if the query is performed in full field, the query efficiency may be affected, so, according to the table name of the user event table and the query condition statement of the grouping information, the SQL grammar is applied, and the grouping query statement forming the grouping information may further be added into a specified field, for example: the fields such as the user identifier, the user attribute, the event identifier, the behavior event and the like are used as execution fields for query, so that the execution efficiency of the grouping query statement of the grouping information can be improved, and the embodiment of the invention is not limited to the above.
In addition, the grouping information and the user information corresponding to the grouping information may be used as a user grouping map, a grouping name and a user identifier in the grouping information and a user attribute identifier in the user information may be used as a user grouping map, or a grouping name and a user attribute identifier may be used as a user grouping map.
Based on the above embodiment, step 240 of determining the user grouping map of the grouping information based on the user event table by applying the grouping query statement of the grouping information includes:
step 241, determining a user identification list by applying any grouping query statement of grouping information based on the user event table;
step 242, determining a user grouping map of the grouping information based on any user identification in the user identification list and the grouping identification in the grouping information.
Considering that the identifier is generally used as a primary key or a foreign key, or an index is easy to establish, the query efficiency can be further improved, and therefore, the user grouping mapping of the embodiment of the invention is determined for grouping identifiers and user identifiers.
Specifically, inquiring in a user event table through a grouping inquiry statement of any grouping information in a grouping information table to obtain a user identification list; and determining the user grouping mapping of the grouping information by combining any user identifier in the user identifier list with the grouping identifier in the grouping information.
It should be noted that, the user identifier list may be 0 user identifiers, 1 user identifier, and a plurality of user identifiers, and step 242 is not performed under Qin An of the 0 user identifiers. The user grouping mapping of the grouping information may be a one-to-many case, that is, one grouping identifier corresponds to a plurality of user identifiers, and at this time, the user grouping mapping of the grouping information has a plurality of pieces of data, or may be a character string formed by dividing a user identifier list in a user identifier list by a special symbol, and then the grouping identifier and the character string form a user grouping mapping, where the user grouping mapping of the grouping information has only one piece of data. Preferably, the grouped identifications correspond to a plurality of user identifications, so that the step of analyzing to obtain the plurality of user identifications is avoided, and the query efficiency is further improved.
Based on the above embodiment, step 210 further includes: and clearing the original user grouping mapping in the user grouping mapping table.
Considering that the data in the user grouping mapping table also has the condition of large data volume, if operations such as updating or deleting are relatively time-consuming, the embodiment of the invention inserts new user grouping mapping or inserts new user grouping mapping in batches after the original user grouping mapping condition in the user grouping mapping table so as to reduce the updating time of the user grouping mapping table.
Based on the above embodiment, step 120 includes:
step 121, connecting the user grouping mapping table and the user event table to obtain an association table;
step 122, based on the association table, applying the grouping identification in any grouping information to query, and obtaining a grouping result corresponding to the grouping information.
Considering that the query efficiency is lower under the condition that more data in the user grouping mapping table or the user time table is used for query or view, the embodiment of the invention constructs the association table and writes the data by connecting the user grouping mapping table and the user event table.
Specifically, the grouping identification in the user grouping mapping table and the main field in the user event table are connected to obtain the field in the association table, the association table is constructed according to the field in the association table, the user grouping mapping in the user grouping mapping table is performed according to the user grouping mapping table, and the record of the grouping identification and the user identification corresponding to the grouping identification in the user event table is written into the association table. Then, when the user inquires any grouping information in the grouping information table, the grouping information is inquired in the association table according to the grouping identification in the grouping information, and a grouping result corresponding to the grouping information is obtained.
Based on the above embodiments, fig. 3 is a flowchart illustrating a data writing method in a grouping information table according to the present invention. As shown in fig. 3, the grouping information in the grouping information table is created and modified based on the grouping conditions and the condition logic of the front-end input, including:
step 310, responding to the grouping identification, grouping name, grouping condition and condition logic transmitted by the user at the front end;
specifically, the user edits the grouping name, the grouping condition and the condition logic at the front end and submits the grouping name, the grouping condition and the condition logic at the moment, and the grouping identification, the grouping name, the grouping condition and the condition logic are obtained in response to the submitting event.
If a logical relationship exists between two conditions in the grouping condition, the front end will input a corresponding logical relationship tag and a condition logic. In addition, the grouping identifier may be created by the front end, or the grouping identifier obtained by the front end from the back end when the grouping information is modified, and the grouping identifier may be empty, which is created in the user grouping method provided in the embodiment of the present invention, which is not limited in the embodiment of the present invention.
Step 320, formatting the grouping condition and the condition logic to obtain a conditional expression to be put in storage;
specifically, according to a preset format, formatting the grouping condition and the condition logic to obtain a conditional expression to be put in storage.
Step 330, if the grouping identification is not null and the grouping identification is recorded in the grouping information table, updating the grouping name and the conditional expression to be put in storage into the grouping information table based on the grouping identification;
otherwise the first set of parameters is selected,
under the condition that the grouping identification is empty, a new grouping identification is constructed based on the grouping name and the conditional expression to be put in storage, and the new grouping identification, the grouping name and the conditional expression to be put in storage are used as a piece of new grouping information to be written into a grouping information table;
and under the condition that the grouping identification is not empty, the grouping identification, the grouping name and the conditional expression to be put in storage are used as a piece of new grouping information to be written into a grouping information table.
In consideration of the fact that the grouping identifier in the grouping information table is unique, in order to prevent repeated addition or error reporting caused by execution of an insert sentence of the same grouping identifier, data accuracy is reduced or execution efficiency is reduced.
Specifically, when the grouping identifier is not empty, under the condition that the grouping identifier is not in the grouping information table, the grouping identifier, the grouping name and the conditional expression to be put in the warehouse, which are transmitted from the front end, are used as a new piece of grouping information to be written into the grouping information table, and under the condition that the grouping identifier is in the grouping information table, the records of the grouping identifier in the table are updated by the grouping name and the conditional expression to be put in the warehouse. If not, when the grouping identification is empty, a unique identification is created as a new grouping identification, and the new grouping identification, the grouping name accessed from the front end and the conditional expression to be put in storage are written into a grouping information table as a new piece of grouping information.
Preferably, the grouping condition includes a user attribute condition and a user behavior condition, wherein the number of the user attribute condition and the user behavior condition ranges from 1 to 3.
The user grouping device provided by the invention is described below, and the user grouping device described below and the user grouping method described above can be referred to correspondingly.
Fig. 4 is a schematic structural diagram of a user grouping device provided by the present invention. As shown in fig. 4, the apparatus includes: a determination module 410 and a grouping module 420.
Wherein, the liquid crystal display device comprises a liquid crystal display device,
a determining module 410, configured to determine a grouping information table, a user event table, and a user grouping mapping table;
the grouping module 420 is configured to determine a grouping result corresponding to the grouping information by applying the user event table and the user grouping mapping table based on any grouping information in the grouping information table; the grouping information comprises a grouping identifier and a grouping conditional expression;
the grouping information is created and modified based on the grouping conditions and the condition logic input by the front end; the user grouping mapping in the user grouping mapping table is determined based on the user event table and the grouping conditional expression in the grouping information at regular time; the user event table is used for recording user information and user operation event information group information, and the user event table is written in and used for recording the user information and the user operation event information.
The user grouping device provided by the embodiment of the invention can be used for determining a grouping information table, a user event table and a user grouping mapping table through the determining module 410;
the grouping module 420 is configured to determine a grouping result corresponding to the grouping information by applying the user event table and the user grouping mapping table based on any grouping information in the grouping information table; the grouping information comprises a grouping identifier and a grouping conditional expression; the grouping information is created and modified based on the grouping conditions and the condition logic input by the front end; the user grouping mapping in the user grouping mapping table is determined based on the user event table and the grouping conditional expression in the grouping information at regular time; the user event table is used for recording user information and user operation event information, the user event table is written in the user event table and used for recording the user information and the user operation event information, the mapping relation among the grouping information, the user information and the event information is completed through the user grouping mapping table, the grouping result is obtained only through grouping identification in the grouping information, the time complexity of user grouping is reduced, the efficiency of user grouping inquiry is improved, and meanwhile the mapping relation among the grouping information, the user information and the event information can be dynamically updated through dynamically updating the user grouping mapping table, so that the accuracy of user grouping is improved, and the experience of users is improved.
Based on any of the above embodiments, the grouping module 420 includes:
the analysis submodule is used for analyzing the grouping condition expression in any piece of grouping information to obtain each grouping condition of the grouping information and a logic relation between each grouping condition;
the splicing sub-module is used for splicing the grouping conditions of the grouping information based on the logic relation among the grouping conditions of the grouping information to obtain query condition sentences of the grouping information;
the assembling sub-module is used for determining grouping query sentences of the grouping information based on the table names of the user event tables and the query condition sentences of the grouping information;
and the execution sub-module is used for determining the user grouping mapping of the grouping information based on the user event table by applying the grouping query statement of the grouping information and writing the user grouping mapping of the grouping information into the user grouping mapping table.
Based on any of the above embodiments, executing the sub-module includes:
the identification sub-module is used for determining a user identification list by applying any grouping inquiry statement of grouping information based on the user event list;
and the mapping sub-module is used for determining the user grouping mapping of the grouping information based on any user identifier in the user identifier list and the grouping identifier in the grouping information.
Based on any of the above embodiments, the grouping module 420 further includes:
and the clearing sub-module is used for clearing the original user grouping mapping in the user grouping mapping table.
Based on any of the above embodiments, the grouping module 420 further includes:
the association sub-module is used for connecting the user grouping mapping table with the user event table to obtain an association table;
and the grouping sub-module is used for inquiring by applying the grouping identification in any piece of grouping information based on the association table to obtain a grouping result corresponding to the grouping information.
Based on any one of the foregoing embodiments, the user grouping device provided by the embodiment of the present invention further includes:
the response module is used for responding to the grouping identification, the grouping name, the grouping condition and the condition logic which are transmitted by the user at the front end;
the formatting module is used for formatting the grouping conditions and the condition logic to obtain a conditional expression to be put in storage;
the data entry module is used for updating the grouping name and the conditional expression to be put in storage into the grouping information table based on the grouping identification if the grouping identification is not empty and the grouping identification is recorded in the grouping information table;
otherwise the first set of parameters is selected,
under the condition that the grouping identification is empty, a new grouping identification is constructed based on the grouping name and the conditional expression to be put in storage, and the new grouping identification, the grouping name and the conditional expression to be put in storage are used as a piece of new grouping information to be written into a grouping information table;
and under the condition that the grouping identification is not empty, the grouping identification, the grouping name and the conditional expression to be put in storage are used as a piece of new grouping information to be written into a grouping information table.
Fig. 5 illustrates a physical schematic diagram of an electronic device, as shown in fig. 5, which may include: processor 510, communication interface (Communications Interface) 520, memory 530, and communication bus 540, wherein processor 510, communication interface 520, memory 530 complete communication with each other through communication bus 540. Processor 510 may invoke logic instructions in memory 530 to perform a user grouping method comprising: determining a grouping information table, a user event table and a user grouping mapping table; based on any grouping information in the grouping information table, a user event table and a user grouping mapping table are applied to determine a grouping result corresponding to the grouping information; the grouping information comprises a grouping identifier and a grouping conditional expression; the grouping information is created and modified based on the grouping conditions and the condition logic input by the front end; the user grouping mapping in the user grouping mapping table is determined based on the user event table and the grouping conditional expression in the grouping information at regular time; the user event table is used for recording user information and user operation event information.
Further, the logic instructions in the memory 530 described above may be implemented in the form of software functional units and may be stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product, the computer program product comprising a computer program, the computer program being storable on a non-transitory computer readable storage medium, the computer program, when executed by a processor, being capable of performing the user grouping method provided by the methods described above, the method comprising: determining a grouping information table, a user event table and a user grouping mapping table; based on any grouping information in the grouping information table, a user event table and a user grouping mapping table are applied to determine a grouping result corresponding to the grouping information; the grouping information comprises a grouping identifier and a grouping conditional expression; the grouping information is created and modified based on the grouping conditions and the condition logic input by the front end; the user grouping mapping in the user grouping mapping table is determined based on the user event table and the grouping conditional expression in the grouping information at regular time; the user event table is used for recording user information and user operation event information.
In yet another aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, is implemented to perform a user grouping method provided by the above methods, the method comprising: determining a grouping information table, a user event table and a user grouping mapping table; based on any grouping information in the grouping information table, a user event table and a user grouping mapping table are applied to determine a grouping result corresponding to the grouping information; the grouping information comprises a grouping identifier and a grouping conditional expression; the grouping information is created and modified based on the grouping conditions and the condition logic input by the front end; the user grouping mapping in the user grouping mapping table is determined based on the user event table and the grouping conditional expression in the grouping information at regular time; the user event table is used for recording user information and user operation event information.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (8)

1. A method of grouping users, comprising:
determining a grouping information table, a user event table and a user grouping mapping table;
based on any grouping information in the grouping information table, the user event table and the user grouping mapping table are applied to determine a grouping result corresponding to the any grouping information; any grouping information comprises a grouping identifier and a grouping conditional expression;
any grouping information is created and modified based on the front-end input grouping conditions and condition logic; the user grouping mapping in the user grouping mapping table is determined based on the grouping conditional expression in the user event table and any grouping information at regular time; the user event table is used for recording user information and user operation event information;
the determining steps of the user grouping mapping in the user grouping mapping table are as follows:
analyzing the grouping condition expression in any piece of grouping information to obtain each grouping condition of any piece of grouping information and a logic relation between each grouping condition;
based on the logic relation between the grouping conditions of any grouping information, splicing the grouping conditions of any grouping information to obtain a query condition statement of any grouping information;
determining a grouping query statement of any grouping information based on the table name of the user event table and the query condition statement of any grouping information;
based on the user event table, applying a grouping query statement of any grouping information, determining user grouping mapping of any grouping information, and writing the user grouping mapping of any grouping information into the user grouping mapping table;
the determining, based on the user event table, a user grouping mapping of the arbitrary grouping information by applying a grouping query statement of the arbitrary grouping information includes:
based on the user event table, applying the grouping query statement of any grouping information to determine a user identification list;
and determining a user grouping mapping of any grouping information based on any user identification in the user identification list and the grouping identification in the any grouping information.
2. The method for grouping users according to claim 1, wherein before analyzing the grouping condition expression in the arbitrary grouping information to obtain each grouping condition of the arbitrary grouping information and a logical relationship between each grouping condition, further comprises: and clearing the original user grouping mapping in the user grouping mapping table.
3. The method for grouping users according to claim 2, wherein the determining the grouping result corresponding to any grouping information based on any grouping information in the grouping information table by applying the user event table and the user grouping mapping table includes:
connecting the user grouping mapping table with the user event table to obtain an association table;
and based on the association table, inquiring by using the grouping identification in any piece of grouping information to obtain a grouping result corresponding to any piece of grouping information.
4. A user grouping method according to any one of claims 1 to 3, wherein any one of the grouping information is created and modified based on a front-end input grouping condition and condition logic, comprising:
responding to a grouping identifier, a grouping name, the grouping condition and the condition logic which are transmitted by a user at the front end;
formatting the grouping conditions and the condition logic to obtain a conditional expression to be put in storage;
if the grouping identification is not empty and the grouping identification is recorded in the grouping information table, updating the grouping name and the conditional expression to be put in storage into the grouping information table based on the grouping identification;
otherwise the first set of parameters is selected,
under the condition that the grouping identification is empty, a new grouping identification is constructed based on the grouping name and the conditional expression to be put in storage, and the new grouping identification, the grouping name and the conditional expression to be put in storage are used as a piece of new grouping information to be written into the grouping information table;
and under the condition that the grouping identification is not empty, writing the grouping identification, the grouping name and the conditional expression to be put in storage into the grouping information table as a new piece of grouping information.
5. The user grouping method of claim 4 wherein the grouping conditions include user attribute conditions and user behavior conditions; the number of user attribute conditions and the number of user behavior conditions are each in the range of 1 to 3.
6. A user grouping apparatus, comprising:
the determining module is used for determining a grouping information table, a user event table and a user grouping mapping table;
the grouping module is used for determining a grouping result corresponding to any grouping information by applying the user event table and the user grouping mapping table based on any grouping information in the grouping information table; any grouping information comprises a grouping identifier and a grouping conditional expression;
any grouping information is created and modified based on the front-end input grouping conditions and condition logic; the user grouping mapping in the user grouping mapping table is determined based on the grouping conditional expression in the user event table and any grouping information at regular time; the user event table is used for recording user information and user operation event information;
the determining steps of the user grouping mapping in the user grouping mapping table are as follows:
analyzing the grouping condition expression in any piece of grouping information to obtain each grouping condition of any piece of grouping information and a logic relation between each grouping condition;
based on the logic relation between the grouping conditions of any grouping information, splicing the grouping conditions of any grouping information to obtain a query condition statement of any grouping information;
determining a grouping query statement of any grouping information based on the table name of the user event table and the query condition statement of any grouping information;
based on the user event table, applying a grouping query statement of any grouping information, determining user grouping mapping of any grouping information, and writing the user grouping mapping of any grouping information into the user grouping mapping table;
the determining, based on the user event table, a user grouping mapping of the arbitrary grouping information by applying a grouping query statement of the arbitrary grouping information includes:
based on the user event table, applying the grouping query statement of any grouping information to determine a user identification list;
and determining a user grouping mapping of any grouping information based on any user identification in the user identification list and the grouping identification in the any grouping information.
7. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the user grouping method of any one of claims 1 to 5 when the program is executed.
8. A non-transitory computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when executed by a processor, implements a user grouping method according to any one of claims 1 to 5.
CN202211496334.3A 2022-11-28 2022-11-28 User grouping method, device, electronic equipment and storage medium Active CN115599976B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211496334.3A CN115599976B (en) 2022-11-28 2022-11-28 User grouping method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211496334.3A CN115599976B (en) 2022-11-28 2022-11-28 User grouping method, device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115599976A CN115599976A (en) 2023-01-13
CN115599976B true CN115599976B (en) 2023-06-02

Family

ID=84853698

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211496334.3A Active CN115599976B (en) 2022-11-28 2022-11-28 User grouping method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115599976B (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10216826B2 (en) * 2014-09-02 2019-02-26 Salesforce.Com, Inc. Database query system
CN110609840A (en) * 2019-09-18 2019-12-24 北京思维造物信息科技股份有限公司 User information screening method, device and equipment
CN111192072B (en) * 2019-10-29 2023-08-04 腾讯科技(深圳)有限公司 User grouping method and device and storage medium
CN114493701A (en) * 2022-01-26 2022-05-13 网易(杭州)网络有限公司 User grouping method and device
CN114820080A (en) * 2022-05-24 2022-07-29 上海钧正网络科技有限公司 User grouping method, system, device and medium based on crowd circulation

Also Published As

Publication number Publication date
CN115599976A (en) 2023-01-13

Similar Documents

Publication Publication Date Title
US11714792B2 (en) Creating data in a data store using a dynamic ontology
US11995124B2 (en) Query language interoperability in a graph database
US9047346B2 (en) Reporting language filtering and mapping to dimensional concepts
US20100228764A1 (en) Offline Validation of Data in a Database System for Foreign Key Constraints
US20140201035A1 (en) Using model information groups in searching
US8868556B2 (en) Method and device for tagging a document
US20130304769A1 (en) Document Merge Based on Knowledge of Document Schema
US20120158807A1 (en) Matching data based on numeric difference
US11487742B2 (en) Consistency checks between database systems
CN113360519B (en) Data processing method, device, equipment and storage medium
CN110941629B (en) Metadata processing method, apparatus, device and computer readable storage medium
CN114036425A (en) Page access method, client, server and system
CN114253995A (en) Data tracing method, device, equipment and computer readable storage medium
CN110704635B (en) Method and device for converting triplet data in knowledge graph
CN115599976B (en) User grouping method, device, electronic equipment and storage medium
US9824140B2 (en) Method of creating classification pattern, apparatus, and recording medium
CN112905627B (en) Data processing method, data processing device, computer equipment and storage medium
CN115238655A (en) Json data editing method and device
CN114519071A (en) Generation method, matching method, system, device and medium of rule matching model
CN112487006A (en) Implementation method for dynamically editing data structure and generating database table
CN116755683B (en) Data processing method and related device
CN111079391B (en) Report generation method and device
CN115905182A (en) Model knowledge relationship construction method and related equipment
CN117112559A (en) Method, apparatus, device and medium for managing vector data sets
CN117742830A (en) Method and device for realizing unified configuration service system based on JSONPath

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