CN112163050B - Label processing method and device, electronic equipment and storage medium - Google Patents

Label processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112163050B
CN112163050B CN202011109548.1A CN202011109548A CN112163050B CN 112163050 B CN112163050 B CN 112163050B CN 202011109548 A CN202011109548 A CN 202011109548A CN 112163050 B CN112163050 B CN 112163050B
Authority
CN
China
Prior art keywords
tag
cancelled
label
legal
identification
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
CN202011109548.1A
Other languages
Chinese (zh)
Other versions
CN112163050A (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.)
Taikang Life Insurance Co ltd
Taikang Insurance Group Co Ltd
Original Assignee
Taikang Life Insurance Co ltd
Taikang Insurance Group 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 Taikang Life Insurance Co ltd, Taikang Insurance Group Co Ltd filed Critical Taikang Life Insurance Co ltd
Priority to CN202011109548.1A priority Critical patent/CN112163050B/en
Publication of CN112163050A publication Critical patent/CN112163050A/en
Application granted granted Critical
Publication of CN112163050B publication Critical patent/CN112163050B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating

Landscapes

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

Abstract

The invention discloses a tag processing method, a tag processing device, electronic equipment and a storage medium, which are used for solving the problems of slower processing speed and occupation of database resources in the tag canceling process in the prior art. The method comprises the following steps: receiving a tag update request sent by a client, wherein the tag update request carries a to-be-cancelled tag and a user ID of a user, and the tag represents the identity attribute of the user; acquiring an effective label corresponding to the user ID from a stored label table; respectively transcoding the to-be-cancelled tag according to a preset transcoding rule to generate an identification code of the to-be-cancelled tag, and transcoding the effective tag to generate an effective tag identification code; comparing the identification code of the to-be-cancelled label with the effective label identification code according to a preset identification code verification rule to obtain a legal identification code fragment of the to-be-cancelled label; converting the legal identification code fragment to be cancelled into a corresponding legal label to be cancelled; and setting the legal label to be cancelled as a failure state, and updating a label table.

Description

