CN108829748B - Label setting method and device and computer readable storage medium - Google Patents

Label setting method and device and computer readable storage medium Download PDF

Info

Publication number
CN108829748B
CN108829748B CN201810510849.1A CN201810510849A CN108829748B CN 108829748 B CN108829748 B CN 108829748B CN 201810510849 A CN201810510849 A CN 201810510849A CN 108829748 B CN108829748 B CN 108829748B
Authority
CN
China
Prior art keywords
user
information
label
attribute information
type
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
CN201810510849.1A
Other languages
Chinese (zh)
Other versions
CN108829748A (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.)
Nubia Technology Co Ltd
Original Assignee
Nubia 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 Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201810510849.1A priority Critical patent/CN108829748B/en
Publication of CN108829748A publication Critical patent/CN108829748A/en
Application granted granted Critical
Publication of CN108829748B publication Critical patent/CN108829748B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a label setting method, which comprises the following steps: judging whether each piece of user information in all the pieces of user information contains user attribute information corresponding to any one first type of label or not through traversing all the pieces of user information obtained; the first type of label is a label containing user attribute information; and setting any first type label as a label of a user corresponding to the first user information under the condition that the first user information in all the user information contains user attribute information corresponding to any first type label. The invention also discloses a label setting device and a computer readable storage medium, and by implementing the scheme, the setting efficiency and the setting speed of the off-line label can be effectively improved.

Description

