Disclosure of Invention
The present disclosure provides a group creation method, apparatus, electronic device, storage medium, and computer program product to at least solve the problem of poor maintainability of account groups in the related art. The technical scheme of the present disclosure is as follows:
according to a first aspect of embodiments of the present disclosure, there is provided a group creation method, applied to a first system, the method including:
Responding to an account group creation request of a client, sending a screening request carrying account screening rules to a second system, wherein the screening request is used for triggering the second system to screen a predetermined candidate account according to the account screening rules to obtain a target account set, and sending corresponding feedback information to the first system;
Creating index information corresponding to the target account set based on the feedback information, storing the index information into a database corresponding to the first system, sending a group creation instruction to the second system to trigger the second system to generate an account group corresponding to the target account set, and storing the account group into the database corresponding to the second system;
And after receiving a creation success message returned by the second system aiming at the group creation instruction, returning a request processing result to the client.
In an exemplary embodiment, if the account screening rule is a plurality of account screening rules for screening different target account sets from the candidate accounts, the creating index information corresponding to the target account sets based on the feedback information includes:
Generating an account set main table corresponding to the candidate account based on the feedback information, and generating a sub-table corresponding to each target account set for each target account set;
and generating index information corresponding to each target account set based on the account set main table and the sub-table corresponding to each target account set.
In an exemplary embodiment, the generating the sub-table corresponding to the target account set includes:
Acquiring set attribute information corresponding to the target account set, and acquiring associated account group information corresponding to suspicious account groups and/or recommended account groups associated with the target account set;
determining an account group identifier corresponding to an account group to be generated corresponding to the target account set;
and generating a sub-table corresponding to the target account set based on the set attribute information, the associated account group information, the account group identification and the account screening rule corresponding to the target account set.
In an exemplary embodiment, the feedback information includes the number of accounts corresponding to the target accounts in the target account set, and before creating the index information corresponding to the target account set based on the feedback information, the method further includes:
Acquiring the account number in the feedback information, and sending preview information for the account number to the client;
And if the confirmation information returned by the client side for the preview information is received, executing the step of creating index information corresponding to the target account set based on the feedback information.
In an exemplary embodiment, after said sending the group creation indication to the second system, further comprising:
Responding to the account group editing request of the client, and acquiring account group editing information;
The account group editing information is sent to the second system, so that the second system is triggered to update the account group stored in the database corresponding to the second system based on the account group editing information;
And if the updated information returned by the second system for the stored account group is received, updating the index information in the database corresponding to the first system.
In an exemplary embodiment, the index information includes an account group status, and the sending the account group edit information to the second system includes:
invoking a group update interface corresponding to the second system, sending the account group edit information to the second system, and adjusting the account group state in the index information to an update state;
the updating the index information includes:
And adjusting the account group state to be a time efficiency state.
In an exemplary embodiment, after said sending the group creation indication to the second system, further comprising:
The method comprises the steps of receiving group updating information sent by a second system, wherein the group updating information corresponds to an updated target account set, and the updated target account set is obtained by screening a current candidate account by the second system according to a preset time interval and based on the account screening rule;
updating the index information based on the group update information.
According to a second aspect of embodiments of the present disclosure, there is provided a group creation method applied to a second system, the method including:
The method comprises the steps of receiving a screening request, wherein the screening request is sent to a second system after a first system responds to an account group creation request sent by a client, and the screening request carries account screening rules;
Screening a predetermined candidate account according to the account screening rule to obtain a target account set, sending feedback information to the first system to trigger the first system to create index information corresponding to the target account set based on the feedback information, and sending a group creation instruction to the second system;
After receiving the group creation instruction, generating an account group corresponding to the target account set, storing the account group into a database corresponding to the second system, and returning a creation success message to the first system to trigger the first system to return a request processing result to the client, wherein the group creation instruction is sent to the second system after the first system stores the index information into the database corresponding to the first system.
In an exemplary embodiment, after said returning a create success message to said first system, further comprising:
receiving account group editing information sent by the first system, and updating the account group stored in a database corresponding to the second system based on the account group editing information, wherein the account group editing information is acquired by the first system in response to an account group editing request of the client;
And acquiring updated information of the stored account group, and sending the updated information to the first system to trigger the first system to update the index information.
In an exemplary embodiment, after said returning a create success message to said first system, further comprising:
Screening candidate accounts in the current candidate account set based on the account screening rule according to a preset time interval to obtain an updated target account set;
And acquiring group update information corresponding to the updated target account set, and sending the group update information to the first system to trigger the first system to update the index information based on the group update information.
According to a third aspect of embodiments of the present disclosure, there is provided a group creation device applied to a first system, the device comprising:
The request receiving unit is configured to execute an account group creation request responding to the client, send a screening request carrying account screening rules to a second system, and the screening request is used for triggering the second system to screen a predetermined candidate account according to the account screening rules to obtain a target account set and send corresponding feedback information to the first system;
An index information creation unit configured to execute creating index information corresponding to the target account set based on the feedback information, store the index information in a database corresponding to the first system, and send a group creation instruction to the second system, so as to trigger the second system to generate an account group corresponding to the target account set, and store the account group in the database corresponding to the second system;
And the processing result returning unit is configured to return a request processing result to the client after receiving a creation success message returned by the second system for the group creation instruction.
In an exemplary embodiment, if the account screening rule is a plurality of account screening rules for screening different target account sets from the candidate accounts, the index information creating unit includes:
the data table creation module is configured to execute the generation of an account set main table corresponding to the candidate account based on the feedback information, and generate a sub-table corresponding to each target account set;
And the index information generation module is configured to execute the generation of index information corresponding to each target account set based on the account set main table and the sub-table corresponding to each target account set.
In an exemplary embodiment, the data table creation module is configured to perform:
Acquiring set attribute information corresponding to the target account set, and acquiring associated account group information corresponding to suspicious account groups and/or recommended account groups associated with the target account set;
determining an account group identifier corresponding to an account group to be generated corresponding to the target account set;
and generating a sub-table corresponding to the target account set based on the set attribute information, the associated account group information, the account group identification and the account screening rule corresponding to the target account set.
In an exemplary embodiment, the feedback information includes an account number corresponding to a target account in the target account set, and the apparatus further includes:
a preview information generating unit configured to perform acquisition of the account number in the feedback information and send preview information for the account number to the client;
And the confirmation information receiving unit is configured to execute the step of creating index information corresponding to the target account set based on the feedback information if the confirmation information returned by the client side for the preview information is received.
In an exemplary embodiment, the apparatus further comprises:
An account group editing information acquisition unit configured to perform acquisition of account group editing information in response to an account group editing request of the client;
An account group editing information sending unit configured to send the account group editing information to the second system, so as to trigger the second system to update the account group stored in the database corresponding to the second system based on the account group editing information;
and the first index information updating unit is configured to execute updating of the index information in the database corresponding to the first system if the updated information returned by the second system for the stored account group is received.
In an exemplary embodiment, the index information includes an account group status, and the account group edit information transmitting unit is configured to perform:
invoking a group update interface corresponding to the second system, sending the account group edit information to the second system, and adjusting the account group state in the index information to an update state;
the first index information updating unit is configured to perform:
And adjusting the account group state to be a time efficiency state.
In an exemplary embodiment, the apparatus further comprises:
The system comprises a group update information receiving unit, a target account group and a user account selection unit, wherein the group update information receiving unit is configured to receive group update information sent by the second system, the group update information corresponds to an updated target account set, and the updated target account set is obtained by screening current candidate accounts by the second system according to a preset time interval and based on the account screening rule;
and a second index information updating unit configured to perform updating of the index information based on the group update information.
According to a fourth aspect of embodiments of the present disclosure, there is provided a group creation device applied to a second system, the device comprising:
The screening request is sent to the second system after responding to the account group creation request sent by the client, and the screening request carries account screening rules;
the account screening unit is configured to perform screening on a predetermined candidate account according to the account screening rule to obtain a target account set, and send feedback information to the first system so as to trigger the first system to create index information corresponding to the target account set based on the feedback information, and send a group creation instruction to the second system;
The group creation unit is configured to generate an account group corresponding to the target account set after receiving the group creation instruction, store the account group into a database corresponding to the second system, and return a creation success message to the first system so as to trigger the first system to return a request processing result to the client, wherein the group creation instruction is sent to the second system after the first system stores the index information into the database corresponding to the first system.
In an exemplary embodiment, the apparatus further comprises:
An account group editing information receiving unit configured to perform receiving account group editing information sent by the first system, and update an account group stored in a database corresponding to the second system based on the account group editing information;
and the updating message sending unit is configured to acquire updated information of the stored account group and send the updated information to the first system so as to trigger the first system to update the index information.
In an exemplary embodiment, the apparatus further comprises:
The account set updating unit is configured to execute screening of candidate accounts in the current candidate account set based on the account screening rule according to a preset time interval to obtain an updated target account set;
The group update information sending unit is configured to obtain the group update information corresponding to the updated target account set, and send the group update information to the first system so as to trigger the first system to update the index information based on the group update information.
According to a fifth aspect of embodiments of the present disclosure, there is provided an electronic device, comprising:
A processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement a group creation method as described in any of the above.
According to a sixth aspect of embodiments of the present disclosure, there is provided a computer readable storage medium, which when executed by a processor of an electronic device, causes the electronic device to perform a group creation method as described in any one of the above.
According to a seventh aspect of embodiments of the present disclosure, there is provided a computer program product comprising instructions therein, which when executed by a processor of an electronic device, enable the electronic device to perform a group creation method as described in any one of the above.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
In the embodiment of the disclosure, when an account is selected in a circle, the index information of the account group and the account group are stored in a database, so that service call and data query of subsequent group selection are split into different systems, when a call request for the created account group is received, the first system responds, and based on the index information, the second system is triggered to query the corresponding account group, the data processing pressure and the coupling of a single system are reduced, and the maintainability of the system is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Detailed Description
In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the foregoing figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the disclosure described herein may be capable of operation in sequences other than those illustrated or described herein. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
It should be further noted that, the user information (including, but not limited to, user equipment information, user personal information, etc.) and the data (including, but not limited to, data for presentation, analyzed data, etc.) related to the present disclosure are information and data authorized by the user or sufficiently authorized by each party.
The group creation method provided by the present disclosure may be applied to an application environment as shown in fig. 1. In the application environment, the client 110, the first system 120 and the second system 130 are included, the client 110 can communicate with the first system 120 through a network, the first system 120 can communicate with the second system 130 through a network, the first system 120 and the second system 130 respectively have corresponding databases, and the databases can be respectively integrated on the first system 120 and the second system 130 or can be placed on the cloud. The client 110 may be deployed on a terminal device, which may be, but is not limited to, various personal computers, notebook computers, smartphones, tablet computers, internet of things devices, and portable wearable devices. The first system 120 and the second system 130 may be implemented by separate servers or a server cluster composed of a plurality of servers.
Fig. 2 is a flowchart illustrating a group creation method according to an exemplary embodiment, and as illustrated in fig. 2, the method is applied to the first system 120 for illustration, and may include the following steps.
In step S210, in response to the account group creation request of the client, a screening request carrying an account screening rule is sent to the second system, where the screening request is used to trigger the second system to screen a predetermined candidate account according to the account screening rule, obtain a target account set, and send corresponding feedback information to the first system.
As an example, the account group to be created may be an account group corresponding to the resource to be released, and each target account in the account group to be created is a release object corresponding to the resource to be released, for example, when the corresponding resource is released for a novice merchant, the target account in the account group to be created may be a novice merchant account that satisfies the account screening rule.
The candidate account may be, for example, any of a live user account, a merchant account, or a buyer account.
In practical applications, a user may send an account group creation request to a first system through a client. When the group is created, the user can specify the corresponding account screening rule, and after the client sends an account group creation request containing the account screening rule to the first system, the first system can acquire the account screening rule.
After the account screening rules are obtained, the first system may send a screening request carrying the account screening rules to the second system. After receiving the screening request, the second system can screen the predetermined candidate accounts according to the account screening rules, and determine a target account set based on the target accounts obtained by screening, so that feedback information can be sent to the first system according to the current target account set.
Specifically, the account screening rule may be obtained according to an account type tag combination, for example, the client may be provided with a plurality of account type tags, and generate a corresponding account screening rule according to the selected account type tag, or the account screening rule may be a candidate account set customized by the user.
The plurality of accounts may be pre-stored in other databases, which may be databases separate from the first and second systems, where the accounts may be candidate accounts, e.g., the current merchant accounts on the platform may be stored in the other databases and all merchant accounts may be candidate accounts. And the second system can screen out a limited account set from the currently given candidate accounts after acquiring the screening rule, and the limited account set is used as a target account set.
In step S220, based on the feedback information, index information corresponding to the target account set is created, the index information is stored in a database corresponding to the first system, and a group creation instruction is sent to the second system, so as to trigger the second system to generate an account group corresponding to the target account set, and the account group is stored in the database corresponding to the second system.
As an example, the index information may be a logical pointer to a target account set stored in the database or a database table corresponding to the target account set, through which the corresponding target account set may be quickly located in the database.
The feedback information may include information indicating whether the second system screens out target accounts that match the account screening rules and generates a set of target accounts.
In practical application, after receiving the feedback information, the first system can determine whether the second system screens out the target account matched with the account screening rule according to the feedback information, and generate a corresponding target account set. If the second system is determined to generate the target account set, the first system can create index information corresponding to the target account set, and store the index information into a database corresponding to the first system.
After the index information is successfully stored in the database of the first system, the first system may send a group creation indication to the second system. The second system receiving the group creation instruction may generate a corresponding account group according to the currently generated target account set, and store the account group in a database corresponding to the second system.
In step S230, after receiving the creation success message returned by the second system for the group creation instruction, the request processing result is returned to the client.
In a particular implementation, after the second system stores the account group to the database of the second system, a create success message may be returned to the first system for receipt of the group creation indication to characterize the second system to create and store the corresponding account group. After receiving the creation success message, it may be determined that the target account set has stored corresponding index information in the database of the first system, and at the same time, a corresponding account group is also stored in the second system, so that it may be determined that the account group has been created, the first system may generate a request processing result and return the request processing result to the client, and the request processing result may include information that the group creation is successful, so that it may be notified that the user related account group has been created.
In the group creation method, in response to an account group creation request of a client, a first system may send a screening request carrying an account screening rule to a second system, trigger the second system to screen candidate accounts according to the account screening rule to obtain a target account set, send corresponding feedback information to the first system, create index information corresponding to the target account set based on the feedback information, store the index information to a database corresponding to the first system, send a group creation instruction to the second system, trigger the second system to generate an account group corresponding to the target account set, store the account group to the database corresponding to the second system, and return a request processing result to the client after receiving a creation success message returned by the second system for the group creation instruction. In the method, when the account is selected in a circle, the index information of the account group and the account group are stored in a database, so that service call and data query of subsequent group selection are split into different systems, when a call request for the created account group is received, the first system responds, the second system is triggered to query the corresponding account group based on the index information, the data processing pressure and the coupling of a single system are reduced, and the maintainability of the system is improved.
In the related art, when the account is selected, the selected account group is stored in a database of the same system, and the system is used for responding to related requests for the account group selection or calling, processing the requests, and searching in the database of the system to find out the account group corresponding to the requests. In this manner, account groups are often screened based on only one account screening rule due to the storage pressure and access pressure of the database. However, with the advent of refined classification appeal of accounts, account groups are created based on only one account screening rule at a time, which does not enable users to screen different account groups in time.
Based on this, in an exemplary embodiment, the account screening rule may be a single account screening rule, or may be a plurality of account screening rules for screening different target account sets from the candidate accounts, and if the account screening rule is a plurality of account screening rules for screening different target account sets from the candidate accounts, in step S220, the creating index information corresponding to the target account sets based on the feedback information includes:
And generating index information corresponding to each target account set based on the account set main table and the sub-table corresponding to each target account set.
In a specific implementation, after feedback information is received, an account set main table corresponding to the current candidate account can be generated, in the account set main table, group creation requirement information related to an account group creation request can be recorded, and one or more target account sets which are triggered to be created by the current group creation request and are screened based on the current candidate account can be determined by querying the main table. For example, in a one-time service resource delivery process, a service party can deliver corresponding resources for accounts of different types, and then for the current service resource delivery, a corresponding account group creation request can be sent to a first system, and the first system is triggered to generate a corresponding account set main table.
Meanwhile, the first system can also generate a sub-table corresponding to each target account set based on the feedback information, namely, each sub-table corresponds to the target account set obtained through screening by the corresponding account screening rule.
After generating the main table and the sub-table corresponding to each target account set, the first system may generate index information corresponding to each target account combination based on the main table and the sub-table corresponding to each target account set.
In the method, index information corresponding to each target account set is generated by generating an account set main table corresponding to the candidate account and sub-tables corresponding to each target account set, and based on the account set main table and the sub-tables corresponding to each target account set, sub-table storage of the index information is realized, all the index information is prevented from being stored in the same data table, a basis is provided for subsequently improving data query efficiency of a first system and a second system, a plurality of sub-tables can be supported under each account set main table, a plurality of crowd sub-packages can be set under a crowd package constructed by a user, and fine account layering is realized.
In an exemplary embodiment, the obtaining the sub-table corresponding to the target account set may include the following steps:
the method comprises the steps of obtaining set attribute information corresponding to a target account set, obtaining suspicious account groups associated with the target account set and/or associated account group information corresponding to recommended account groups, determining account group identifiers corresponding to account groups to be generated and corresponding to the target account set, and generating a sub-table corresponding to the target account set based on the set attribute information, the associated account group information, the account group identifiers and account screening rules corresponding to the target account set.
As an example, the aggregate attribute information may record an aggregate attribute corresponding to the set of target accounts. By way of example, the collection attribute information may include at least one of a primary key identification, a target account collection Chinese name, target account collection description information, a target account collection type, an account type, a target account collection state, a primary key identification of a target account collection correspondence primary table, a target account number in the target account collection, a creator, an updater, a creation time, and an update time.
The suspicious account group may be a pre-partitioned group containing one or more suspicious accounts, such as a pre-generated blacklist. The recommended account group may be a pre-divided group containing one or more recommended accounts, such as a pre-set whitelist. Both suspicious account groups and recommended account groups may be stored in the form of files, such as blacklist files and whitelist files.
The suspicious account and the recommended account may be determined according to historical account behaviors of the respective accounts, such as whether to cheat to put resources, or the like, and of course, may be divided in advance by the user. The associated account group information may include a group identification or a group storage location corresponding to the suspicious account group and/or the recommended account group.
In a specific implementation, the first system may acquire set attribute information corresponding to the target account set, and may determine a suspicious account group or a recommended account group associated with the target account set, for example, the user may store the suspicious account group or the recommended account group in the second system in advance, acquire a corresponding group storage location, and add the group storage location to the account group creation request. After receiving the request, the first system can determine suspicious account groups or recommended account groups associated with the target account set, and obtain corresponding group storage positions as associated account group information.
And, the first system may further determine an account group identifier corresponding to an account group to be generated corresponding to the target account set in the second system, for example, after receiving the feedback information, the first system may configure, for one or more target account sets included in the feedback information, a corresponding account group identifier for each of the target account sets, where the account group identifier is also an identifier of a corresponding account group when the second system generates the corresponding account group.
After obtaining the account group identifier, the first system may generate a sub-table corresponding to the target account set according to the set attribute information, the account group identifier, and an account screening rule corresponding to the target account set.
For example, as shown in FIG. 3, a schematic diagram of the association of a main table with a sub-table is shown. The crowd pack can correspondingly comprise a plurality of crowd sub-packs, the crowd pack main table is used for describing the set attribute information of the set, the crowd sub-packs correspond to the target account set, and the sub-packs corresponding to the crowd sub-packs describe the set attribute information corresponding to the target account set. As shown in fig. 3, an account set main table and a sub-table may be generated according to the information shown in fig. 3, and the account set main table and the sub-table are associated, and index information of each target account set is obtained based on the associated account set main table and sub-table.
In the method, the sub-table corresponding to the target account set can be generated based on the set attribute information, the associated account group information, the account group identification and the account screening rules corresponding to the target account set, so that a foundation can be provided for the subsequent rapid positioning of the designated account group.
In one exemplary embodiment, the blacklist file and the whitelist file may be stored in a database of the second system, and the stored blacklist file or whitelist file may be associated with an account group in the database of the second system, as particularly shown in fig. 4. The black-and-white list file and the account group component list are stored and then associated, so that the system query efficiency can be effectively improved, meanwhile, combination circle selection can be realized, specifically, after a target account set is obtained according to an account screening rule, target accounts in the target account set can be adjusted by combining the black list file and the white list file, for example, target accounts matched with suspicious accounts in the black list file in the target account set are removed from the target account set, or recommended accounts which do not appear in the target account set in the white list file can be added into the target account set.
In an exemplary embodiment, the feedback information includes the number of accounts corresponding to the target accounts in the target account set, and in step S220, before creating the index information corresponding to the target account set based on the feedback information, the method further includes the following steps:
And if the confirmation information returned by the client side for the preview information is received, executing the step of creating index information corresponding to the target account set based on the feedback information.
In a specific implementation, after receiving the feedback information, the first system may read the account number from the feedback information to determine the account number corresponding to the target account in the generated target account set after screening according to the account screening rule.
After the account number is obtained, the first system may compare the currently obtained account number with a preset upper account number limit, where the preset upper account number limit may be a maximum account number corresponding to the resource to be released. If the account number is smaller than or equal to the upper limit of the account number, the first system can generate preview information of the account number and send the preview information to the client, and after the user checks and confirms the preview information through the client, the user can trigger the client to return confirmation information to the first system aiming at the preview information. After acquiring the confirmation information returned for the preview information, the first system may create index information corresponding to the target account set based on the feedback information.
In addition, if the number of the accounts is greater than the upper limit of the number of the accounts, the first system can generate corresponding prompt information and send the prompt information to the client to inform the user that the number of the accounts obtained through current screening exceeds the upper limit of the number of the accounts.
In the method, the account number in the feedback information is acquired, preview information for the account number is sent to the client, and under the condition that confirmation information returned by the client for the preview information is received, the step of creating index information corresponding to the target account set based on the feedback information is executed, and matching of the circling number and service release resources can be effectively improved by previewing the circling number of the accounts, and the circling capacity of the accounts is improved.
In one exemplary embodiment, after sending the group creation indication to the second system, further comprising:
The method comprises the steps of responding to an account group editing request of a client, obtaining account group editing information, sending the account group editing information to a second system to trigger the second system to update an account group stored in a database corresponding to the second system based on the account group editing information, and updating index information in the database corresponding to the first system if updated information returned by the second system for the stored account group is received.
As an example, the account group editing request may include at least one of updated account screening rules and updated candidate accounts.
In practical application, the client may send an account group editing request to the first system, and edit the account group that has been created currently. In response to receiving the account group edit request, the first system may obtain account group edit information.
In particular, the client may be provided with a plurality of account type labels, each account type label corresponding to an account type, which may include, for example, gender or number of account fans, etc., and may also include, when the candidate account is a merchant account, merchant account level, total amount of commodity transactions (Gross Merchandise Volume, GMV) over a preset time. The user may select a target account type tag from a plurality of account type tags provided by the client, and the client may generate a corresponding account screening rule according to the selected target account type tag, for example, the account screening rule may be "account fan number >20 ten thousand & & account is an account of an active user or a well-known user".
When the user needs to modify the account screening rule, the current target account type tag can be adjusted, for example, the target account type tag is deleted or a new target account type tag is added, and then the client can generate a new account screening rule according to the updated target account type tag, add the new account screening rule as account group editing information into an account group editing request and send the account group editing request to the first system.
After the account group editing information is obtained, the first system can send the account group editing information to the second system, and the second system can update the account group stored in the second system database based on the currently received account group editing information after receiving the account group editing information.
Specifically, when the account group editing information includes updated account screening rules, the second system may screen the predetermined candidate accounts according to the updated account screening rules to obtain an updated target account and a target account set, and further may update the account groups stored in the second system database according to the updated target account set.
After updating the stored account group, the second system may return corresponding updated information to the first group for the currently stored account group, so that the first system responds to the received updated information to update the index information stored in the first system database accordingly.
In the method, the first system sends the account group editing information to the second system by acquiring the account group editing information, triggers the second system to update the account group stored in the database corresponding to the second system based on the account group editing information, and if the updated information returned by the second system for the stored account group is received, updates the index information in the database corresponding to the first system, so that the created account group can be edited, and the flexibility of account circle selection is increased.
In an exemplary embodiment, the index information may include account group status, for example, crowd-pack status as shown in fig. 3, where the sending the account group edit information to the second system includes:
and calling a group update interface corresponding to the second system, sending account group editing information to the second system, and adjusting the account group state in the index information to be an update state.
As an example, an update state may refer to a state in an update in which the corresponding index information and account group are not currently editable or downloadable.
In a specific implementation, the second system may externally provide a group update interface, where the group update interface may be called by other devices, for example, may be called by a remote device, and after the interface is called, update the account group stored in the second system database according to the returned parameter.
In this embodiment, after the first system obtains the account group editing information, the first system may call a group update interface corresponding to the second system, and send the account group editing information to the second system through the group update interface. For example, the interface provided by the second system may be an RPC (Remote Procedure Call ) interface or gRPC interface, and the first system may send the account group edit information to the second system as parameters corresponding to the group update interface.
After sending the account group edit information, the first system may adjust the account group status in the index information to an updated status.
The updating the index information includes:
And adjusting the account group state to be a time efficiency state.
In practical application, after receiving updated information returned by the second system for the account group, the first system may adjust the account group status in the index information to a validity status, and in the validity status, may download or edit the corresponding index information or account group again.
In the method, the first system can send account group editing information to the second system in a calling interface mode, normal creation and calling of the account groups can be guaranteed when the first system and the second system are distributed, and the state of the account groups in the index information is adjusted in time before and after the second system updates the stored account groups, so that the index information stored in the first system database is matched with the account groups stored in the second system database, error modification or error calling of the account groups is avoided, and maintainability and reliability of the account groups are improved.
In one exemplary embodiment, after sending the group creation indication to the second system, further comprising:
The method comprises the steps of receiving group updating information sent by a second system, wherein the group updating information corresponds to an updated target account set, the updated target account set is obtained by screening current candidate accounts by the second system according to a preset time interval and based on the account screening rule, and the index information is updated based on the group updating information.
As an example, the group update information may indicate updated content of the account group stored in the second system database, e.g., the group update information may include the updated account group, the target account population corresponding to the updated account group.
In practical application, the second system may also screen and match the current candidate account according to a preset time interval. Specifically, the candidate accounts may be a plurality of accounts which are determined in advance, but with time, the account may be newly added or de-added, so that the candidate accounts may be changed.
Based on the above, after receiving the account screening rule sent by the first system, the second system can back up and store the account screening rule, read the stored account screening rule according to a preset time interval, and match the current candidate account based on the account screening rule, so as to obtain an updated target account and a target account set. After determining the updated target account set, the second system may generate corresponding group update information according to the updated target account set, and send the group update information to the first system. After the group update information is acquired, the first system may update the index information in the first system database based on the group update information.
In the method, the second system can update the stored account groups timely according to the preset time interval, so that the accuracy of the target accounts in the selected account groups can be guaranteed, meanwhile, the second system can timely inform the first system of updating the index information under the condition that the second system actively updates the account groups by sending the group update information to the first system, the index information stored in the first system database is guaranteed to be matched with the account groups stored in the second system database, and maintainability and reliability of the account groups are improved.
Fig. 5 is a flowchart illustrating a group creation method according to an exemplary embodiment, and as illustrated in fig. 5, the method is applied to the second system 130 for example, and may include the following steps.
In step S510, a screening request is received, where the screening request is sent to the second system after the first system responds to an account group creation request sent by the client, and the screening request carries an account screening rule.
In practical applications, a user may send an account group creation request to a first system through a client. When the group is created, the user can set the account screening rule and add the account screening rule to the account group creation request, and after the client sends the account group creation request to the first system, the first system can acquire the account screening rule from the request.
After determining the candidate account and obtaining the account screening rule, the first system may send a screening request carrying the account screening rule to the second system.
In step S520, candidate accounts are filtered according to the account screening rule to obtain a target account set, and feedback information is sent to the first system to trigger the first system to create index information corresponding to the target account set based on the feedback information, and a group creation instruction is sent to the second system.
After receiving the screening request, the second system can screen the predetermined candidate accounts according to the account screening rules, and determine a target account set based on the target accounts obtained by screening, so that feedback information can be sent to the first system according to the current target account set.
Specifically, the account screening rule may be obtained according to an account type tag combination, for example, the client may be provided with a plurality of account type tags, and generate a corresponding account screening rule according to the selected account type tag, or the account screening rule may be a candidate account set customized by the user. And the second system can screen out a limited account set from the currently given candidate accounts according to the account screening rule after acquiring the account screening rule, and the limited account set is used as a target account set.
In step S530, after receiving the group creation instruction, an account group corresponding to the target account set is generated, the account group is stored in a database corresponding to the second system, and a creation success message is returned to the first system to trigger the first system to return a request processing result to the client, where the group creation instruction is sent to the second system after the first system stores the index information in the database corresponding to the first system.
After receiving the feedback information, the first system can determine whether the second system screens out the target account matched with the account screening rule according to the feedback information, and generate a corresponding target account set. If the second system is determined to generate the target account set, the first system can create index information corresponding to the target account set, and store the index information into a database corresponding to the first system.
After the index information is successfully stored in the database of the first system, the first system can send a group creation instruction to the second system, and the second system which receives the group creation instruction can generate a corresponding account group according to the currently generated target account set and store the account group in the database corresponding to the second system.
And, after storing the account group to the database of the second system, the second system may return a create success message to the first system for receipt of the group creation indication to characterize the second system to create and store the corresponding account group. After receiving the creation success message, it may be determined that the target account set has stored corresponding index information in the database of the first system, and at the same time, a corresponding account group is also stored in the second system, so that it may be determined that the account group has been created, the first system may generate a request processing result and return the request processing result to the client, and the request processing result may include information that the group creation is successful, so that it may be notified that the user related account group has been created.
In the group creation method, the second system may receive a screening request, where the screening request is sent to the second system after the first system responds to an account group creation request sent by the client and carries an account screening rule, the second system may screen a predetermined candidate account according to the account screening rule to obtain a target account set, send feedback information to the first system, trigger the first system to create index information corresponding to the target account set based on the feedback information, send a group creation instruction to the second system, generate an account group corresponding to the target account set after receiving the group creation instruction, store the account group in a database corresponding to the second system, and return a creation success message to the first system to trigger the first system to return a request processing result to the client, where the account group creation request is sent to the second system after the first system stores the index information in the database corresponding to the first system. In the method, when the account is selected in a circle, the index information of the account group and the account group are stored in a database, so that service call and data query of subsequent group selection are split into different systems, when a call request for the created account group is received, the first system responds, the second system is triggered to query the corresponding account group based on the index information, the data processing pressure and the coupling of a single system are reduced, and the maintainability of the system is improved.
In one exemplary embodiment, after returning the creation success message to the first system, further comprising:
The method comprises the steps of receiving account group editing information sent by a first system, updating account groups stored in a database corresponding to a second system based on the account group editing information, acquiring the account group editing information for the first system in response to an account group editing request of a client, acquiring updated information for the stored account groups, and sending the updated information to the first system to trigger the first system to update index information.
In practical application, the client may send an account group editing request to the first system, and edit the account group that has been created currently. In response to receiving the account group edit request, the first system may obtain account group edit information.
After the account group editing information is obtained, the first system can send the account group editing information to the second system, and the second system can update the account group stored in the second system database based on the currently received account group editing information after receiving the account group editing information.
Specifically, when the account group editing information includes updated account screening rules, the second system may screen the predetermined candidate accounts according to the updated account screening rules to obtain an updated target account and a target account set, and further may update the account groups stored in the second system database according to the updated target account set.
After updating the stored account group, the second system may return corresponding updated information to the first group for the currently stored account group, so that the first system responds to the received updated information to update the index information stored in the first system database accordingly.
In the method, the first system sends the account group editing information to the second system by acquiring the account group editing information, triggers the second system to update the account group stored in the database corresponding to the second system based on the account group editing information, and if updated information returned by the second system for the stored account group is received, updates the index information, so that the created account group can be edited, and flexibility of account circle selection is improved.
In one exemplary embodiment, after returning the confirmation stored information to the first system, further comprising:
and acquiring group updating information corresponding to the updated target account set, and sending the group updating information to the first system to trigger the first system to update the index information based on the group updating information.
In practical application, the second system may also screen and match the current candidate account according to a preset time interval. Specifically, the candidate accounts may be a plurality of accounts which are determined in advance, but with time, the account may be newly added or de-added, so that the candidate accounts may be changed.
Based on the above, after receiving the account screening rule sent by the first system, the second system can back up and store the account screening rule, read the stored account screening rule according to a preset time interval, and match the current candidate account based on the account screening rule, so as to obtain an updated target account and a target account set. After determining the updated target account set, the second system may generate corresponding group update information according to the updated target account set, and send the group update information to the first system. After the group update information is acquired, the first system may update the index information in the first system database based on the group update information.
In the method, the second system can update the stored account groups timely according to the preset time interval, so that the accuracy of the target accounts in the selected account groups can be guaranteed, meanwhile, the second system can timely inform the first system of updating the index information under the condition that the second system actively updates the account groups by sending the group update information to the first system, the index information stored in the first system database is guaranteed to be matched with the account groups stored in the second system database, and maintainability and reliability of the account groups are improved.
In order that those skilled in the art will better understand the above steps, the embodiments of the present disclosure will be exemplified below with reference to some examples, but it should be understood that the embodiments of the present disclosure are not limited thereto.
In practical applications, as shown in fig. 6, the first system may call the second system in gRPC manner, for example, preview the result, add a blacklist file/whitelist file in the database of the second system, or obtain the account group stored in the second system. The second system may send a response Message to the first system through the Message Queue, for example, if the account group stored by the second system has an update, the second system may issue an MQ (Message Queue) Message to the first system, and notify the first system of the update of the account group through the MQ Message. Of course, the first system can also interact with the second system by sending the MQ message, and the first system and the second system can make service and data storage fully decoupled by the MQ, so that the readability and maintainability are improved, and the access efficiency of each service party is improved.
In order to enable those skilled in the art to better understand the data flow of the first system and the second system, the device architecture of the group creation method is described first. As shown in fig. 7, the first system and the second system may have corresponding API service layers (front-end oriented), aggregated service layers (business oriented), and domain service layers (data oriented), respectively.
For the first system, services may be provided to merchant operations users through clients (e.g., web front-ends). The user can upload and download files, preview, create and edit crowd packages, add a black-and-white list, manage logs and the like in crowd-sourced group-selection services provided by the first system.
In the first system, data generated by the domain service layer may be stored secondarily in a variety of ways. For example, the data processed in the uploading or downloading process of the file can be stored in a CDN (Content Delivery Network ), the data generated by previewing, creating and editing crowd packets and adding a black-and-white list can be stored in a message queue first and sent to a database of a second system through the message queue, in addition, the data in the MQ queue can be sent to the database of the first system, such as a MYSQL database, for primary storage, and the logs related in the log management process can be stored in es (Elasticsearch).
For the second system, the second system may perform a storage judgment process when the interface is called by providing an external interface RPC for performing ring selection of people in the domain service layer, obtain a corresponding ring selection group (i.e. a pre-created account group, a ring selection list, a ring selection result and a group package) from a database corresponding to the second system, or obtain a ring selection result and store the ring selection result in the database of the second system, where the database of the second system may be a MYSQL database.
The first system and the second system can be subjected to data association through the primary key ID, and the second system can be subjected to modular operation aiming at the primary key ID corresponding to the stored circle selection list, and the corresponding circle selection list is stored in the sub-table for use by the first system.
In one exemplary embodiment, as shown in fig. 8, a user may create a page through a group of clients, set account type tags or upload account collection files for configuration of account screening rules. After the click is submitted, a count interface provided by the first system can be called, the first system triggers the second system to calculate the number of the ring according to the account screening rule, and the second system returns the corresponding number of the ring to the first system. When the number of the voice circle selected persons exceeds the upper limit, a corresponding prompt can be returned to the group creation page, and if the number of the voice circle selected persons is smaller than or equal to the upper limit of the number of the persons, after the preview result is returned to the group creation page, the user operation is responded, and the create interface of the first system can be called.
In response to the call of the create interface, the first system may insert the group of crowd and the record of the sub-group of crowd (i.e., index information) in the database of the first system, and instruct the second system to create a corresponding group of crowd, and the second system may asynchronously generate and store the list of group selections (i.e., account group) in the database of the second system in response to the corresponding instruction. After receiving the creation success information returned by the second system, the first system can return a creation success message (i.e. request processing result) to the group creation page, and the group creation page can display newly-added and successful prompt information in the interface.
After the crowd-sourced creation is successful, the user can also edit the created crowd-sourced. Specifically, the group creation page may call the grpc interface of the first system to send account group editing information to the first system in response to a request to edit the crowd pack, the first system may call the grpc interface of the second system in response to the call of the interface, and after the call is successful, update the crowd pack record (i.e., update the index information) stored in the first system database, and the second system may update the stored crowd pack based on the account group editing information received from the first system.
In addition, after the second system automatically updates the crowd pack stored in the database according to the time interval, a change message aiming at the crowd pack state and the ring number of the user can be sent to the first system, and the first system can correspondingly update the corresponding database according to the message.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
It should be understood that the same/similar parts of the embodiments of the method described above in this specification may be referred to each other, and each embodiment focuses on differences from other embodiments, and references to descriptions of other method embodiments are only needed.
Based on the same inventive concept, the embodiments of the present disclosure also provide a group creation apparatus for implementing a group creation method referred to above.
Fig. 9 is a block diagram illustrating a group creation device 900 according to an example embodiment. Referring to fig. 9, the apparatus may be applied to a first system including a request receiving unit 901, an index information creating unit 902, and a processing result returning unit 903.
A request receiving unit 901, configured to perform an account group creation request in response to a client, and send a screening request carrying an account screening rule to a second system, where the screening request is used to trigger the second system to screen a predetermined candidate account according to the account screening rule, obtain a target account set, and send corresponding feedback information to the first system;
An index information creating unit 902 configured to execute creating index information corresponding to the target account set based on the feedback information, store the index information in a database corresponding to the first system, and send a group creation instruction to the second system, so as to trigger the second system to generate an account group corresponding to the target account set, and store the account group in the database corresponding to the second system;
And a processing result returning unit 903 configured to return a request processing result to the client after receiving a creation success message returned by the second system for the group creation instruction.
In an exemplary embodiment, if the account screening rule is a plurality of account screening rules for screening different target account sets from the candidate accounts, the index information creating unit includes:
the data table creation module is configured to execute the generation of an account set main table corresponding to the candidate account based on the feedback information, and generate a sub-table corresponding to each target account set;
And the index information generation module is configured to execute the generation of index information corresponding to each target account set based on the account set main table and the sub-table corresponding to each target account set.
In an exemplary embodiment, the data table creation module is configured to perform:
Acquiring set attribute information corresponding to the target account set, and acquiring associated account group information corresponding to suspicious account groups and/or recommended account groups associated with the target account set;
determining an account group identifier corresponding to an account group to be generated corresponding to the target account set;
and generating a sub-table corresponding to the target account set based on the set attribute information, the associated account group information, the account group identification and the account screening rule corresponding to the target account set.
In an exemplary embodiment, the feedback information includes an account number corresponding to a target account in the target account set, and the apparatus further includes:
a preview information generating unit configured to perform acquisition of the account number in the feedback information and send preview information for the account number to the client;
And the confirmation information receiving unit is configured to execute the step of creating index information corresponding to the target account set based on the feedback information if the confirmation information returned by the client side for the preview information is received.
In an exemplary embodiment, the apparatus further comprises:
An account group editing information acquisition unit configured to perform acquisition of account group editing information in response to an account group editing request of the client;
An account group editing information sending unit configured to send the account group editing information to the second system, so as to trigger the second system to update the account group stored in the database corresponding to the second system based on the account group editing information;
and the first index information updating unit is configured to execute updating of the index information in the database corresponding to the first system if the updated information returned by the second system for the stored account group is received.
In an exemplary embodiment, the index information includes an account group status, and the account group edit information transmitting unit is configured to perform:
invoking a group update interface corresponding to the second system, sending the account group edit information to the second system, and adjusting the account group state in the index information to an update state;
the first index information updating unit is configured to perform:
And adjusting the account group state to be a time efficiency state.
In an exemplary embodiment, the apparatus further comprises:
The system comprises a group update information receiving unit, a target account group and a user account selection unit, wherein the group update information receiving unit is configured to receive group update information sent by the second system, the group update information corresponds to an updated target account set, and the updated target account set is obtained by screening current candidate accounts by the second system according to a preset time interval and based on the account screening rule;
and a second index information updating unit configured to perform updating of the index information based on the group update information.
Fig. 10 is a block diagram of a group creation device 1000, shown in accordance with an exemplary embodiment. Referring to fig. 10, the apparatus may be applied to a second system including a screening request receiving unit 1001, an account screening unit 1002, and a group creating unit 1003.
A screening request receiving unit 1001 configured to execute receiving a screening request, where the screening request is sent to the second system after the first system responds to an account group creation request sent by the client, and the screening request carries an account screening rule;
An account screening unit 1002, configured to perform screening on a predetermined candidate account according to the account screening rule, obtain a target account set, and send feedback information to the first system, so as to trigger the first system to create index information corresponding to the target account set based on the feedback information, and send a group creation instruction to the second system;
The group creation unit 1003 is configured to generate an account group corresponding to the target account set after receiving the group creation instruction, store the account group in a database corresponding to the second system, and return a creation success message to the first system to trigger the first system to return a request processing result to the client, where the group creation instruction is sent to the second system after the first system stores the index information in the database corresponding to the first system.
In an exemplary embodiment, the apparatus further comprises:
An account group editing information receiving unit configured to perform receiving account group editing information sent by the first system, and update an account group stored in a database corresponding to the second system based on the account group editing information;
and the updating message sending unit is configured to acquire updated information of the stored account group and send the updated information to the first system so as to trigger the first system to update the index information.
In an exemplary embodiment, the apparatus further comprises:
The account set updating unit is configured to execute screening of candidate accounts in the current candidate account set based on the account screening rule according to a preset time interval to obtain an updated target account set;
The group update information sending unit is configured to obtain the group update information corresponding to the updated target account set, and send the group update information to the first system so as to trigger the first system to update the index information based on the group update information.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
Each of the modules in the above-described apparatus may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
Fig. 11 is a block diagram illustrating an electronic device 1100 for implementing a group creation method, according to an example embodiment. For example, the electronic device 1100 may be a server. Referring to FIG. 11, the electronic device 1100 includes a processing component 1120 that further includes one or more processors, and memory resources represented by memory 1122, for storing instructions, such as application programs, executable by the processing component 1120. An application program stored in memory 1122 may include one or more modules each corresponding to a set of instructions. Further, the processing component 1120 is configured to execute instructions to perform the above-described methods.
The electronic device 1100 may also include a power supply component 1124 configured to perform power management of the electronic device 1100, a wired or wireless network interface 1126 configured to connect the electronic device 1100 to a network, and an input output (I/O) interface 1128. The electronic device 1100 may operate based on an operating system stored in the memory 1122, such as Windows Server, mac OS X, unix, linux, freeBSD, or the like.
In an exemplary embodiment, a computer-readable storage medium is also provided, such as memory 1122 including instructions executable by a processor of electronic device 1100 to perform the above-described method. The storage medium may be a computer readable storage medium, which may be, for example, ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
In an exemplary embodiment, a computer program product is also provided, comprising instructions executable by a processor of the electronic device 1100 to perform the above-described method.
It should be noted that the descriptions of the foregoing apparatus, the electronic device, the computer readable storage medium, the computer program product, and the like according to the method embodiments may further include other implementations, and the specific implementation may refer to the descriptions of the related method embodiments and are not described herein in detail.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any adaptations, uses, or adaptations of the disclosure following the general principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.