Label processing method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a tag processing method, a tag processing device, an electronic device, and a storage medium.
Background
More and more enterprises pay more attention to the quality of staff, a plurality of staff honor systems are built based on different business scenes, and the honor identities of the staff are subjected to label management for better tracking and analyzing the staff. In a different business scenario, the manager may track and manage these tags representing the honor identities of employees based on specific business rules, such as cancelling some tags, adding tags, etc. Labels representing different honor identities of staff are increased along with the expansion and the deepening of management of the business, a part of labels have stronger coupling and have association relations, and a part of labels are loose and independent and have no obvious association relations. When some labels need to be canceled when staff is tracked in a specific business scene and the labels are invalid, in the prior art, whether the labels to be canceled are legal canceling labels or not needs to be judged one by one, and if one legal canceling label is judged, after the labels are set to be invalid in a database, whether the next label is the legal canceling label or not is judged, so that the calculated amount is increased, and the problems of lower processing speed and occupation of database resources are caused.
Disclosure of Invention
In order to solve the problems of low processing speed and occupation of database resources caused in the processing process of canceling the tag in the prior art, the embodiment of the invention provides a tag processing method, a tag processing device, electronic equipment and a storage medium.
In a first aspect, an embodiment of the present invention provides a tag processing method, including:
receiving a tag update request sent by a client, wherein the tag update request carries a to-be-cancelled tag and a user Identity (ID) of a user, and the tag is used for representing the identity attribute of the user;
acquiring an effective label corresponding to the user ID from a stored label table, wherein the label table stores the corresponding relation between the user ID and the label and the state information of the labeled label;
respectively transcoding the to-be-cancelled tag according to a preset transcoding rule to generate an identification code of the to-be-cancelled tag, and transcoding the effective tag to generate an identification code of the effective tag;
comparing the identification code to be cancelled with the effective label identification code according to a preset identification code verification rule to obtain a legal identification code fragment to be cancelled;
converting the legal to-be-cancelled identification code fragments into corresponding legal to-be-cancelled labels;
And setting the legal label to be cancelled as a failure state, and updating the label table.
In the tag processing method provided by the embodiment of the invention, a server receives a tag update request which is sent by a client and carries a tag to be cancelled and a user ID (Identity Document, identity mark) of a user, acquires an effective tag corresponding to the user ID from a stored tag table, transcodes the tag to be cancelled according to a preset transcoding rule to generate a tag identification code to be cancelled, transcodes the effective tag to generate an effective tag identification code, compares the generated tag identification code to be cancelled with the effective tag identification code according to a preset identification code checking rule to obtain a legal tag label tag fragment to be cancelled, further converts the legal tag identification fragment to a corresponding legal tag to be cancelled, marks the legal tag to be cancelled as invalid, and updates the tag table, compared with the prior art, in the tag processing method provided by the embodiment of the invention, when the tag is cancelled, all the tags to be cancelled by the transcoding rule are set to generate one tag identification code to be cancelled, and all the effective tags to be cancelled are subjected to one by one, the valid tag identification code to be cancelled, and the valid tag identification code can be cancelled, and the valid tag identification code fragments can be directly compared with the legal tag identification code tag fragment to be cancelled, and the valid tag identification fragment can be cancelled one by one, and the valid tag identification fragment can be cancelled, compared with the valid tag identification code tag is obtained, database resources are saved.
Preferably, the method further includes transcoding the tag to be cancelled according to a preset transcoding rule, and generating an identification code of the tag to be cancelled, specifically including:
determining the identifier sub-codes of the tags to be cancelled according to the corresponding relation between the preset tags and the identifier sub-codes;
determining the category to which each label to be cancelled belongs;
aiming at the tags to be cancelled belonging to the first category, determining the corresponding subclasses of the tags to be cancelled belonging to the first category according to the preset corresponding relations between the subclasses of the first category and the tags;
determining the grades of the tags to be cancelled belonging to the same subclass, and combining the identification subcodes of the tags to be cancelled belonging to the same subclass according to the order of the grades from high to low to generate subcode segments corresponding to the tags to be cancelled of each subclass;
and splicing the subcode segments corresponding to the to-be-cancelled labels of the subclasses with the identification subcodes of the to-be-cancelled labels belonging to the second class, and generating the to-be-cancelled label identification codes.
Preferably, the effective tag is transcoded according to a preset transcoding rule to generate an effective tag identification code, which specifically includes:
determining the identifier subcodes of each effective label according to the corresponding relation between the preset label and the identifier subcodes;
Determining the category to which each valid tag belongs;
aiming at the effective tags belonging to the first category, determining the subclasses corresponding to the effective tags belonging to the first category according to the preset corresponding relation between the subclasses of the first category and the tags;
determining the grades of the effective labels belonging to the same subclass, and combining the identification subcodes of the effective labels belonging to the same subclass according to the order of the grades from high to low to generate subcode segments corresponding to the effective labels of all subclasses;
and splicing the subcode segments corresponding to the effective labels of the subclasses with the identification subcodes of the effective labels belonging to the second class, so as to generate effective label identification codes.
Preferably, the tag identification code to be cancelled is compared with the effective tag identification code according to a preset identification code verification rule to obtain a legal tag identification code fragment to be cancelled, which specifically comprises:
respectively comparing the subcode sections corresponding to the to-be-cancelled labels belonging to the same subclass with the subcode sections corresponding to the effective labels, and identifying the identification subcodes of legal to-be-cancelled labels in the subcode sections corresponding to the to-be-cancelled labels;
comparing the identifier subcodes of the to-be-cancelled labels belonging to the second category with the identifier subcodes of the effective labels, and identifying the identifier subcodes of the legal to-be-cancelled labels belonging to the second category;
And splicing the identified identification subcodes of the legal to-be-cancelled labels in the subcode sections corresponding to the to-be-cancelled labels belonging to the sub-classes with the identification subcodes of the legal to-be-cancelled labels belonging to the second class to generate legal to-be-cancelled label identification code fragments.
Preferably, the sub-code segments corresponding to the to-be-cancelled labels belonging to the same subclass are respectively compared with the sub-code segments corresponding to the effective labels, and the identification sub-codes of the legal to-be-cancelled labels in the sub-code segments corresponding to the to-be-cancelled labels are identified, which specifically comprises:
aiming at the subcode section corresponding to the to-be-cancelled label and the subcode section corresponding to the effective label, if the subcode section corresponding to the to-be-cancelled label is identical to the first N identification subcodes in the subcode section corresponding to the effective label, determining that the first N identification subcodes are the legal identification subcodes of the subcode section corresponding to the to-be-cancelled label;
when the sub-code segment corresponding to the to-be-cancelled label is determined to be different from the first identification sub-code in the sub-code segment corresponding to the effective label, determining that the sub-code segment corresponding to the to-be-cancelled label does not contain the identification sub-code corresponding to the legal to-be-cancelled label.
Preferably, the comparing the identifier sub-code of the to-be-cancelled tag belonging to the second category with the identifier sub-code of the valid tag, and identifying the identifier sub-code of the legal to-be-cancelled tag belonging to the second category specifically includes:
and determining the identifier sub-code of the to-be-cancelled label belonging to the second category and the identifier sub-code of the valid label belonging to the second category as the identifier sub-code of the legal to-be-cancelled label belonging to the second category in the identifier sub-code of the to-be-cancelled label.
Preferably, the identification of the identifier sub-code corresponding to the legal tag to be cancelled in the sub-code segment corresponding to the legal tag to be cancelled belonging to each sub-class is performed in parallel with the identification of the identifier sub-code of the legal tag to be cancelled belonging to the second class in the identifier code of the tag to be cancelled.
In a second aspect, an embodiment of the present invention provides a tag processing apparatus, including:
the receiving unit is used for receiving a tag canceling request sent by the client, wherein the tag canceling request carries a tag to be canceled of a user and a user Identity (ID), and the tag is used for representing the identity attribute of the user;
an obtaining unit, configured to obtain an effective tag corresponding to the user ID from a stored tag table, where a correspondence between the user ID and the tag and status information of the marked tag is stored in the tag table;
The transcoding unit is used for respectively transcoding the to-be-cancelled tag according to a preset transcoding rule to generate an identification code of the to-be-cancelled tag, and transcoding the effective tag to generate an effective tag identification code;
the comparison unit is used for comparing the identification code of the label to be cancelled with the identification code of the effective label according to a preset identification code verification rule to obtain a legal identification code fragment of the label to be cancelled;
the tag conversion unit is used for converting the legal identifier code fragment to be cancelled into a corresponding legal tag to be cancelled;
and the processing unit is used for setting the legal tag to be cancelled as a failure state and updating the tag table.
Preferably, the transcoding unit is specifically configured to determine the identifier codes of the tags to be cancelled according to the corresponding relationship between the preset tag and the identifier codes; determining the category to which each label to be cancelled belongs; aiming at the tags to be cancelled belonging to the first category, determining the corresponding subclasses of the tags to be cancelled belonging to the first category according to the preset corresponding relations between the subclasses of the first category and the tags; determining the grades of the tags to be cancelled belonging to the same subclass, and combining the identification subcodes of the tags to be cancelled belonging to the same subclass according to the order of the grades from high to low to generate subcode segments corresponding to the tags to be cancelled of each subclass; and splicing the subcode segments corresponding to the to-be-cancelled labels of the subclasses with the identification subcodes of the to-be-cancelled labels belonging to the second class, and generating the to-be-cancelled label identification codes.
Preferably, the transcoding unit is specifically configured to determine the identifier subcodes of each valid tag according to the corresponding relationship between the preset tag and the identifier subcodes; determining the category to which each valid tag belongs; aiming at the effective tags belonging to the first category, determining the subclasses corresponding to the effective tags belonging to the first category according to the preset corresponding relation between the subclasses of the first category and the tags; determining the grades of the effective labels belonging to the same subclass, and combining the identification subcodes of the effective labels belonging to the same subclass according to the order of the grades from high to low to generate subcode segments corresponding to the effective labels of all subclasses; and splicing the subcode segments corresponding to the effective labels of the subclasses with the identification subcodes of the effective labels belonging to the second class, so as to generate effective label identification codes.
Preferably, the comparing unit is specifically configured to respectively compare a subcode segment corresponding to a to-be-cancelled tag belonging to the same subclass with a subcode segment corresponding to an effective tag, and identify an identifier subcode of a legal to-be-cancelled tag in the subcode segment corresponding to the to-be-cancelled tag; comparing the identifier subcodes of the to-be-cancelled labels belonging to the second category with the identifier subcodes of the effective labels, and identifying the identifier subcodes of the legal to-be-cancelled labels belonging to the second category; and splicing the identified identification subcodes of the legal to-be-cancelled labels in the subcode sections corresponding to the to-be-cancelled labels belonging to the sub-classes with the identification subcodes of the legal to-be-cancelled labels belonging to the second class to generate legal to-be-cancelled label identification code fragments.
Preferably, the comparing unit is specifically configured to determine, for a subcode segment corresponding to a to-be-cancelled tag and a subcode segment corresponding to an effective tag that belong to any same subclass, that the first N identifier subcodes are legal identifier subcodes of the subcode segment corresponding to the to-be-cancelled tag when determining that the subcode segment corresponding to the to-be-cancelled tag is identical to the first N identifier subcodes in the subcode segment corresponding to the effective tag; when the sub-code segment corresponding to the to-be-cancelled label is determined to be different from the first identification sub-code in the sub-code segment corresponding to the effective label, determining that the sub-code segment corresponding to the to-be-cancelled label does not contain the identification sub-code corresponding to the legal to-be-cancelled label.
Preferably, the comparing unit is specifically configured to determine, as the identifier sub-code of the legal tag to be cancelled, which belongs to the second category in the identifier sub-code of the tag to be cancelled, which belongs to the second category, and the identifier sub-code of the tag to be cancelled, which is the same as the identifier sub-code of the valid tag which belongs to the second category.
Preferably, the identification of the identifier sub-code corresponding to the legal tag to be cancelled in the sub-code segment corresponding to the legal tag to be cancelled belonging to each sub-class is performed in parallel with the identification of the identifier sub-code of the legal tag to be cancelled belonging to the second class in the identifier code of the tag to be cancelled.
The technical effects of the tag processing apparatus provided by the present invention may be referred to the technical effects of the first aspect or each implementation manner of the first aspect, which are not described herein again.
In a third aspect, an embodiment of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor implements the tag processing method of the present invention when executing the program.
In a fourth aspect, an embodiment of the present invention provides a computer readable storage medium having stored thereon a computer program which when executed by a processor implements the steps of the tag processing method of the present invention.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims thereof as well as the appended drawings.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention and do not constitute a limitation on the invention. In the drawings:
Fig. 1 is a schematic flow chart of an implementation of a tag processing method according to an embodiment of the present invention;
fig. 2 is a schematic diagram of an implementation flow for transcoding a tag according to an embodiment of the present invention;
FIG. 3 is an exemplary tag class diagram provided by an embodiment of the present invention;
fig. 4 is a schematic diagram of an implementation flow of transcoding a tag to be cancelled according to an embodiment of the present invention;
fig. 5 is a schematic flow chart of an implementation of transcoding an effective tag according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of an implementation flow for comparing a tag identification code to be cancelled with a valid tag identification code according to an embodiment of the present invention;
fig. 7 is a schematic diagram of an implementation flow of identifying a legal identifier sub-code of a tag to be cancelled in a sub-code segment corresponding to the tag to be cancelled according to an embodiment of the present invention;
FIG. 8 is a process diagram of comparing a tag identification code to be cancelled with a valid tag identification code, according to an exemplary embodiment of the present invention;
FIG. 9 is a schematic diagram of a tag query interface of an exemplary agent identity tag management APP provided by an embodiment of the present invention;
FIG. 10 is a schematic diagram of a label selection interface according to an embodiment of the present invention;
FIG. 11 is a schematic diagram of a label query interface display after label modification according to an embodiment of the present invention;
Fig. 12 is a schematic structural diagram of a label processing apparatus according to an embodiment of the present invention;
fig. 13 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to solve the problems, the embodiment of the invention provides a tag processing method, a tag processing device, electronic equipment and a storage medium.
The preferred embodiments of the present invention will be described below with reference to the accompanying drawings of the specification, it being understood that the preferred embodiments described herein are for illustration and explanation only, and not for limitation of the present invention, and embodiments of the present invention and features of the embodiments may be combined with each other without conflict.
As shown in fig. 1, which is a schematic diagram of an implementation flow of a tag processing method according to an embodiment of the present invention, the method may include the following steps:
s11, receiving a tag update request sent by a client, wherein the tag update request carries a tag to be cancelled and a user ID of a user.
In implementation, the server receives a tag update request sent by the client and carrying a to-be-cancelled tag and a user ID of the user, where the tag is used to characterize an identity attribute of the user, and for example, the tag may be a tag that characterizes a honor identity of the user. Tags are classified according to coupling into two categories: the coupling label is a label with coupling property, the coupling property is a measure of the association degree of two entities, namely the coupling label is a label with association, for example, an enterprise sets M honor labels for staff in a certain specified business scene, the M labels are higher from the 1 st to M th grades, namely the representative honor is higher, the M labels have association, and the M labels are coupling labels. A loose independent tag is a tag that does not have an association with its presence, which is independent, in which case the user ID may be, but is not limited to, the employee's job number.
In the embodiment of the present invention, the to-be-cancelled tag in the tag update request sent by the client may include the two types of tags, or may include only one type of tag.
S12, acquiring the effective label corresponding to the user ID from the stored label table.
In specific implementation, the server acquires the valid tag corresponding to the user ID from a pre-stored tag table, wherein the tag table stores the corresponding relationship between the user ID and the tag and the state information of the marked tag.
Specifically, the tag table may include, but is not limited to, the following: the user ID, the tag corresponding to the user ID, and the tag status of each tag may include "valid" and "invalid", where the tag to be canceled is selected from valid tags, that is: the valid tag is placed in a disabled state. As shown in table 1, the tag table may be of the form:
TABLE 1
S13, respectively transcoding the to-be-cancelled labels according to a preset transcoding rule to generate to-be-cancelled label identification codes, and transcoding the effective labels to generate effective label identification codes.
In specific implementation, the server transcodes the to-be-cancelled tag according to a preset transcoding rule to generate an identification code of the to-be-cancelled tag, wherein the identification code of the to-be-cancelled tag is a comprehensive representation of all to-be-cancelled tags. And the server transcodes the effective labels according to the preset transcoding rule to generate effective label identification codes, wherein the effective label identification codes are comprehensive representations of all the effective labels.
Specifically, whether for the tag to be cancelled or the valid tag, the tag is transcoded according to the flow shown in fig. 2 to generate the tag identification code, which may include the following steps:
s21, determining the identifier sub-codes of all the tags according to the corresponding relation between the preset tags and the identifier sub-codes.
In specific implementation, the server presets the corresponding relation between the labels and the identifier sub-codes according to the types of the labels, and determines the identifier sub-codes of each label according to the preset corresponding relation between the labels and the identifier sub-codes, wherein the identifier sub-codes of the labels are label feature codes set by the labels, and the labels are represented by the label feature codes.
The label categories are divided into a first category and a second category, wherein the first category is a coupling label, the second category is a loose independent label, and the first category is divided into a plurality of sub-categories according to different services. For example, an insurance company performs label management on an internal HWP (Health Wealth Planner, health finance planner) agent, as shown in fig. 3, which is a label classification diagram of the HWP agent, and the label pool includes the following labels: "Label 1", "Label 2", "Label 3", "Label 4", "Label 5", "Label 6", "Label 7", "Label 8", "Label 9", wherein it is assumed that service (or honor System) 1 corresponds to 4 labels (i.e., honor identity labels): the "tag 1", "tag 2", "tag 3", "tag 4", "tag 1" rank < "tag 2" rank < "tag 3" rank < "tag 4" and service (or honor system) 2 corresponds to 3 tags; the "label 5", "label 6", "label 7", and "label 5" are rated < "label 6" and "label 7"; "Label 8" is a loose stand-alone label. Wherein, the coupling tag includes: the "tag 1", "tag 2", "tag 3", "tag 4" and "tag 5", "tag 6", "tag 7", "tag 1", "tag 2", "tag 3", "tag 4" and "tag 5", "tag 6", "tag 7" belong to different subclasses, namely subclasses under the first class, provided that "tag 1", "tag 2", "tag 3", "tag 4" belong to subclass a, "tag 5", "tag 6", "tag 7" belong to subclass B, the second class tag, i.e. the loose independent tag, is set to be an X class tag, for the first class tag, i.e. the coupled tag, the tags belonging to the same subclass are set to the identifier of the tag according to the class of the tag, for example, numbers 1 to N may be used to indicate the level of the tag, where 1 to N have a logical relationship, the N level is greater than the N-1 level, the N-1 level is greater than the N-2 level, …, the 2 level is greater than the 1 level, the tag may be set to the identifier of the tag with the level of the tag, i.e. the tag 1"," tag 2"," tag 3"," tag "and" tag 4 "may be set to be the identifier of the subclasses of the tag: a1, A2, A3, A4, the identifier subcodes of "tag 5", "tag 6", "tag 7" may be set as: b1, B2 and B3. For loose independent tags, the numbers X plus the numbers 1 to M can be set, and the numbers 1 to M have no logic property and are only used for distinguishing different loose independent tags, and the identifier subcodes of the tag 8 can be set as follows: x1, the identifier subcode of "tag 9" may be set to: x2, if any other loose independent label, can be set as X3, X4 … …, the identification mode of the label identification subcode is not limited to the character, and the embodiment of the invention is not limited to the character. The correspondence between each tag and its identifier subcode (i.e., the correspondence between each tag and its tag signature) is shown in table 2:
TABLE 2
Label (Label) Identification subcode
Label 1 A1
Label 2 A2
Label 3 A3
Label 4 A4
Label 5 B1
Label 6 B2
Label 7 B3
Label 8 X1
Label 9 X2
…… ……
S22, determining the category to which each label belongs.
In specific implementation, the server determines the category of each tag according to the corresponding relation between the preset tag and the tag category, and determines whether each tag is a coupled tag belonging to the first category or a loose independent tag belonging to the second category.
S23, aiming at the labels belonging to the first category, determining the corresponding subclasses of the labels belonging to the first category according to the preset corresponding relations between the subclasses of the first category and the labels.
In specific implementation, aiming at the labels belonging to the first category, the server determines the corresponding subclasses of the labels belonging to the first category according to the preset corresponding relation between the subclasses of the first category and the labels. The example in the table continuation step S21, as shown in table 3, is a correspondence table of tag categories and tags:
TABLE 3 Table 3
As can be seen from table 3, the first class (coupling label) includes two classes, namely class a and class B, and the subclasses to which the labels "label 1", "label 2", "label 3" and "label 4" belonging to the first class belong are all class a, and the subclasses to which the labels "label 5", "label 6" and "label 7" belonging to the first class belong are all class B.
When the tag is to be cancelled, determining the subclass corresponding to the tag to be cancelled belonging to the first class according to the preset corresponding relation between the subclass of the first class and the tag aiming at the tag to be cancelled belonging to the first class.
When the tag is an effective tag, determining a subclass corresponding to the effective tag belonging to the first category according to a preset corresponding relation between the subclass of the first category and the tag aiming at the effective tag belonging to the first category.
S24, determining the grades of the labels belonging to the same subclass, and combining the identification subcodes of the labels belonging to the same subclass according to the order of the grades from high to low to generate subcode segments corresponding to the labels of all the subclasses.
When the labels are to-be-cancelled labels, determining the grades of the to-be-cancelled labels belonging to the same subclass, and combining the identification subcodes of the labels belonging to the same subclass according to the order of the grades from high to low to generate subcode sections corresponding to the labels of all the subclasses.
When the tags are effective tags, determining the grades of the effective tags belonging to the same subclass, and combining the identification subcodes of the effective tags belonging to the same subclass according to the order of the grades from high to low to generate subcode segments corresponding to the effective tags of each subclass.
Continuing the example above, assume that the user's tag stored in the tag table with the agent number "1000001" includes: "Label 1", "Label 2", "Label 3", "Label 5", "Label 6", "Label 8", "Label 9", the corresponding label states are respectively: "effective", "invalid", "effective", as shown in table 4:
TABLE 4 Table 4
Wherein the agent's valid tag comprises: "tag 1", "tag 2", "tag 3", "tag 5", "tag 8", "tag 9", assuming that the to-be-cancelled tag of the agent requesting includes: the label sub-codes of the effective labels and the label sub-codes to be cancelled are matched from the corresponding relation between the labels in the table 2 and the label sub-codes, wherein the label sub-codes of the label 1 are as follows: the identifier subcodes of A1 and tag 2 are: a2, the identifier subcode of "tag 3" is: the identifier subcodes of A3 and tag 5 are: b1, the identifier subcode of the "tag 8" is: x1, the identifier subcode of "tag 9" is: x2. Further, the categories described by the respective to-be-cancelled tags and the categories described by the respective valid tags are matched from table 3, and for the respective to-be-cancelled tags, "tag 1", "tag 3", "tag 5" belong to the first category tags: coupling tags, "tag 8" belongs to the second class of category tags: loose independent tags, "tag 1" and "tag 3" belong to the subclass of tags in the first class: class a, "tag 5" belongs to a subclass of the first class tag: the B type label 8 belongs to the X type, and the combination of the identification subcode of the label 1 to be cancelled and the identification subcode of the label 3 belonging to the A type label is that: A3A1 and A3A1 are subcode sections corresponding to the class A to-be-cancelled labels, and only one to-be-cancelled label belongs to the class B, namely 'label 5', and the generated subcode sections corresponding to the class B to-be-cancelled labels are as follows: B1. likewise, for each valid tag, "tag 1", "tag 2", "tag 3", "tag 5" belongs to a first class of tags: coupling tags, "tag 8", "tag 9" belong to the second class of tags: loose independent tags, "tag 1", "tag 2", and "tag 3" belong to the subclasses of tags in the first class: class a, "tag 5" belongs to a subclass of the first class tag: the B type, namely the label 8 and the label 9 belong to the X type, and the identifier subcodes of the effective label 1, the label 2 and the label 3 which belong to the A type are combined according to the order from high to low, and then the combination is as follows: the sub-code segments corresponding to the effective labels of the A class are A3A2A1 and A3A2A1, and the sub-code segments corresponding to the effective labels of the B class generated by the effective label 'label 5' of the B class are: B1.
And S25, splicing the subcode segments corresponding to the labels of the subclasses with the identification subcodes of the labels belonging to the second class, and generating the label identification codes.
In specific implementation, the server splices the subcode segment corresponding to the label of each subclass with the identification subcode of each label belonging to the second class to generate a label identification code.
It should be noted that, in the splicing, the arrangement order of each label belonging to the second category is not limited.
Specifically, when the tag is to be cancelled, splicing the subcode segment corresponding to the to-be-cancelled tag of each subclass with each identification subcode of the to-be-cancelled tag belonging to the second class, and generating the to-be-cancelled tag identification code.
Continuing the above example, after splicing the subcode segment corresponding to the to-be-cancelled label of class a, the subcode segment corresponding to the to-be-cancelled label of class B and the identifier subcode of the to-be-cancelled label belonging to the second class of the agent with the work number of 1000001, the method comprises the following steps: a3A1B1X1, A3A1B1X1 is the tag identification code to be cancelled.
And when the tag is an effective tag, splicing the subcode segment corresponding to the effective tag of each subclass with the identification subcode of each effective tag belonging to the second class to generate an effective tag identification code.
Continuing the above example, after splicing the subcode segment corresponding to the class a valid tag, the subcode segment corresponding to the class B valid tag, and the identifier subcode of the class B valid tag of the agent with the job number of 1000001, the method comprises the following steps: a3A2A1B1X 2, A3A2A1B1X 2 are valid tag identification codes.
In a specific implementation process, the method for transcoding the tag to be cancelled according to the flow shown in fig. 4, and generating the tag identification code to be cancelled may include the following steps:
s31, determining the identifier codes of the tags to be cancelled according to the corresponding relation between the preset tags and the identifier codes.
S32, determining the category to which each to-be-cancelled label belongs.
S33, aiming at the tags to be cancelled belonging to the first category, determining the corresponding sub-category of the tags to be cancelled belonging to the first category according to the preset corresponding relation between the sub-category of the first category and the tags.
S34, determining the grades of the tags to be cancelled belonging to the same subclass, and combining the identification subcodes of the tags to be cancelled belonging to the same subclass according to the order of the grades from high to low to generate the subcode segments corresponding to the tags to be cancelled of each subclass.
And S35, splicing the subcode segments corresponding to the to-be-cancelled labels of the subclasses with the identification subcodes of the to-be-cancelled labels belonging to the second class, and generating the to-be-cancelled label identification codes.
The implementation of steps S31 to S35 refers to the implementation of steps S21 to S25, and will not be described here.
In a specific implementation process, the effective tag is transcoded according to a flow shown in fig. 5, and an effective tag identification code is generated, which may include the following steps:
s41, determining the identifier sub-codes of each effective label according to the corresponding relation between the preset label and the identifier sub-codes.
S42, determining the category to which each valid label belongs.
S43, aiming at the effective label belonging to the first category, determining the subclass corresponding to the effective label belonging to the first category according to the preset corresponding relation between the subclass of the first category and the label.
S44, determining the grades of the effective labels belonging to the same subclass, and combining the identification subcodes of the effective labels belonging to the same subclass according to the order of the grades from high to low to generate subcode segments corresponding to the effective labels of all subclasses.
S45, splicing the subcode segments corresponding to the effective labels of the subclasses with the identification subcodes of the effective labels belonging to the second class, and generating effective label identification codes.
The implementation of step S41 to step S45 refers to the implementation of step S21 to step S25, and will not be described here.
S14, comparing the identification code to be cancelled with the effective identification code according to a preset identification code verification rule to obtain a legal identification code fragment to be cancelled.
In specific implementation, the server compares the identification code to be cancelled with the effective identification code according to a preset identification code verification rule to obtain a legal identification code sub-segment to be cancelled.
Specifically, comparing the tag identification code to be cancelled with the valid tag identification code according to the flow shown in fig. 6 to obtain a legal tag identification code fragment to be cancelled, which may include the following steps:
s51, respectively comparing the subcode sections corresponding to the to-be-cancelled labels belonging to the same subclass with the subcode sections corresponding to the effective labels, and identifying the identification subcodes of legal to-be-cancelled labels in the subcode sections corresponding to the to-be-cancelled labels.
In specific implementation, the server compares the subcode segment corresponding to the to-be-cancelled tag in the to-be-cancelled tag identification code belonging to the same subclass of the first class with the subcode segment corresponding to the effective tag in the effective tag identification code, and identifies the legal to-be-cancelled tag identification subcode in the subcode segment corresponding to the to-be-cancelled tag.
Specifically, for the subcode segment corresponding to the to-be-cancelled tag in the to-be-cancelled tag identification code belonging to any same subclass of the first class and the subcode segment corresponding to the valid tag in the valid tag identification code, identifying the legal to-be-cancelled tag identification subcode in the subcode segment corresponding to the to-be-cancelled tag according to the flow shown in fig. 7 may include the following steps:
s61, aiming at the subcode section corresponding to the to-be-cancelled label and the subcode section corresponding to the effective label, if the subcode section corresponding to the to-be-cancelled label is identical to the first N identification subcodes in the subcode section corresponding to the effective label, the first N identification subcodes are determined to be the legal identification subcodes of the subcode section corresponding to the to-be-cancelled label.
In specific implementation, for the sub-code segment corresponding to the to-be-cancelled tag in any sub-type to be cancelled tag identification code belonging to the first category and the sub-code segment corresponding to the effective tag in the effective tag identification code, successively judging whether each corresponding identification sub-code is identical from the first bit of the sub-code segment corresponding to the to-be-cancelled tag and the first bit of the sub-code segment corresponding to the effective tag, namely comparing step by step from the high-to-low level of the tag, when the sub-code segment corresponding to the to-be-cancelled tag is identical to the identification sub-code of the first bit of the sub-code segment corresponding to the effective tag, judging whether the sub-code segment corresponding to the to-be-cancelled tag is identical to the identification sub-code of the next bit of the sub-code segment corresponding to the effective tag, and when the sub-code segment corresponding to the to-be-cancelled tag is identical to the first N identification sub-codes in the sub-code segment corresponding to the effective tag, and the N+1th identification sub-codes are not identical, determining that the first N identification sub-codes are legal identification sub-codes of the to be-cancelled tag in the sub-code segment corresponding to the to be-cancelled tag.
And S62, when the fact that the sub-code segment corresponding to the to-be-cancelled label is different from the first identification sub-code in the sub-code segment corresponding to the effective label is determined, determining that the sub-code segment corresponding to the to-be-cancelled label does not contain the identification sub-code corresponding to the legal to-be-cancelled label.
In the specific implementation, if the subcode segment corresponding to the to-be-cancelled label is different from the first identifier subcode in the subcode segment corresponding to the valid label (i.e. the identifier subcode of the label with the highest grade), the judgment is not needed to be continued, and it is determined that the subcode segment corresponding to the to-be-cancelled label does not contain the identifier subcode corresponding to the legal to-be-cancelled label.
It should be noted that, in the above embodiment of the present invention, the verification rule is set based on the preset level logic relationship in the coupled tags, the tag at the highest level may be directly cancelled, if the tag at the lower level is to be cancelled, the tag at the higher level must be cancelled first, and if the tag at the higher level is not to be cancelled, the tag at the lower level cannot be cancelled. The arrangement of the hierarchical relationship of the coupling tags is not limited thereto, and the embodiment of the present invention is not limited thereto.
S52, comparing the identifier sub-code of the to-be-cancelled label belonging to the second category with the identifier sub-code of the effective label, and identifying the identifier sub-code of the legal to-be-cancelled label belonging to the second category.
In specific implementation, the server compares the identifier subcodes of the to-be-cancelled tags in the identifier codes of the to-be-cancelled tags belonging to the second category with the identifier subcodes of the effective tags in the identifier codes of the effective tags, and identifies the identifier subcodes of the legal to-be-cancelled tags belonging to the second category in the identifier codes of the to-be-cancelled tags.
Specifically, the identifier sub-code of the to-be-cancelled tag belonging to the second category in the to-be-cancelled tag identifier code and the identifier sub-code of the effective tag belonging to the second category in the effective tag identifier code are determined to be the identifier sub-code of the legal to-be-cancelled tag belonging to the second category in the to-be-cancelled tag identifier code.
And S53, splicing the identified identification subcodes of the legal to-be-cancelled labels in the subcode sections corresponding to the to-be-cancelled labels belonging to the sub-classes with the identification subcodes of the legal to-be-cancelled labels belonging to the second class to generate legal to-be-cancelled label identification code fragments.
In specific implementation, the server splices the identified legal identifier subcodes of the legal tags to be cancelled in the subcode segments corresponding to the tags to be cancelled in the identifier codes of the tags to be cancelled belonging to each subclass of the first class with the legal identifier subcodes of the tags to be cancelled belonging to the second class in the identifier codes of the tags to be cancelled, and generates legal tag identifier sub-fragments to be cancelled.
Preferably, the identification sub-code corresponding to the legal tag to be cancelled in the sub-code segment corresponding to the tag to be cancelled in the identification code of each sub-type to be cancelled belonging to the first category is performed in parallel with the identification sub-code identifying the legal tag to be cancelled belonging to the second category in the identification code of the tag to be cancelled, so that the processing speed can be further improved.
Still continuing with the above example, as shown in fig. 8, which is a process diagram of comparing the identification code of the to-be-cancelled tag corresponding to the agent with the work number 1000001 with the identification code of the effective tag, serial judgment is performed respectively when comparing the identification code of the to-be-cancelled tag corresponding to the sub-code segment corresponding to the effective tag in each sub-class belonging to the first class in the to-be-cancelled tag identification code A3A1B1X 2 with the effective tag identification code A3A2 A1X 2, and parallel judgment is performed when comparing the identification sub-code of the to-be-cancelled tag corresponding to the effective tag belonging to the second class with the identification sub-code segment corresponding to the effective tag in the first class, as shown in fig. 8, comparing A3A1 in the identification code of the to-be-cancelled label with A3A2A1 in the identification code of the effective label, firstly judging whether the first identification subcode is the same, continuously judging whether the second identification subcode is the same as A3 because the first identification subcode of the A3A1 and the A3A2A1 is the A3, the second identification subcode of the A3A1 is the A1, the second identification subcode of the A3A2A1 is the A2, the second identification subcodes of the A3 and the A2A1 are different, outputting the first identification subcode A3 and the A3 as the legal identification subcode of the to-be-cancelled label in the subcode section corresponding to the to-be-cancelled label belonging to the A class, and similarly, comparing and judging the B1 in the effective label identification code with respect to the B class label, wherein the first identification subcode is the same, outputting the B1 and the B1 as the legal identification subcode of the to be-cancelled label in the subcode section corresponding to the B class label, for the X-type tag, comparing and judging X1 in the tag identification code to be cancelled and X1X2 in the effective tag identification code, outputting X1 as the tag identification code to be cancelled is contained in X1X2 in the effective tag identification code, and splicing all output results to obtain a legal tag identification code fragment to be cancelled, wherein X1 is the identification sub-code of the legal tag to be cancelled belonging to the second category: a3B1X1.
S15, converting the legal to-be-cancelled identification code fragments into corresponding legal to-be-cancelled labels.
In specific implementation, each identifier sub-code in the legal identifier sub-code fragment to be cancelled is converted into a corresponding label according to the corresponding relation between the label and the identifier sub-code, and the label is recorded as the legal identifier sub-code.
Continuing the above example, each identifier subcode in the legal identifier sub-segment A3B1X1 to be cancelled is converted into a corresponding label according to the corresponding relationship between the label and the identifier subcode in table 2, which is respectively: the "label 3", "label 5", "label 8", "label 3", "label 5" and "label 8" are legal labels to be cancelled.
S16, setting the legal label to be cancelled as a failure state, and updating the label table.
In specific implementation, the server sets the legal label to be cancelled in a label table as a failure state, and updates the label table.
In the above example, the tag states of "tag 3", "tag 5", and "tag 8" in table 4 are changed to invalid, table 4 is updated, and the updated tag table is shown in table 5:
TABLE 5
In specific implementation, a tag management APP (Application) may be set on the client to manage the user tag.
Continuing the above example, as shown in FIG. 9, for the agent identity tag management APP tag query interface developed by the insurance company, the manager inputs the agent number: 1000001, the query result shows the agent number and the effective identity tag of the agent: "Label 1", "Label 2", "Label 3", "Label 5", "Label 8", "Label 9", the manager selects the Label to cancel: "Label 1", "Label 3", "Label 5", "Label 8", as shown in FIG. 10, may but is not limited to select a to-be-cancelled label by a hook method, and after the label is modified, the manager again queries the valid label of the agent, as shown in FIG. 11, the valid identity label of the agent displayed in the label query interface is: "Label 1", "Label 2", "Label 9".
In the tag processing method provided by the embodiment of the invention, a server receives a tag update request which is sent by a client and carries a tag to be cancelled and a user ID (Identity Document, identity mark) of a user, acquires an effective tag corresponding to the user ID from a stored tag table, transcodes the tag to be cancelled according to a preset transcoding rule, generates a tag identification code to be cancelled, transcodes the effective tag to generate an effective tag identification code, compares the generated tag identification code to be cancelled with the effective tag identification code according to a preset identification code verification rule to obtain a legal tag identification code fragment to be cancelled, further converts the legal tag identification code fragment to a corresponding legal tag to be cancelled, sets the legal tag to be cancelled as a failure state, and updates the tag table compared with the prior art, in the tag processing method provided by the embodiment of the invention, when the tags are cancelled, a transcoding rule is set to transcode all the tags to be cancelled of the user to generate a tag identification code to be cancelled, and transcode all the effective tags of the user to generate an effective tag identification code, and the tag identification code to be cancelled and the effective tag identification code are compared according to the set identification code checking rule to obtain legal tag identification code sub-fragments to be cancelled, and then the legal tag identification code sub-fragments are converted into corresponding legal tag to be cancelled, so that all the legal cancelled tags can be obtained, and then, all the legal cancelled tags are directly set as invalid without judging whether the tags to be cancelled are legal tag cancellation or not, thereby improving the tag processing speed and relieving the pressure of a server, database resources are saved.
Based on the same inventive concept, the embodiment of the invention also provides a label processing device, and because the principle of solving the problem of the label processing device is similar to that of the label processing method, the implementation of the device can be referred to the implementation of the method, and the repetition is omitted.
As shown in fig. 12, which is a schematic structural diagram of a tag processing apparatus according to an embodiment of the present invention, the tag processing apparatus may include:
a receiving unit 71, configured to receive a tag cancellation request sent by a client, where the tag cancellation request carries a tag to be cancelled of a user and a user identity ID, and the tag is used to characterize an identity attribute of the user;
an obtaining unit 72, configured to obtain a valid tag corresponding to the user ID from a stored tag table, where a correspondence relationship between the user ID and the tag and status information of the marked tag is stored;
a transcoding unit 73, configured to transcode the to-be-cancelled tag according to a preset transcoding rule, generate an identification code of the to-be-cancelled tag, and transcode the valid tag, generate a valid tag identification code;
a comparison unit 74, configured to compare the tag identifier to be cancelled with the valid tag identifier according to a preset identifier verification rule, so as to obtain a legal tag identifier fragment to be cancelled;
A tag conversion unit 75, configured to convert the legal tag fragment to be cancelled into a corresponding legal tag to be cancelled;
and a processing unit 76, configured to set the legal tag to be cancelled to a disabled state, and update the tag table.
Preferably, the transcoding unit 73 is specifically configured to determine the identifier codes of the tags to be cancelled according to the corresponding relationship between the preset tag and the identifier codes; determining the category to which each label to be cancelled belongs; aiming at the tags to be cancelled belonging to the first category, determining the corresponding subclasses of the tags to be cancelled belonging to the first category according to the preset corresponding relations between the subclasses of the first category and the tags; determining the grades of the tags to be cancelled belonging to the same subclass, and combining the identification subcodes of the tags to be cancelled belonging to the same subclass according to the order of the grades from high to low to generate subcode segments corresponding to the tags to be cancelled of each subclass; and splicing the subcode segments corresponding to the to-be-cancelled labels of the subclasses with the identification subcodes of the to-be-cancelled labels belonging to the second class, and generating the to-be-cancelled label identification codes.
Preferably, the transcoding unit 73 is specifically configured to determine the identifier codes of each valid tag according to the corresponding relationship between the preset tag and the identifier codes; determining the category to which each valid tag belongs; aiming at the effective tags belonging to the first category, determining the subclasses corresponding to the effective tags belonging to the first category according to the preset corresponding relation between the subclasses of the first category and the tags; determining the grades of the effective labels belonging to the same subclass, and combining the identification subcodes of the effective labels belonging to the same subclass according to the order of the grades from high to low to generate subcode segments corresponding to the effective labels of all subclasses; and splicing the subcode segments corresponding to the effective labels of the subclasses with the identification subcodes of the effective labels belonging to the second class, so as to generate effective label identification codes.
Preferably, the comparing unit 74 is specifically configured to compare the subcode segments corresponding to the to-be-cancelled tags belonging to the same subclass with the subcode segments corresponding to the valid tags, respectively, and identify the identifier subcodes of the legal to-be-cancelled tags in the subcode segments corresponding to the to-be-cancelled tags; comparing the identifier subcodes of the to-be-cancelled labels belonging to the second category with the identifier subcodes of the effective labels, and identifying the identifier subcodes of the legal to-be-cancelled labels belonging to the second category; and splicing the identified identification subcodes of the legal to-be-cancelled labels in the subcode sections corresponding to the to-be-cancelled labels belonging to the sub-classes with the identification subcodes of the legal to-be-cancelled labels belonging to the second class to generate legal to-be-cancelled label identification code fragments.
Preferably, the comparing unit 74 is specifically configured to determine, for a subcode segment corresponding to a to-be-cancelled tag and a subcode segment corresponding to an effective tag that belong to any same subclass, that the first N identifier subcodes are legal identifier subcodes of the subcode segment corresponding to the to-be-cancelled tag when determining that the subcode segment corresponding to the to-be-cancelled tag and the first N identifier subcodes in the subcode segment corresponding to the effective tag are identical; when the sub-code segment corresponding to the to-be-cancelled label is determined to be different from the first identification sub-code in the sub-code segment corresponding to the effective label, determining that the sub-code segment corresponding to the to-be-cancelled label does not contain the identification sub-code corresponding to the legal to-be-cancelled label.
Preferably, the comparing unit 74 is specifically configured to determine, as the identifier sub-code of the legal tag to be cancelled that belongs to the second category in the tag to be cancelled identifier code, the identifier sub-code of the tag to be cancelled that belongs to the second category and the identifier sub-code of the valid tag that belongs to the second category.
Preferably, the identification of the identifier sub-code corresponding to the legal tag to be cancelled in the sub-code segment corresponding to the legal tag to be cancelled belonging to each sub-class is performed in parallel with the identification of the identifier sub-code of the legal tag to be cancelled belonging to the second class in the identifier code of the tag to be cancelled.
Based on the same technical concept, the embodiment of the present invention further provides an electronic device 800, referring to fig. 13, where the electronic device 800 is configured to implement the tag processing method described in the foregoing method embodiment, and the electronic device 800 of this embodiment may include: a memory 801, a processor 802, and a computer program, such as a tag processing program, stored in the memory and executable on the processor. The steps of the above-described respective tag processing method embodiments are implemented when the processor executes the computer program, for example, step S11 shown in fig. 1. Alternatively, the processor, when executing the computer program, performs the functions of the modules/units of the apparatus embodiments described above, e.g. 71.
The specific connection medium between the memory 801 and the processor 802 is not limited in the embodiment of the present application. In the embodiment of the present application, the memory 801 and the processor 802 are connected through the bus 803 in fig. 13, the bus 803 is shown with a thick line in fig. 13, and the connection manner between other components is only schematically illustrated, but not limited to. The bus 803 may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in fig. 13, but not only one bus or one type of bus.
The memory 801 may be a volatile memory (RAM) such as a random-access memory (RAM); the memory 801 may also be a nonvolatile memory (non-volatile memory), such as a read-only memory, a flash memory (flash memory), a Hard Disk Drive (HDD) or a Solid State Drive (SSD), or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited thereto. The memory 801 may be a combination of the above memories.
A processor 802, configured to implement a tag processing method as shown in fig. 1, including:
the processor 802 is configured to invoke a computer program stored in the memory 801 to execute step S11 shown in fig. 1, receive a tag update request sent by a client, where the tag update request carries a tag to be cancelled and a user ID of the user, step S12 obtain an effective tag corresponding to the user ID from a stored tag table, step S13 respectively transcode the tag to be cancelled according to a preset transcoding rule, generate a tag identification code to be cancelled, transcode the effective tag, generate an effective tag identification code, step S14 compare the tag identification code to be cancelled with the effective tag identification code according to a preset identification code verification rule, obtain a legal tag identification sub-fragment to be cancelled, step S15 convert the legal tag identification sub-fragment to a corresponding legal tag to be cancelled, and step S16 place the legal tag to be cancelled into a failure state, and update the tag table.
The embodiment of the application also provides a computer readable storage medium which stores computer executable instructions required to be executed by the processor and contains a program for executing the processor.
In some possible embodiments, each aspect of the tag processing method provided by the present invention may also be implemented in a form of a program product, where the program product includes program code, when the program product runs on an electronic device, the program code is configured to cause the electronic device to execute steps in the tag processing method according to various exemplary embodiments of the present invention described in the present specification, for example, the electronic device may execute step S11 shown in fig. 1, receive a tag update request sent by a client, where the tag update request carries a tag to be cancelled and a user ID of a user, step S12 obtains an effective tag corresponding to the user ID from a stored tag table, and in step S13, transcode the tag to be cancelled according to a preset transcoding rule, generate a tag identification code to be cancelled, and transcode the effective tag to generate an effective tag identification code, in step S14, compare the tag identification code to be cancelled with the effective tag identification code according to a preset code verification rule, obtain a tag to be cancelled, and in step S12, obtain a tag to be cancelled, and a valid tag to be cancelled, and a new tag to be cancelled, and a valid tag to be placed in step S.
It will be apparent to those skilled in the art that embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (devices), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present invention without departing from the spirit or scope of the invention. Thus, it is intended that the present invention also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (8)