Label setting method and device and computer readable storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for setting a tag, and a computer-readable storage medium.
Background
The label is a word description obtained by extracting the user information submitted to the server by the user. The label is attached with a corresponding label setting rule, and a user who accords with the label setting rule can be attached with the corresponding label. For example: the label "basic attribute _ gender _ male", the corresponding label setting rule is: the user information submitted to the server by the user includes user _ info _ sex, which is a field name in the database for identifying the gender of the user, and the label rule is that all users in the database have the gender information reported, and the user meeting the rule of "user _ info _ sex is male" is labeled with "basic attribute _ gender _ male".
The existing user label setting mode comprises a real-time label setting mode and an off-line label setting mode.
The real-time label setting mode is real-time label setting performed when the user information is just reported to the server, and is suitable for labels with simple label setting rules, and the user information related to the label setting rules does not contain user information reported by the user history. The real-time label setting mode reads user information (containing a plurality of field names for describing the user) reported by the user each time, then traverses the real-time label setting rule to match with the user information, and attaches a matched label to the user. The real-time cleaning technology is storm, and the cleaning speed is high due to the fact that the memory is used for calculation.
The offline label setting mode is the label setting of the user after all the user information of each user is reported to the server, and the user information which is not suitable for carrying out the label setting in real time can carry out the label setting in offline. And reading the user information accumulated and reported by all users in the same day by an offline label setting mode, finding out the users meeting a single label setting rule, and then labeling the users. In the offline label setting mode, the label setting process of each user label needs to traverse the user information table of the user once, and because the data volume of the table is large, the offline label setting process is time-consuming, and the offline label setting efficiency is very low.
Disclosure of Invention
The invention mainly aims to provide a label setting method, label setting equipment and a computer readable storage medium, and aims to overcome the defect that an offline label setting mode in the prior art is low in efficiency.
In order to achieve the above object, the present invention provides a label setting method, including:
judging whether each piece of user information in all the pieces of user information contains user attribute information corresponding to any one first type of label or not through traversing all the pieces of user information obtained; the first type of label is a label containing user attribute information;
and setting any first type label as a label of a user corresponding to the first user information under the condition that the first user information in all the user information contains user attribute information corresponding to any first type label.
Optionally, after the setting of any one of the first type tags as the tag of the user corresponding to the first user information, the method further includes:
traversing all the user information once for each second-class label, and judging whether each user information in all the user information contains all the user attribute information corresponding to any second-class label in the process of traversing all the user information for any second-class label; the second type of tags are tags containing two or more user attribute information;
and setting any second type label as the label of the user corresponding to the second user information under the condition that the second user information in all the user information contains all the user attribute information corresponding to any second type label.
Optionally, the determining whether each piece of user information in all the pieces of user information includes user attribute information corresponding to any one of the first type tags includes:
grouping the first type labels according to the attribute identification of the user attribute information contained in the first type labels;
traversing all the user information, and judging whether each user information in all the user information contains attribute identification corresponding to any group of first-class labels;
under the condition that first user information in all the user information contains attribute identifications corresponding to any group of first-class labels, judging whether the user attribute information contained in the first user information is matched with any user attribute information corresponding to any group of first-class labels;
if yes, judging that the first user information contains user attribute information corresponding to any first type of label; otherwise, the first user information is judged not to contain the user attribute information corresponding to any first type of label.
Optionally, before traversing all the user information once for each second type tag, the method further includes:
respectively setting a second type label containing each group of user attribute information according to each group of preset user attribute information; wherein each set of user attribute information comprises two or more user attribute information.
Optionally, before the step of determining whether each piece of user information in all pieces of user information obtained through traversal includes user attribute information corresponding to any one of the first type tags, the method further includes:
and respectively setting a first type label containing each piece of user attribute information according to each piece of preset user attribute information.
In addition, in order to achieve the above object, the present invention further provides a label setting device, which includes a processor and a memory;
the processor is configured to execute a tag setting program stored in the memory to implement the steps of:
judging whether each piece of user information in all the pieces of user information contains user attribute information corresponding to any one first type of label or not through traversing all the pieces of user information obtained; the first type of label is a label containing user attribute information;
and setting any first type label as a label of a user corresponding to the first user information under the condition that the first user information in all the user information contains user attribute information corresponding to any first type label.
Optionally, after the setting of any one of the first type tags as the tag of the user corresponding to the first user information, the processor is further configured to execute the tag setting program, so as to implement the following steps:
traversing all the user information once for each second-class label, and judging whether each user information in all the user information contains all the user attribute information corresponding to any second-class label in the process of traversing all the user information for any second-class label; the second type of tags are tags containing two or more user attribute information;
and setting any second type label as the label of the user corresponding to the second user information under the condition that the second user information in all the user information contains all the user attribute information corresponding to any second type label.
Optionally, the determining whether each piece of user information in all the pieces of user information includes user attribute information corresponding to any one of the first type tags includes:
grouping the first type labels according to the attribute identification of the user attribute information contained in the first type labels;
traversing all the user information, and judging whether each user information in all the user information contains attribute identification corresponding to any group of first-class labels;
under the condition that first user information in all the user information contains attribute identifications corresponding to any group of first-class labels, judging whether the user attribute information contained in the first user information is matched with any user attribute information corresponding to any group of first-class labels;
if yes, judging that the first user information contains user attribute information corresponding to any first type of label; otherwise, the first user information is judged not to contain the user attribute information corresponding to any first type of label.
Optionally, before traversing all the user information once for each second type tag, the processor is further configured to execute the tag setting program to implement the following steps:
respectively setting a second type label containing each group of user attribute information according to each group of preset user attribute information; wherein each set of user attribute information comprises two or more user attribute information.
Optionally, before the step of determining whether each piece of user information in all pieces of user information obtained through traversal includes user attribute information corresponding to any one of the first type tags, the processor is further configured to execute the tag setting program to implement the following steps:
and respectively setting a first type label containing each piece of user attribute information according to each piece of preset user attribute information.
Further, to achieve the above object, the present invention also proposes a computer-readable storage medium storing one or more programs, which are executable by one or more processors to implement the steps of the above tag setting method.
The label setting method, the label setting equipment and the computer readable storage medium can effectively improve the setting efficiency and the setting speed of the off-line label.
Drawings
Fig. 1 is a schematic diagram of a hardware structure of an optional mobile terminal for implementing various embodiments of the present invention;
FIG. 2 is a diagram of an alternative communication network system architecture for implementing various embodiments of the present invention;
FIG. 3 is a flow chart of a label setting method according to a first embodiment of the present invention;
FIG. 4 is a flow chart of a label setting method according to a second embodiment of the present invention;
FIG. 5 is a flowchart of a label setting method according to a third embodiment of the present invention;
fig. 6 is a schematic structural view of a label setting apparatus according to fourth to fifth embodiments of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in itself. Thus, "module", "component" or "unit" may be used mixedly.
The terminal may be implemented in various forms. For example, the terminal described in the present invention may include a mobile terminal such as a mobile phone, a tablet computer, a notebook computer, a palmtop computer, a Personal Digital Assistant (PDA), a Portable Media Player (PMP), a navigation device, a wearable device, a smart band, a pedometer, and the like, and a fixed terminal such as a Digital TV, a desktop computer, and the like.
The following description will be given by way of example of a mobile terminal, and it will be understood by those skilled in the art that the construction according to the embodiment of the present invention can be applied to a fixed type terminal, in addition to elements particularly used for mobile purposes.
Referring to fig. 1, which is a schematic diagram of a hardware structure of a mobile terminal for implementing various embodiments of the present invention, the mobile terminal 100 may include: RF (Radio Frequency) unit 101, WiFi module 102, audio output unit 103, a/V (audio/video) input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, processor 110, and power supply 111. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 1 is not intended to be limiting of mobile terminals, which may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The following describes each component of the mobile terminal in detail with reference to fig. 1:
the radio frequency unit 101 may be configured to receive and transmit signals during information transmission and reception or during a call, and specifically, receive downlink information of a base station and then process the downlink information to the processor 110; in addition, the uplink data is transmitted to the base station. Typically, radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 can also communicate with a network and other devices through wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System for Mobile communications), GPRS (General Packet Radio Service), CDMA2000(Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division duplex Long Term Evolution), and TDD-LTE (Time Division duplex Long Term Evolution).
WiFi belongs to short-distance wireless transmission technology, and the mobile terminal can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 102, and provides wireless broadband internet access for the user. Although fig. 1 shows the WiFi module 102, it is understood that it does not belong to the essential constitution of the mobile terminal, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output as sound when the mobile terminal 100 is in a call signal reception mode, a call mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, the audio output unit 103 may also provide audio output related to a specific function performed by the mobile terminal 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 103 may include a speaker, a buzzer, and the like.
The a/V input unit 104 is used to receive audio or video signals. The a/V input Unit 104 may include a Graphics Processing Unit (GPU) 1041 and a microphone 1042, the Graphics processor 1041 Processing image data of still pictures or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the graphic processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 may receive sounds (audio data) via the microphone 1042 in a phone call mode, a recording mode, a voice recognition mode, or the like, and may be capable of processing such sounds into audio data. The processed audio (voice) data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 101 in case of a phone call mode. The microphone 1042 may implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the course of receiving and transmitting audio signals.
The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 1061 and/or a backlight when the mobile terminal 100 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the posture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone, further description is omitted here.
The display unit 106 is used to display information input by a user or information provided to the user. The Display unit 106 may include a Display panel 1061, and the Display panel 1061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 107 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the mobile terminal. Specifically, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also referred to as a touch screen, may collect a touch operation performed by a user on or near the touch panel 1071 (e.g., an operation performed by the user on or near the touch panel 1071 using a finger, a stylus, or any other suitable object or accessory), and drive a corresponding connection device according to a predetermined program. The touch panel 1071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 110, and can receive and execute commands sent by the processor 110. In addition, the touch panel 1071 may be implemented in various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may include other input devices 1072. In particular, other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like, and are not limited to these specific examples.
Further, the touch panel 1071 may cover the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or nearby, the touch panel 1071 transmits the touch operation to the processor 110 to determine the type of the touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of the touch event. Although the touch panel 1071 and the display panel 1061 are shown in fig. 1 as two separate components to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 and the display panel 1061 may be integrated to implement the input and output functions of the mobile terminal, and is not limited herein.
The interface unit 108 serves as an interface through which at least one external device is connected to the mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal 100 and external devices.
The memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 109 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 110 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by operating or executing software programs and/or modules stored in the memory 109 and calling data stored in the memory 109, thereby performing overall monitoring of the mobile terminal. Processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The mobile terminal 100 may further include a power supply 111 (e.g., a battery) for supplying power to various components, and preferably, the power supply 111 may be logically connected to the processor 110 via a power management system, so as to manage charging, discharging, and power consumption management functions via the power management system.
Although not shown in fig. 1, the mobile terminal 100 may further include a bluetooth module or the like, which is not described in detail herein.
In order to facilitate understanding of the embodiments of the present invention, a communication network system on which the mobile terminal of the present invention is based is described below.
Referring to fig. 2, fig. 2 is an architecture diagram of a communication Network system according to an embodiment of the present invention, where the communication Network system is an LTE system of a universal mobile telecommunications technology, and the LTE system includes a UE (User Equipment) 201, an E-UTRAN (Evolved UMTS Terrestrial Radio Access Network) 202, an EPC (Evolved Packet Core) 203, and an IP service 204 of an operator, which are in communication connection in sequence.
Specifically, the UE201 may be the terminal 100 described above, and is not described herein again.
The E-UTRAN202 includes eNodeB2021 and other eNodeBs 2022, among others. Among them, the eNodeB2021 may be connected with other eNodeB2022 through backhaul (e.g., X2 interface), the eNodeB2021 is connected to the EPC203, and the eNodeB2021 may provide the UE201 access to the EPC 203.
The EPC203 may include an MME (Mobility Management Entity) 2031, an HSS (Home Subscriber Server) 2032, other MMEs 2033, an SGW (Serving gateway) 2034, a PGW (PDN gateway) 2035, and a PCRF (Policy and Charging Rules Function) 2036, and the like. The MME2031 is a control node that handles signaling between the UE201 and the EPC203, and provides bearer and connection management. HSS2032 is used to provide registers to manage functions such as home location register (not shown) and holds subscriber specific information about service characteristics, data rates, etc. All user data may be sent through SGW2034, PGW2035 may provide IP address assignment for UE201 and other functions, and PCRF2036 is a policy and charging control policy decision point for traffic data flow and IP bearer resources, which selects and provides available policy and charging control decisions for a policy and charging enforcement function (not shown).
The IP services 204 may include the internet, intranets, IMS (IP Multimedia Subsystem), or other IP services, among others.
Although the LTE system is described as an example, it should be understood by those skilled in the art that the present invention is not limited to the LTE system, but may also be applied to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, and future new network systems.
Based on the above mobile terminal hardware structure and communication network system, the present invention provides various embodiments of the method.
A first embodiment of the present invention, a label setting method, as shown in fig. 3, includes the following specific steps:
step S101, judging whether each user information in all the user information contains user attribute information corresponding to any first type of label through traversing all the acquired user information.
Wherein, the first type label is a label containing user attribute information.
In this embodiment, the user information is information reported to the server by the user.
In this embodiment, the number of the first type tags is not specifically limited, and the number of the first type tags may be one or multiple.
Optionally, step S101 includes:
acquiring user information submitted by all users in a set period;
judging whether each piece of user information in all pieces of user information contains user attribute information corresponding to any one first type of label or not by traversing all pieces of user information; wherein, the first type label is a label containing user attribute information.
For example: step S101, including: the number of the first type of tags is 5, and the first type of tags are respectively as follows:
label 1: device attribute _ brand _ device brand samsung; tag 1 contains a user attribute information: the device brand samsung;
and 2, labeling: device attribute _ brand _ device brand samsung; tag 2 contains a user attribute information: equipment brand SAMSUNG;
and (3) labeling: device attribute _ brand _ device brand samsung; the tag 3 contains a user attribute information: equipment brand samsung;
and (4) labeling: basic attribute _ region-south province; the tag 4 contains a user attribute information: regional Henan;
and (5) labeling: basic attribute _ region-south province; the tag 5 contains one user attribute information: a territorial henan;
the number of the user information is 3, which are respectively:
the user information 1 includes 5 pieces of user attribute information: name king A, region Beijing, sex male, age 32 years, equipment brand SAMSUNG;
the user information 2 includes 5 pieces of user attribute information: name plum B, regional south of the river, gender woman, age 28, equipment brand iphone;
the user information 3 includes 5 pieces of user attribute information: liu C of name, regional henan, gender, age of 29 years, equipment brand samsung;
traversing all the user information, and judging whether the user information 1 contains user attribute information corresponding to any first type of label;
judging whether the user information 2 contains user attribute information corresponding to any first type of label;
judging whether the user information 3 contains user attribute information corresponding to any first type of label;
wherein, the user information 1 includes a user attribute information device corresponding to the tag 2: the brand SAMSUNG;
the user information 2 includes user attribute information corresponding to the tag 4: regional Henan;
the user information 3 includes user attribute information corresponding to the tag 5: region henan, and user attribute information corresponding to tag 1: the device brand samsung.
Step S102, under the condition that the first user information in all the user information contains the user attribute information corresponding to any first type of label, setting any first type of label as the label of the user corresponding to the first user information.
For example: step S102, comprising: when the user information 1 includes the user attribute information device brand SAMSUNG corresponding to the tag 2, the tag 2: the basic attribute _ region henan province is set as a label of the user information 1 corresponding to the user king a.
For another example: step S102, comprising: the user information 2 includes user attribute information corresponding to the tag 4: in the case of the region of the south of the river, tag 4: the basic attribute _ region henan province is set as a tag of the user information 2 corresponding to the user plum B.
For another example: step S102, comprising: the user information 3 includes user attribute information corresponding to the tag 5: region henan, and user attribute information corresponding to tag 1: in the case of the device brand samsung, tag 5: the basic attribute _ region henan province is set as a label of the user information 3 corresponding to the user Liu C, and the label 1: the device attribute _ brand _ device brand samsung is set as the label of the user information 3 corresponding to the user liu C.
Under the condition that the first type of label only comprises one piece of user attribute information, only one time of deviation of all user information is needed, the first type of label can be set by a user submitting the user information, the defects of low label setting efficiency and slow label setting speed caused by setting the label for the user information of each label deviation once are avoided, and the setting efficiency and setting speed of the user label are greatly improved.
The method for setting the label according to the first embodiment of the invention can effectively improve the setting efficiency and the setting speed of the off-line label.
A second embodiment of the present invention, a label setting method, as shown in fig. 4, includes the following specific steps:
step S201, by traversing all the acquired user information, determine whether each user information in all the user information includes user attribute information corresponding to any first type tag.
Wherein, the first type label is a label containing user attribute information.
In this embodiment, the user information is user information reported to the server by the user.
In this embodiment, the number of the first type tags is not specifically limited, and the number of the first type tags may be one or multiple.
For example: step S201, including: the number of the first type of tags is 5, and the first type of tags are respectively as follows:
label 1: device attribute _ brand _ device brand samsung; tag 1 contains a user attribute information: the device brand samsung;
and 2, labeling: device attribute _ brand _ device brand samsung; tag 2 contains a user attribute information: equipment brand SAMSUNG;
and (3) labeling: device attribute _ brand _ device brand samsung; the tag 3 contains a user attribute information: equipment brand samsung;
and (4) labeling: basic attribute _ region-south province; the tag 4 contains a user attribute information: regional Henan;
and (5) labeling: basic attribute _ region-south province; the tag 5 contains one user attribute information: a territorial henan;
the number of the user information is 3, which are respectively:
the user information 1 includes 7 pieces of user attribute information: name king A, region Beijing, sex male, age 32, equipment brand SAMSUNG, income 3500 Yuan, professional driver;
the user information 2 includes 7 pieces of user attribute information: name plum B, regional Henan, gender woman, age 28, equipment brand iphone, income 2000 Yuan, professional driver;
the user information 3 includes 7 pieces of user attribute information: liu C of name, regional henan, gender, age of 29 years, equipment brand samsung, income 6000 Yuan, professional teacher;
traversing all the user information, and judging whether the user information 1 contains user attribute information corresponding to any first type of label;
judging whether the user information 2 contains user attribute information corresponding to any first type of label;
judging whether the user information 3 contains user attribute information corresponding to any first type of label;
wherein, the user information 1 includes a user attribute information device corresponding to the tag 2: the brand SAMSUNG;
the user information 2 includes user attribute information corresponding to the tag 4: regional Henan;
the user information 3 includes user attribute information corresponding to the tag 5: region henan, and user attribute information corresponding to tag 1: the device brand samsung.
Optionally, the manner of determining whether each piece of user information in all pieces of user information includes user attribute information corresponding to any one of the first type tags includes, but is not limited to:
grouping the first type labels according to the attribute identification of the user attribute information contained in the first type labels;
traversing all the user information, and judging whether each user information in all the user information contains attribute identification corresponding to any group of first-class labels;
under the condition that first user information in all user information contains attribute identifications corresponding to any group of first-class labels, judging whether the user attribute information contained in the first user information is matched with any user attribute information corresponding to any group of first-class labels;
if the user attribute information contained in the first user information is matched with any user attribute information corresponding to any group of first-class labels, judging that the first user information contains the user attribute information corresponding to any first-class label;
and if the user attribute information contained in the first user information is not matched with any user attribute information corresponding to any group of first-class labels, judging that the first user information does not contain the user attribute information corresponding to any first-class label.
For example: the method for determining whether each piece of user information in all pieces of user information includes user attribute information corresponding to any one of the first type tags includes, but is not limited to:
the number of the first type of tags is 5, and the first type of tags are respectively as follows:
label 1: device attribute _ brand _ device brand samsung; tag 1 contains a user attribute information: the device brand samsung;
and 2, labeling: device attribute _ brand _ device brand samsung; tag 2 contains a user attribute information: equipment brand SAMSUNG;
and (3) labeling: device attribute _ brand _ device brand samsung; the tag 3 contains a user attribute information: equipment brand samsung;
and (4) labeling: basic attribute _ region-south province; the tag 4 contains a user attribute information: regional Henan;
and (5) labeling: basic attribute _ region-south province; the tag 5 contains one user attribute information: a territorial henan;
grouping the first type labels according to the attribute identification of the user attribute information contained in the first type labels, comprising the following steps:
attribute identification corresponding to the first type label 1 group: device attributes;
attribute identification corresponding to the first type label 2 group: a base attribute;
traversing all the user information, and judging whether each user information in all the user information contains attribute identification corresponding to any group of first-class labels;
the user information 1 in all the user information contains the attribute identification corresponding to the first type tag 1 group: under the condition of the equipment attribute, judging whether the user attribute information contained in the user information 1 is matched with any user attribute information corresponding to any group of first-class labels;
if the user attribute information contained in the user information 1 and the user attribute information of the tag 2 corresponding to the first type tag 1 group: if the device brands SAMSUNG match, it is determined that the user information 1 includes the user attribute information of the tag 2: equipment brand SAMSUNG;
if the user attribute information contained in the user information 1 and the user attribute information of the tag 4 corresponding to the first type tag 2 group: if the region Henan is not matched, it is determined that the user information 1 does not include the user attribute information of the tag 4: regional Henan.
Step S202, when the first user information in all the user information includes the user attribute information corresponding to any first type of tag, setting any first type of tag as the tag of the user corresponding to the first user information.
For example: step S202, comprising: when the user information 1 includes the user attribute information device brand SAMSUNG corresponding to the tag 2, the tag 2: the basic attribute _ region henan province is set as a label of the user information 1 corresponding to the user king a.
For another example: step S202, comprising: the user information 2 includes user attribute information corresponding to the tag 4: in the case of the region of the south of the river, tag 4: the basic attribute _ region henan province is set as a tag of the user information 2 corresponding to the user plum B.
For another example: step S202, comprising: the user information 3 includes user attribute information corresponding to the tag 5: region henan, and user attribute information corresponding to tag 1: in the case of the device brand samsung, tag 5: the basic attribute _ region henan province is set as a label of the user information 3 corresponding to the user Liu C, and the label 1: the device attribute _ brand _ device brand samsung is set as the label of the user information 3 corresponding to the user liu C.
Under the condition that the first type of label only comprises one piece of user attribute information, only one time of deviation of all user information is needed, the first type of label can be set by a user submitting the user information, the defects of low label setting efficiency and slow label setting speed caused by setting the label for the user information of each label deviation once are avoided, and the setting efficiency and setting speed of the user label are greatly improved.
Step S203, traversing all the user information once for each second-class label, and judging whether each user information in all the user information contains all the user attribute information corresponding to any second-class label in the process of traversing all the user information for any second-class label; the second type of tags are tags containing two or more user attribute information; and setting the second type label as the label of the user corresponding to the second user information under the condition that the second user information in all the user information contains all the user attribute information corresponding to the second type label.
In this embodiment, the number of the second type tags is not specifically limited, and the number of the second type tags may be one or multiple.
For example, step S203 includes: the number of the second type of tags is 2, which are respectively:
and (6) labeling: user attribute _ category _ high income driver; the tag 6 contains user attribute information: professional driver, and user attribute information: income is more than 3000 yuan;
and (7) a label: user attribute _ category _ high income teacher; the tag 7 contains user attribute information: professional teacher, and user attribute information: the income is more than 5000 yuan;
the number of the user information is 3, which are respectively:
the user information 1 includes 7 pieces of user attribute information: name king A, region Beijing, sex male, age 32, equipment brand SAMSUNG, income 3500 Yuan, professional driver;
the user information 2 includes 7 pieces of user attribute information: name plum B, regional Henan, gender woman, age 28, equipment brand iphone, income 2000 Yuan, professional driver;
the user information 3 includes 7 pieces of user attribute information: liu C of name, regional henan, gender, age of 29 years, equipment brand samsung, income 6000 Yuan, professional teacher;
traversing all the user information once for each second type of label;
in the case of tag 6: the user attribute _ category _ high income driver, in the process of traversing all user information, judges whether each user information in all user information contains a label 6: all user attribute information corresponding to the user attribute _ category _ high income driver; the user information 1 among all user information contains a tag 6: in the case of all the user attribute information corresponding to the user attribute _ category _ high income driver, the tag 6: the user attribute _ category _ high income driver is set as a label of the user information 1 corresponding to the user king A;
in the case of tag 7: the user attribute _ category _ high income teacher judges whether each piece of user information in all pieces of user information contains a tag 7 in the process of traversing all pieces of user information: all user attribute information corresponding to the user attribute _ category _ high income teacher; the user information 3 among all user information contains a tag 7: in the case of all user attribute information corresponding to the user attribute _ category _ high income education, the tag 7: the user attribute _ category _ high income education is set as a label of the user information 3 corresponding to the user Liu C.
The label setting method according to the second embodiment of the invention can effectively improve the setting efficiency and speed of the off-line label.
A third embodiment of the present invention provides a label setting method, as shown in fig. 5, including the following specific steps:
step S301, according to each preset user attribute information, a first type label containing each user attribute information is respectively set.
For example: step S301, including:
the number of the preset user attribute information is 5, which are respectively as follows:
user attribute information 1: the device brand samsung;
user attribute information 2: equipment brand SAMSUNG;
user attribute information 3: equipment brand samsung;
user attribute information 4: regional Henan;
user attribute information 5: a territorial henan;
respectively setting a first type label containing each user attribute information, comprising the following steps:
label 1: device attribute _ brand _ device brand samsung; tag 1 contains a user attribute information: the device brand samsung;
and 2, labeling: device attribute _ brand _ device brand samsung; tag 2 contains a user attribute information: equipment brand SAMSUNG;
and (3) labeling: device attribute _ brand _ device brand samsung; the tag 3 contains a user attribute information: equipment brand samsung;
and (4) labeling: basic attribute _ region-south province; the tag 4 contains a user attribute information: regional Henan;
and (5) labeling: basic attribute _ region-south province; the tag 5 contains one user attribute information: a territorial henan;
step S302, respectively setting a second type label containing each group of user attribute information according to each group of preset user attribute information; wherein each set of user attribute information comprises two or more user attribute information.
For example, step S302 includes:
the two sets of preset user attribute information are respectively:
user attribute information 1 group: user attribute information: professional driver, and user attribute information: income is more than 3000 yuan;
user attribute information 2 group: user attribute information: professional teacher, and user attribute information: the income is more than 5000 yuan;
respectively setting a second type of label containing each group of user attribute information, comprising the following steps:
and (6) labeling: user attribute _ category _ high income driver; the tag 6 contains user attribute information: professional driver, and user attribute information: income is more than 3000 yuan;
and (7) a label: user attribute _ category _ high income teacher; the tag 7 contains user attribute information: professional teacher, and user attribute information: the income is more than 5000 yuan;
step S303, determining whether each piece of user information in all pieces of user information includes user attribute information corresponding to any one of the first type tags by traversing all pieces of acquired user information.
Wherein, the first type label is a label containing user attribute information.
In this embodiment, the user information is user information reported to the server by the user.
In this embodiment, the number of the first type tags is not specifically limited, and the number of the first type tags may be one or multiple.
Optionally, step S303 includes:
acquiring user information submitted by all users in a set period;
judging whether each piece of user information in all pieces of user information contains user attribute information corresponding to any one first type of label or not by traversing all pieces of user information; wherein, the first type label is a label containing user attribute information.
For example: step S303, including: the number of the first type of tags is 5, and the first type of tags are respectively as follows:
label 1: device attribute _ brand _ device brand samsung; tag 1 contains a user attribute information: the device brand samsung;
and 2, labeling: device attribute _ brand _ device brand samsung; tag 2 contains a user attribute information: equipment brand SAMSUNG;
and (3) labeling: device attribute _ brand _ device brand samsung; the tag 3 contains a user attribute information: equipment brand samsung;
and (4) labeling: basic attribute _ region-south province; the tag 4 contains a user attribute information: regional Henan;
and (5) labeling: basic attribute _ region-south province; the tag 5 contains one user attribute information: a territorial henan;
the number of the user information is 3, which are respectively:
the user information 1 includes 7 pieces of user attribute information: name king A, region Beijing, sex male, age 32, equipment brand SAMSUNG, income 3500 Yuan, professional driver;
the user information 2 includes 7 pieces of user attribute information: name plum B, regional Henan, gender woman, age 28, equipment brand iphone, income 2000 Yuan, professional driver;
the user information 3 includes 7 pieces of user attribute information: liu C of name, regional henan, gender, age of 29 years, equipment brand samsung, income 6000 Yuan, professional teacher;
traversing all the user information, and judging whether the user information 1 contains user attribute information corresponding to any first type of label;
judging whether the user information 2 contains user attribute information corresponding to any first type of label;
judging whether the user information 3 contains user attribute information corresponding to any first type of label;
wherein, the user information 1 includes a user attribute information device corresponding to the tag 2: the brand SAMSUNG;
the user information 2 includes user attribute information corresponding to the tag 4: regional Henan;
the user information 3 includes user attribute information corresponding to the tag 5: region henan, and user attribute information corresponding to tag 1: the device brand samsung.
Optionally, the manner of determining whether each piece of user information in all pieces of user information includes user attribute information corresponding to any one of the first type tags includes, but is not limited to:
grouping the first type labels according to the attribute identification of the user attribute information contained in the first type labels;
traversing all the user information, and judging whether each user information in all the user information contains attribute identification corresponding to any group of first-class labels;
under the condition that first user information in all user information contains attribute identifications corresponding to any group of first-class labels, judging whether the user attribute information contained in the first user information is matched with any user attribute information corresponding to any group of first-class labels;
if the user attribute information contained in the first user information is matched with any user attribute information corresponding to any group of first-class labels, judging that the first user information contains the user attribute information corresponding to any first-class label;
and if the user attribute information contained in the first user information is not matched with any user attribute information corresponding to any group of first-class labels, judging that the first user information does not contain the user attribute information corresponding to any first-class label.
For example: the method for determining whether each piece of user information in all pieces of user information includes user attribute information corresponding to any one of the first type tags includes, but is not limited to:
the number of the first type of tags is 5, and the first type of tags are respectively as follows:
label 1: device attribute _ brand _ device brand samsung; tag 1 contains a user attribute information: the device brand samsung;
and 2, labeling: device attribute _ brand _ device brand samsung; tag 2 contains a user attribute information: equipment brand SAMSUNG;
and (3) labeling: device attribute _ brand _ device brand samsung; the tag 3 contains a user attribute information: equipment brand samsung;
and (4) labeling: basic attribute _ region-south province; the tag 4 contains a user attribute information: regional Henan;
and (5) labeling: basic attribute _ region-south province; the tag 5 contains one user attribute information: a territorial henan;
grouping the first type labels according to the attribute identification of the user attribute information contained in the first type labels, comprising the following steps:
attribute identification corresponding to the first type label 1 group: device attributes;
attribute identification corresponding to the first type label 2 group: a base attribute;
traversing all the user information, and judging whether each user information in all the user information contains attribute identification corresponding to any group of first-class labels;
the user information 1 in all the user information contains the attribute identification corresponding to the first type tag 1 group: under the condition of the equipment attribute, judging whether the user attribute information contained in the user information 1 is matched with any user attribute information corresponding to any group of first-class labels;
if the user attribute information contained in the user information 1 and the user attribute information of the tag 2 corresponding to the first type tag 1 group: if the device brands SAMSUNG match, it is determined that the user information 1 includes the user attribute information of the tag 2: equipment brand SAMSUNG;
if the user attribute information contained in the user information 1 and the user attribute information of the tag 4 corresponding to the first type tag 2 group: if the region Henan is not matched, it is determined that the user information 1 does not include the user attribute information of the tag 4: regional Henan.
Step S304, when the first user information in all the user information includes the user attribute information corresponding to any first type of tag, setting any first type of tag as the tag of the user corresponding to the first user information.
For example: step S304, including: when the user information 1 includes the user attribute information device brand SAMSUNG corresponding to the tag 2, the tag 2: the basic attribute _ region henan province is set as a label of the user information 1 corresponding to the user king a.
For another example: step S304, including: the user information 2 includes user attribute information corresponding to the tag 4: in the case of the region of the south of the river, tag 4: the basic attribute _ region henan province is set as a tag of the user information 2 corresponding to the user plum B.
For another example: step S304, including: the user information 3 includes user attribute information corresponding to the tag 5: region henan, and user attribute information corresponding to tag 1: in the case of the device brand samsung, tag 5: the basic attribute _ region henan province is set as a label of the user information 3 corresponding to the user Liu C, and the label 1: the device attribute _ brand _ device brand samsung is set as the label of the user information 3 corresponding to the user liu C.
Under the condition that the first type of label only comprises one piece of user attribute information, only one time of deviation of all user information is needed, the first type of label can be set by a user submitting the user information, the defects of low label setting efficiency and slow label setting speed caused by setting the label for the user information of each label deviation once are avoided, and the setting efficiency and setting speed of the user label are greatly improved.
Step S305, traversing all the user information once for each second-class label, and judging whether each user information in all the user information contains all the user attribute information corresponding to any second-class label in the process of traversing all the user information for any second-class label; the second type of tags are tags containing two or more user attribute information; and setting the second type label as the label of the user corresponding to the second user information under the condition that the second user information in all the user information contains all the user attribute information corresponding to the second type label.
In this embodiment, the number of the second type tags is not specifically limited, and the number of the second type tags may be one or multiple.
For example, step S305 includes: the number of the second type of tags is 2, which are respectively:
and (6) labeling: user attribute _ category _ high income driver; the tag 6 contains user attribute information: professional driver, and user attribute information: income is more than 3000 yuan;
and (7) a label: user attribute _ category _ high income teacher; the tag 7 contains user attribute information: professional teacher, and user attribute information: the income is more than 5000 yuan;
the number of the user information is 3, which are respectively:
the user information 1 includes 7 pieces of user attribute information: name king A, region Beijing, sex male, age 32, equipment brand SAMSUNG, income 3500 Yuan, professional driver;
the user information 2 includes 7 pieces of user attribute information: name plum B, regional Henan, gender woman, age 28, equipment brand iphone, income 2000 Yuan, professional driver;
the user information 3 includes 7 pieces of user attribute information: liu C of name, regional henan, gender, age of 29 years, equipment brand samsung, income 6000 Yuan, professional teacher;
traversing all the user information once for each second type of label;
in the case of tag 6: the user attribute _ category _ high income driver, in the process of traversing all user information, judges whether each user information in all user information contains a label 6: all user attribute information corresponding to the user attribute _ category _ high income driver; the user information 1 among all user information contains a tag 6: in the case of all the user attribute information corresponding to the user attribute _ category _ high income driver, the tag 6: the user attribute _ category _ high income driver is set as a label of the user information 1 corresponding to the user king A;
in the case of tag 7: the user attribute _ category _ high income teacher judges whether each piece of user information in all pieces of user information contains a tag 7 in the process of traversing all pieces of user information: all user attribute information corresponding to the user attribute _ category _ high income teacher; the user information 3 among all user information contains a tag 7: in the case of all user attribute information corresponding to the user attribute _ category _ high income education, the tag 7: the user attribute _ category _ high income education is set as a label of the user information 3 corresponding to the user Liu C.
The method for setting the label according to the third embodiment of the invention can effectively improve the setting efficiency and the setting speed of the off-line label.
A fourth embodiment of the present invention, a label setting apparatus, as shown in fig. 6, includes the following components:
a processor 501 and a memory 502. In some embodiments of the invention, the processor 501 and the memory 502 may be connected by a bus or other means.
Processor 501 may be a general-purpose Processor such as a Central Processing Unit (CPU), a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement embodiments of the present invention. Wherein, the memory 502 is used for storing executable instructions of the processor 501;
a memory 502 for storing program code and transferring the program code to the processor 501. Memory 502 may include Volatile Memory (Volatile Memory), such as Random Access Memory (RAM); the Memory 502 may also include a Non-Volatile Memory (Non-Volatile Memory), such as a Read-Only Memory (ROM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, HDD), or a Solid-State Drive (SSD); the memory 502 may also comprise a combination of memories of the kind described above.
The processor 501 is configured to call the program code management code stored in the memory 502, and perform the following operations:
1) and judging whether each piece of user information in all pieces of user information contains user attribute information corresponding to any one first type of label or not by traversing all pieces of acquired user information.
Wherein, the first type label is a label containing user attribute information.
In this embodiment, the user information is user information reported to the server by the user.
In this embodiment, the number of the first type tags is not specifically limited, and the number of the first type tags may be one or multiple.
Optionally, the manner of determining whether each piece of user information in all pieces of user information includes user attribute information corresponding to any one of the first type tags by traversing all pieces of acquired user information includes:
acquiring user information submitted by all users in a set period;
judging whether each piece of user information in all pieces of user information contains user attribute information corresponding to any one first type of label or not by traversing all pieces of user information; wherein, the first type label is a label containing user attribute information.
For example: the number of the first type of tags is 5, and the first type of tags are respectively as follows:
label 1: device attribute _ brand _ device brand samsung; tag 1 contains a user attribute information: the device brand samsung;
and 2, labeling: device attribute _ brand _ device brand samsung; tag 2 contains a user attribute information: equipment brand SAMSUNG;
and (3) labeling: device attribute _ brand _ device brand samsung; the tag 3 contains a user attribute information: equipment brand samsung;
and (4) labeling: basic attribute _ region-south province; the tag 4 contains a user attribute information: regional Henan;
and (5) labeling: basic attribute _ region-south province; the tag 5 contains one user attribute information: a territorial henan;
the number of the user information is 3, which are respectively:
the user information 1 includes 5 pieces of user attribute information: name king A, region Beijing, sex male, age 32 years, equipment brand SAMSUNG;
the user information 2 includes 5 pieces of user attribute information: name plum B, regional south of the river, gender woman, age 28, equipment brand iphone;
the user information 3 includes 5 pieces of user attribute information: liu C of name, regional henan, gender, age of 29 years, equipment brand samsung;
traversing all the user information, and judging whether the user information 1 contains user attribute information corresponding to any first type of label;
judging whether the user information 2 contains user attribute information corresponding to any first type of label;
judging whether the user information 3 contains user attribute information corresponding to any first type of label;
wherein, the user information 1 includes a user attribute information device corresponding to the tag 2: the brand SAMSUNG;
the user information 2 includes user attribute information corresponding to the tag 4: regional Henan;
the user information 3 includes user attribute information corresponding to the tag 5: region henan, and user attribute information corresponding to tag 1: the device brand samsung.
2) And under the condition that the first user information in all the user information contains the user attribute information corresponding to any first type of label, setting any first type of label as the label of the user corresponding to the first user information.
For example: when the user information 1 includes the user attribute information device brand SAMSUNG corresponding to the tag 2, the tag 2: the basic attribute _ region henan province is set as a label of the user information 1 corresponding to the user king a.
For another example: the user information 2 includes user attribute information corresponding to the tag 4: in the case of the region of the south of the river, tag 4: the basic attribute _ region henan province is set as a tag of the user information 2 corresponding to the user plum B.
For another example: the user information 3 includes user attribute information corresponding to the tag 5: region henan, and user attribute information corresponding to tag 1: in the case of the device brand samsung, tag 5: the basic attribute _ region henan province is set as a label of the user information 3 corresponding to the user Liu C, and the label 1: the device attribute _ brand _ device brand samsung is set as the label of the user information 3 corresponding to the user liu C.
Under the condition that the first type of label only comprises one piece of user attribute information, only one time of deviation of all user information is needed, the first type of label can be set by a user submitting the user information, the defects of low label setting efficiency and slow label setting speed caused by setting the label for the user information of each label deviation once are avoided, and the setting efficiency and setting speed of the user label are greatly improved.
The label setting device according to the fourth embodiment of the present invention can effectively improve the setting efficiency and the setting speed of the offline label.
A fifth embodiment of the present invention, a label setting apparatus, as shown in fig. 6, includes the following components:
a processor 501 and a memory 502. In some embodiments of the invention, the processor 501 and the memory 502 may be connected by a bus or other means.
Processor 501 may be a general-purpose Processor such as a Central Processing Unit (CPU), a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement embodiments of the present invention. Wherein, the memory 502 is used for storing executable instructions of the processor 501;
a memory 502 for storing program code and transferring the program code to the processor 501. Memory 502 may include Volatile Memory (Volatile Memory), such as Random Access Memory (RAM); the Memory 502 may also include a Non-Volatile Memory (Non-Volatile Memory), such as a Read-Only Memory (ROM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, HDD), or a Solid-State Drive (SSD); the memory 502 may also comprise a combination of memories of the kind described above.
The processor 501 is configured to call the program code management code stored in the memory 502, and perform the following operations:
1) and respectively setting a first type label containing each user attribute information according to each preset user attribute information.
For example: the number of the preset user attribute information is 5, which are respectively as follows:
user attribute information 1: the device brand samsung;
user attribute information 2: equipment brand SAMSUNG;
user attribute information 3: equipment brand samsung;
user attribute information 4: regional Henan;
user attribute information 5: a territorial henan;
respectively setting a first type label containing each user attribute information, comprising the following steps:
label 1: device attribute _ brand _ device brand samsung; tag 1 contains a user attribute information: the device brand samsung;
and 2, labeling: device attribute _ brand _ device brand samsung; tag 2 contains a user attribute information: equipment brand SAMSUNG;
and (3) labeling: device attribute _ brand _ device brand samsung; the tag 3 contains a user attribute information: equipment brand samsung;
and (4) labeling: basic attribute _ region-south province; the tag 4 contains a user attribute information: regional Henan;
and (5) labeling: basic attribute _ region-south province; the tag 5 contains one user attribute information: a territorial henan;
2) respectively setting a second type label containing each group of user attribute information according to each group of preset user attribute information; wherein each set of user attribute information comprises two or more user attribute information.
For example, the two sets of preset user attribute information are respectively:
user attribute information 1 group: user attribute information: professional driver, and user attribute information: income is more than 3000 yuan;
user attribute information 2 group: user attribute information: professional teacher, and user attribute information: the income is more than 5000 yuan;
respectively setting a second type of label containing each group of user attribute information, comprising the following steps:
and (6) labeling: user attribute _ category _ high income driver; the tag 6 contains user attribute information: professional driver, and user attribute information: income is more than 3000 yuan;
and (7) a label: user attribute _ category _ high income teacher; the tag 7 contains user attribute information: professional teacher, and user attribute information: the income is more than 5000 yuan;
3) and judging whether each piece of user information in all pieces of user information contains user attribute information corresponding to any one first type of label or not by traversing all pieces of acquired user information.
Wherein, the first type label is a label containing user attribute information.
In this embodiment, the user information is user information reported to the server by the user.
In this embodiment, the number of the first type tags is not specifically limited, and the number of the first type tags may be one or multiple.
Optionally, the manner of determining whether each piece of user information in all pieces of user information includes user attribute information corresponding to any one of the first type tags by traversing all pieces of acquired user information includes:
acquiring user information submitted by all users in a set period;
judging whether each piece of user information in all pieces of user information contains user attribute information corresponding to any one first type of label or not by traversing all pieces of user information; wherein, the first type label is a label containing user attribute information.
For example: the number of the first type of tags is 5, and the first type of tags are respectively as follows:
label 1: device attribute _ brand _ device brand samsung; tag 1 contains a user attribute information: the device brand samsung;
and 2, labeling: device attribute _ brand _ device brand samsung; tag 2 contains a user attribute information: equipment brand SAMSUNG;
and (3) labeling: device attribute _ brand _ device brand samsung; the tag 3 contains a user attribute information: equipment brand samsung;
and (4) labeling: basic attribute _ region-south province; the tag 4 contains a user attribute information: regional Henan;
and (5) labeling: basic attribute _ region-south province; the tag 5 contains one user attribute information: a territorial henan;
the number of the user information is 3, which are respectively:
the user information 1 includes 7 pieces of user attribute information: name king A, region Beijing, sex male, age 32, equipment brand SAMSUNG, income 3500 Yuan, professional driver;
the user information 2 includes 7 pieces of user attribute information: name plum B, regional Henan, gender woman, age 28, equipment brand iphone, income 2000 Yuan, professional driver;
the user information 3 includes 7 pieces of user attribute information: liu C of name, regional henan, gender, age of 29 years, equipment brand samsung, income 6000 Yuan, professional teacher;
traversing all the user information, and judging whether the user information 1 contains user attribute information corresponding to any first type of label;
judging whether the user information 2 contains user attribute information corresponding to any first type of label;
judging whether the user information 3 contains user attribute information corresponding to any first type of label;
wherein, the user information 1 includes a user attribute information device corresponding to the tag 2: the brand SAMSUNG;
the user information 2 includes user attribute information corresponding to the tag 4: regional Henan;
the user information 3 includes user attribute information corresponding to the tag 5: region henan, and user attribute information corresponding to tag 1: the device brand samsung.
Optionally, the manner of determining whether each piece of user information in all pieces of user information includes user attribute information corresponding to any one of the first type tags includes, but is not limited to:
grouping the first type labels according to the attribute identification of the user attribute information contained in the first type labels;
traversing all the user information, and judging whether each user information in all the user information contains attribute identification corresponding to any group of first-class labels;
under the condition that first user information in all user information contains attribute identifications corresponding to any group of first-class labels, judging whether the user attribute information contained in the first user information is matched with any user attribute information corresponding to any group of first-class labels;
if the user attribute information contained in the first user information is matched with any user attribute information corresponding to any group of first-class labels, judging that the first user information contains the user attribute information corresponding to any first-class label;
and if the user attribute information contained in the first user information is not matched with any user attribute information corresponding to any group of first-class labels, judging that the first user information does not contain the user attribute information corresponding to any first-class label.
For example: the method for determining whether each piece of user information in all pieces of user information includes user attribute information corresponding to any one of the first type tags includes, but is not limited to:
the number of the first type of tags is 5, and the first type of tags are respectively as follows:
label 1: device attribute _ brand _ device brand samsung; tag 1 contains a user attribute information: the device brand samsung;
and 2, labeling: device attribute _ brand _ device brand samsung; tag 2 contains a user attribute information: equipment brand SAMSUNG;
and (3) labeling: device attribute _ brand _ device brand samsung; the tag 3 contains a user attribute information: equipment brand samsung;
and (4) labeling: basic attribute _ region-south province; the tag 4 contains a user attribute information: regional Henan;
and (5) labeling: basic attribute _ region-south province; the tag 5 contains one user attribute information: a territorial henan;
grouping the first type labels according to the attribute identification of the user attribute information contained in the first type labels, comprising the following steps:
attribute identification corresponding to the first type label 1 group: device attributes;
attribute identification corresponding to the first type label 2 group: a base attribute;
traversing all the user information, and judging whether each user information in all the user information contains attribute identification corresponding to any group of first-class labels;
the user information 1 in all the user information contains the attribute identification corresponding to the first type tag 1 group: under the condition of the equipment attribute, judging whether the user attribute information contained in the user information 1 is matched with any user attribute information corresponding to any group of first-class labels;
if the user attribute information contained in the user information 1 and the user attribute information of the tag 2 corresponding to the first type tag 1 group: if the device brands SAMSUNG match, it is determined that the user information 1 includes the user attribute information of the tag 2: equipment brand SAMSUNG;
if the user attribute information contained in the user information 1 and the user attribute information of the tag 4 corresponding to the first type tag 2 group: if the region Henan is not matched, it is determined that the user information 1 does not include the user attribute information of the tag 4: regional Henan.
4) And under the condition that the first user information in all the user information contains the user attribute information corresponding to any first type of label, setting any first type of label as the label of the user corresponding to the first user information.
For example: when the user information 1 includes the user attribute information device brand SAMSUNG corresponding to the tag 2, the tag 2: the basic attribute _ region henan province is set as a label of the user information 1 corresponding to the user king a.
For another example: the user information 2 includes user attribute information corresponding to the tag 4: in the case of the region of the south of the river, tag 4: the basic attribute _ region henan province is set as a tag of the user information 2 corresponding to the user plum B.
For another example: the user information 3 includes user attribute information corresponding to the tag 5: region henan, and user attribute information corresponding to tag 1: in the case of the device brand samsung, tag 5: the basic attribute _ region henan province is set as a label of the user information 3 corresponding to the user Liu C, and the label 1: the device attribute _ brand _ device brand samsung is set as the label of the user information 3 corresponding to the user liu C.
Under the condition that the first type of label only comprises one piece of user attribute information, only one time of deviation of all user information is needed, the first type of label can be set by a user submitting the user information, the defects of low label setting efficiency and slow label setting speed caused by setting the label for the user information of each label deviation once are avoided, and the setting efficiency and setting speed of the user label are greatly improved.
5) Traversing all the user information once for each second-class label, and judging whether each user information in all the user information contains all the user attribute information corresponding to any second-class label in the process of traversing all the user information for any second-class label; the second type of tags are tags containing two or more user attribute information; and setting the second type label as the label of the user corresponding to the second user information under the condition that the second user information in all the user information contains all the user attribute information corresponding to the second type label.
In this embodiment, the number of the second type tags is not specifically limited, and the number of the second type tags may be one or multiple.
For example, the number of tags in the second category is 2, which are respectively:
and (6) labeling: user attribute _ category _ high income driver; the tag 6 contains user attribute information: professional driver, and user attribute information: income is more than 3000 yuan;
and (7) a label: user attribute _ category _ high income teacher; the tag 7 contains user attribute information: professional teacher, and user attribute information: the income is more than 5000 yuan;
the number of the user information is 3, which are respectively:
the user information 1 includes 7 pieces of user attribute information: name king A, region Beijing, sex male, age 32, equipment brand SAMSUNG, income 3500 Yuan, professional driver;
the user information 2 includes 7 pieces of user attribute information: name plum B, regional Henan, gender woman, age 28, equipment brand iphone, income 2000 Yuan, professional driver;
the user information 3 includes 7 pieces of user attribute information: liu C of name, regional henan, gender, age of 29 years, equipment brand samsung, income 6000 Yuan, professional teacher;
traversing all the user information once for each second type of label;
in the case of tag 6: the user attribute _ category _ high income driver, in the process of traversing all user information, judges whether each user information in all user information contains a label 6: all user attribute information corresponding to the user attribute _ category _ high income driver; the user information 1 among all user information contains a tag 6: in the case of all the user attribute information corresponding to the user attribute _ category _ high income driver, the tag 6: the user attribute _ category _ high income driver is set as a label of the user information 1 corresponding to the user king A;
in the case of tag 7: the user attribute _ category _ high income teacher judges whether each piece of user information in all pieces of user information contains a tag 7 in the process of traversing all pieces of user information: all user attribute information corresponding to the user attribute _ category _ high income teacher; the user information 3 among all user information contains a tag 7: in the case of all user attribute information corresponding to the user attribute _ category _ high income education, the tag 7: the user attribute _ category _ high income education is set as a label of the user information 3 corresponding to the user Liu C.
The label setting device according to the fifth embodiment of the invention can effectively improve the setting efficiency and speed of the off-line labels.
A sixth embodiment of the present invention is a computer-readable storage medium.
The computer storage media may be RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage media known in the art.
The computer readable storage medium stores one or more programs which are executable by one or more processors to implement some or all of the steps in any of the first to third embodiments of the present invention.
The computer-readable storage medium according to the sixth embodiment of the present invention stores one or more programs, and the one or more programs are executable by one or more processors, so that the setting efficiency and the setting speed of the offline label can be effectively improved.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (9)