1. A tag processing method, comprising:
receiving a tag update request sent by a client, wherein the tag update request carries a tag to be cancelled and a user ID of a user, and the tag is used for representing the identity attribute of the user;
acquiring an effective label corresponding to the user ID from a stored label table, wherein the label table stores the corresponding relation between the user ID and the label and the state information of the labeled label;
transcoding the target label according to a preset transcoding rule to generate a target label identification code, wherein the target label is the label to be canceled or the effective label, and the target label identification code is the label identification code to be canceled or the effective label identification code;
transcoding the target tag according to a preset transcoding rule to generate a target tag identification code, which specifically comprises the following steps: determining the identifier subcodes of all target tags according to the corresponding relation between the preset tags and the identifier subcodes, wherein the identifier subcodes are tag feature codes set for the tags, and the tag feature codes represent the tags; determining the category to which each target label belongs; aiming at a target label belonging to a first category, determining a sub-category corresponding to the target label belonging to the first category according to a preset corresponding relation between the sub-category of the first category and the label, wherein the first category represents a coupling label; determining the grades of the target labels belonging to the same subclass, and combining the identification subcodes of the target labels belonging to the same subclass according to the order of the grades from high to low to generate subcode segments corresponding to the target labels of all subclasses; splicing the subcode segments corresponding to the target labels of the subclasses with the identification subcodes of the target labels belonging to the second class to generate target label identification codes, wherein the second class represents loose independent labels;
Comparing the identification code to be cancelled with the effective label identification code according to a preset identification code verification rule to obtain a legal identification code fragment to be cancelled;
converting the legal to-be-cancelled identification code fragments into corresponding legal to-be-cancelled labels;
and setting the legal label to be cancelled as a failure state, and updating the label table.
2. The method of claim 1, wherein comparing the tag identification code to be cancelled with the valid tag identification code according to a preset identification code verification rule to obtain a legal tag identification code fragment to be cancelled, specifically comprising:
respectively comparing the subcode sections corresponding to the to-be-cancelled labels belonging to the same subclass with the subcode sections corresponding to the effective labels, and identifying the identification subcodes of legal to-be-cancelled labels in the subcode sections corresponding to the to-be-cancelled labels;
comparing the identifier subcodes of the to-be-cancelled labels belonging to the second category with the identifier subcodes of the effective labels, and identifying the identifier subcodes of the legal to-be-cancelled labels belonging to the second category;
and splicing the identified identification subcodes of the legal to-be-cancelled labels in the subcode sections corresponding to the to-be-cancelled labels belonging to the sub-classes with the identification subcodes of the legal to-be-cancelled labels belonging to the second class to generate legal to-be-cancelled label identification code fragments.
3. The method of claim 2, wherein the identifying the identifier subcodes of the legal tags to be cancelled in the subcode segments corresponding to the tags to be cancelled comprises comparing the subcode segments corresponding to the tags to be cancelled belonging to the same subclass with the subcode segments corresponding to the effective tags, respectively:
aiming at the subcode section corresponding to the to-be-cancelled label and the subcode section corresponding to the effective label, if the subcode section corresponding to the to-be-cancelled label is identical to the first N identification subcodes in the subcode section corresponding to the effective label, determining that the first N identification subcodes are the legal identification subcodes of the subcode section corresponding to the to-be-cancelled label;
when the sub-code segment corresponding to the to-be-cancelled label is determined to be different from the first identification sub-code in the sub-code segment corresponding to the effective label, determining that the sub-code segment corresponding to the to-be-cancelled label does not contain the identification sub-code corresponding to the legal to-be-cancelled label.
4. The method according to claim 2, wherein comparing the identifier subcodes of the tags to be cancelled belonging to the second category with the identifier subcodes of the valid tags, and identifying the identifier subcodes of the legal tags to be cancelled belonging to the second category, comprises in particular:
And determining the identifier sub-code of the to-be-cancelled label belonging to the second category and the identifier sub-code of the valid label belonging to the second category as the identifier sub-code of the legal to-be-cancelled label belonging to the second category in the identifier sub-code of the to-be-cancelled label.
5. The method of claim 2, wherein identifying the identification subcodes corresponding to legal tags to be cancelled in the subcode segments corresponding to the tags to be cancelled belonging to each subclass is performed in parallel with identifying the identification subcodes of legal tags to be cancelled belonging to the second class in the identification code of the tags to be cancelled.
6. A label processing apparatus, comprising:
the receiving unit is used for receiving a tag canceling request sent by the client, wherein the tag canceling request carries a tag to be canceled of a user and a user ID, and the tag is used for representing the identity attribute of the user;
an obtaining unit, configured to obtain an effective tag corresponding to the user ID from a stored tag table, where a correspondence between the user ID and the tag and status information of the marked tag is stored in the tag table;
the transcoding unit is used for transcoding the target label according to a preset transcoding rule to generate a target label identification code, wherein the target label is the label to be canceled or the effective label, and the target label identification code is the label identification code to be canceled or the effective label identification code;
The transcoding unit is specifically configured to determine, according to a corresponding relationship between a preset tag and a identifier subcode, the identifier subcode of each target tag, where the identifier subcode is a tag feature code set for the tag, and the tag feature code represents the tag; determining the category to which each target label belongs; aiming at a target label belonging to a first category, determining a sub-category corresponding to the target label belonging to the first category according to a preset corresponding relation between the sub-category of the first category and the label, wherein the first category represents a coupling label; determining the grades of the target labels belonging to the same subclass, and combining the identification subcodes of the target labels belonging to the same subclass according to the order of the grades from high to low to generate subcode segments corresponding to the target labels of all subclasses; splicing the subcode segments corresponding to the target labels of the subclasses with the identification subcodes of the target labels belonging to the second class to generate target label identification codes, wherein the second class represents loose independent labels;
the comparison unit is used for comparing the identification code of the label to be cancelled with the identification code of the effective label according to a preset identification code verification rule to obtain a legal identification code fragment of the label to be cancelled;
The tag conversion unit is used for converting the legal identifier code fragment to be cancelled into a corresponding legal tag to be cancelled;
and the processing unit is used for setting the legal tag to be cancelled as a failure state and updating the tag table.
7. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the tag processing method of any one of claims 1-5 when the program is executed by the processor.
8. A computer-readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the steps of the tag processing method according to any one of claims 1 to 5.
CN202011109548.1A 2020-10-16 2020-10-16 Label processing method and device, electronic equipment and storage medium Active CN112163050B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011109548.1A CN112163050B (en) 2020-10-16 2020-10-16 Label processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011109548.1A CN112163050B (en) 2020-10-16 2020-10-16 Label processing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112163050A CN112163050A (en) 2021-01-01
CN112163050B true CN112163050B (en) 2023-11-07

Family

ID=73867556

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011109548.1A Active CN112163050B (en) 2020-10-16 2020-10-16 Label processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112163050B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101179519A (en) * 2006-12-22 2008-05-14 腾讯科技(深圳)有限公司 Method and system of self-defining cluster label
CN107045447A (en) * 2016-02-05 2017-08-15 阿里巴巴集团控股有限公司 The tag displaying method and device of a kind of data object
WO2019019636A1 (en) * 2017-07-25 2019-01-31 平安科技(深圳)有限公司 User identification method, electronic device, and computer readable storage medium
CN109308603A (en) * 2018-08-21 2019-02-05 中国平安人寿保险股份有限公司 Manage method, apparatus, computer equipment and the storage medium of label
CN109359171A (en) * 2018-08-21 2019-02-19 中国平安人寿保险股份有限公司 Management-control method, device, computer equipment and the storage medium of label
CN110597865A (en) * 2019-09-02 2019-12-20 深圳前海微众银行股份有限公司 Method and device for processing user label, computing equipment and storage medium
CN111158558A (en) * 2019-12-23 2020-05-15 维沃移动通信有限公司 Label adding method and electronic equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101179519A (en) * 2006-12-22 2008-05-14 腾讯科技(深圳)有限公司 Method and system of self-defining cluster label
CN107045447A (en) * 2016-02-05 2017-08-15 阿里巴巴集团控股有限公司 The tag displaying method and device of a kind of data object
WO2019019636A1 (en) * 2017-07-25 2019-01-31 平安科技(深圳)有限公司 User identification method, electronic device, and computer readable storage medium
CN109308603A (en) * 2018-08-21 2019-02-05 中国平安人寿保险股份有限公司 Manage method, apparatus, computer equipment and the storage medium of label
CN109359171A (en) * 2018-08-21 2019-02-19 中国平安人寿保险股份有限公司 Management-control method, device, computer equipment and the storage medium of label
CN110597865A (en) * 2019-09-02 2019-12-20 深圳前海微众银行股份有限公司 Method and device for processing user label, computing equipment and storage medium
CN111158558A (en) * 2019-12-23 2020-05-15 维沃移动通信有限公司 Label adding method and electronic equipment