1. A label setting method, comprising:
judging whether each piece of user information in all the pieces of user information contains user attribute information corresponding to any one first type of label or not through traversing all the pieces of user information obtained; the first type of label is a label containing user attribute information; the determining whether each piece of user information in all the pieces of user information includes user attribute information corresponding to any one of the first type tags includes:
grouping the first type labels according to the attribute identification of the user attribute information contained in the first type labels; the attribute identification comprises: device attributes and base attributes;
traversing all the user information, and judging whether each user information in all the user information contains attribute identification corresponding to any group of first-class labels;
under the condition that first user information in all the user information contains attribute identifications corresponding to any group of first-class labels, judging whether the user attribute information contained in the first user information is matched with any user attribute information corresponding to any group of first-class labels;
if yes, judging that the first user information contains user attribute information corresponding to any first type of label; otherwise, judging that the first user information does not contain user attribute information corresponding to any first type of label;
and setting any first type label as a label of a user corresponding to the first user information under the condition that the first user information in all the user information contains user attribute information corresponding to any first type label.
2. The method according to claim 1, wherein after the setting of any of the first type tags as the tag of the user corresponding to the first user information, the method further comprises:
traversing all the user information once for each second-class label, and judging whether each user information in all the user information contains all the user attribute information corresponding to any second-class label in the process of traversing all the user information for any second-class label; the second type of tags are tags containing two or more user attribute information;
and setting any second type label as the label of the user corresponding to the second user information under the condition that the second user information in all the user information contains all the user attribute information corresponding to any second type label.
3. The method of claim 2, wherein prior to said traversing all of said user information once for each second type tag, said method further comprises:
respectively setting a second type label containing each group of user attribute information according to each group of preset user attribute information; wherein each set of user attribute information comprises two or more user attribute information.
4. The method according to any one of claims 1 to 3, wherein before the determining, by traversing all the obtained user information, whether each piece of user information in all the user information contains user attribute information corresponding to any one first type tag, the method further includes:
and respectively setting a first type label containing each piece of user attribute information according to each piece of preset user attribute information.
5. A label setting device, characterized in that the label setting device comprises a processor and a memory;
the processor is configured to execute a tag setting program stored in the memory to implement the steps of:
judging whether each piece of user information in all the pieces of user information contains user attribute information corresponding to any one first type of label or not through traversing all the pieces of user information obtained; the first type of label is a label containing user attribute information; the determining whether each piece of user information in all the pieces of user information includes user attribute information corresponding to any one of the first type tags includes:
grouping the first type labels according to the attribute identification of the user attribute information contained in the first type labels; the attribute identification comprises: device attributes and base attributes;
traversing all the user information, and judging whether each user information in all the user information contains attribute identification corresponding to any group of first-class labels;
under the condition that first user information in all the user information contains attribute identifications corresponding to any group of first-class labels, judging whether the user attribute information contained in the first user information is matched with any user attribute information corresponding to any group of first-class labels;
if yes, judging that the first user information contains user attribute information corresponding to any first type of label; otherwise, judging that the first user information does not contain user attribute information corresponding to any first type of label;
and setting any first type label as a label of a user corresponding to the first user information under the condition that the first user information in all the user information contains user attribute information corresponding to any first type label.
6. The apparatus according to claim 5, wherein after the setting of any of the first type tags as the tag of the user corresponding to the first user information, the processor is further configured to execute the tag setting program to implement the following steps:
traversing all the user information once for each second-class label, and judging whether each user information in all the user information contains all the user attribute information corresponding to any second-class label in the process of traversing all the user information for any second-class label; the second type of tags are tags containing two or more user attribute information;
and setting any second type label as the label of the user corresponding to the second user information under the condition that the second user information in all the user information contains all the user attribute information corresponding to any second type label.
7. The apparatus of claim 6, wherein before said traversing all of said user information once for each second type tag, said processor is further configured to execute said tag setup procedure to perform the steps of:
respectively setting a second type label containing each group of user attribute information according to each group of preset user attribute information; wherein each set of user attribute information comprises two or more user attribute information.
8. The device according to any one of claims 5 to 7, wherein before the step of determining whether each piece of user information in all pieces of user information obtained through traversal includes user attribute information corresponding to any one of the first type tags, the processor is further configured to execute the tag setting program to implement the following steps:
and respectively setting a first type label containing each piece of user attribute information according to each piece of preset user attribute information.
9. A computer readable storage medium, characterized in that the computer readable storage medium stores one or more programs executable by one or more processors to implement the steps of the label setting method according to any one of claims 1 to 4.
CN201810510849.1A 2018-05-24 2018-05-24 Label setting method and device and computer readable storage medium Active CN108829748B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810510849.1A CN108829748B (en) 2018-05-24 2018-05-24 Label setting method and device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810510849.1A CN108829748B (en) 2018-05-24 2018-05-24 Label setting method and device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN108829748A CN108829748A (en) 2018-11-16
CN108829748B true CN108829748B (en) 2022-03-18