Also Published As

Publication number Publication date
CN112163050A (en) 2021-01-01

Similar Documents

Publication Publication Date Title
US7904366B2 (en) Method and system to determine resident qualifications
CN100383793C (en) Method and system for realizing update data in real time data bank
US11422795B2 (en) System and method for predicting the impact of source code modification based on historical source code modifications
US20090282487A1 (en) Method of Managing and Mitigating Security Risks Through Planning
US20030208362A1 (en) Integrated screening system and method for tenants and rental applicants
US20040261081A1 (en) Method and system for tracking kernel resource usage
CN113051229A (en) User data acquisition method, device, terminal and readable storage medium
CN112163050B (en) Label processing method and device, electronic equipment and storage medium
CN112037070B (en) Flexible index configuration method and device
CN100527131C (en) Interdynamic access method and tool of IMS data base
CN112613567A (en) User label management method, system, device and storage medium
CN112911235A (en) Monitoring rule configuration method, device, server and storage medium
CN110489416B (en) Information storage method based on data processing and related equipment
CN113450085B (en) Service processing method, system, storage medium and electronic equipment
US8775217B1 (en) System and method for managing account processing
CN114205329A (en) Equipment coding method and device
CN111177501B (en) Label processing method, device and system
US7940895B2 (en) Methods and computer program products for tracking modifications in physical plant during maintenance of a communication network
CN116964985A (en) Notification control method, verification method, information processing device, and notification control program
CN118093608B (en) Data updating method for preventive inoculation system
US20040254951A1 (en) Asset composition
CN113743786B (en) Method, system, equipment and storage medium for allocating order numbers of multiple types of service lines
CN109583907A (en) A kind of checking method of electronic invoice, device, medium and electronic equipment
CN118277218A (en) Multi-service scene testing method and device
CN116842041A (en) Multi-source data processing method, system, equipment and storage medium

Legal Events

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