Family

ID=64145506

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810510849.1A Active CN108829748B (en) 2018-05-24 2018-05-24 Label setting method and device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN108829748B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106294787A (en) * 2016-08-12 2017-01-04 北京金山安全软件有限公司 Information pushing method and device and electronic equipment
CN106649318A (en) * 2015-10-29 2017-05-10 北京国双科技有限公司 Information display method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9008688B2 (en) * 2012-05-07 2015-04-14 Qualcomm Incorporated Calendar matching of inferred contexts and label propagation
WO2015154270A1 (en) * 2014-04-10 2015-10-15 华为终端有限公司 Method and device for information search

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106649318A (en) * 2015-10-29 2017-05-10 北京国双科技有限公司 Information display method and device
CN106294787A (en) * 2016-08-12 2017-01-04 北京金山安全软件有限公司 Information pushing method and device and electronic equipment

Also Published As

Publication number Publication date
CN108829748A (en) 2018-11-16

Similar Documents

Publication Publication Date Title
CN107547741B (en) Information processing method and device and computer readable storage medium
CN108241752B (en) Photo display method, mobile terminal and computer readable storage medium
CN107862217B (en) Position information acquisition method, mobile terminal and computer storage medium
CN109766119B (en) Recovery partition upgrade method, terminal and computer readable storage medium
CN109584897B (en) Video noise reduction method, mobile terminal and computer readable storage medium
CN109151216B (en) Application starting method, mobile terminal, server and computer readable storage medium
CN108011937B (en) Message pushing method, server, intelligent terminal and computer readable storage medium
CN107480054B (en) Call chain data processing method and device and computer readable storage medium
CN112597115A (en) Container mirror image compression method and device, terminal equipment and medium
CN108040116B (en) Message pushing method, router and computer readable storage medium
CN108322611B (en) Screen locking information pushing method and device and computer readable storage medium
CN108063863B (en) Information browsing method, terminal, server and computer readable storage medium
CN112612372A (en) Touch event regulation and control method and device and computer readable storage medium
CN112423211A (en) Multi-audio transmission control method, equipment and computer readable storage medium
CN112105057A (en) Method and device for locally brushing electronic price tag and computer readable storage medium
CN108566476B (en) Information processing method, terminal and computer readable storage medium
CN110955397A (en) Method for setting frame rate of game terminal, game terminal and storage medium
CN107766544B (en) Information management method, terminal and computer readable storage medium
CN108829748B (en) Label setting method and device and computer readable storage medium
CN110275667B (en) Content display method, mobile terminal, and computer-readable storage medium
CN109379719B (en) Application program broadcast processing method and device and computer readable storage medium
CN109656658B (en) Editing object processing method and device and computer readable storage medium
CN109327604B (en) Status bar information display method and equipment and computer readable storage medium
CN109743452B (en) Call record classification method, device and computer readable storage medium
CN108037959B (en) Intelligent interface merging method, mobile terminal and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant