CN110837955A - Packet generation method, device and system - Google Patents
Packet generation method, device and system Download PDFInfo
- Publication number
- CN110837955A CN110837955A CN201911029596.7A CN201911029596A CN110837955A CN 110837955 A CN110837955 A CN 110837955A CN 201911029596 A CN201911029596 A CN 201911029596A CN 110837955 A CN110837955 A CN 110837955A
- Authority
- CN
- China
- Prior art keywords
- user
- users
- age
- weight
- grouping
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 24
- 238000012163 sequencing technique Methods 0.000 claims description 9
- 230000000694 effects Effects 0.000 abstract description 5
- 238000005516 engineering process Methods 0.000 description 4
- 238000004590 computer program Methods 0.000 description 3
- 238000005034 decoration Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/06—Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
- G06Q10/063—Operations research, analysis or management
- G06Q10/0631—Resource planning, allocation, distributing or scheduling for enterprises or organisations
- G06Q10/06311—Scheduling, planning or task assignment for a person or group
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/10—Office automation; Time management
- G06Q10/109—Time management, e.g. calendars, reminders, meetings or time accounting
- G06Q10/1093—Calendar-based scheduling for persons or groups
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q50/00—Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
- G06Q50/10—Services
- G06Q50/20—Education
- G06Q50/205—Education administration or guidance
Landscapes
- Business, Economics & Management (AREA)
- Human Resources & Organizations (AREA)
- Engineering & Computer Science (AREA)
- Strategic Management (AREA)
- Economics (AREA)
- Entrepreneurship & Innovation (AREA)
- Tourism & Hospitality (AREA)
- Marketing (AREA)
- Educational Administration (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- General Business, Economics & Management (AREA)
- Physics & Mathematics (AREA)
- Educational Technology (AREA)
- Operations Research (AREA)
- Quality & Reliability (AREA)
- Primary Health Care (AREA)
- Health & Medical Sciences (AREA)
- Data Mining & Analysis (AREA)
- General Health & Medical Sciences (AREA)
- Development Economics (AREA)
- Game Theory and Decision Science (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The application discloses a packet generation method, a device and a system, wherein the method comprises the following steps: acquiring user ages and user weights of users to be grouped; according to an age grouping strategy, carrying out age grouping on each user based on the age of the user; according to the weight grouping strategy, carrying out weight grouping on each user based on the user weight; selecting one of an age grouping strategy or a weight grouping strategy as an optimal grouping strategy; and grouping the users according to the optimal grouping strategy. Compared with the prior art, the method and the device have the advantages that the corresponding grouping strategies are respectively executed according to different age levels and the registration time of the user, one of the better solutions is selected for grouping after the grouping results of the two strategies are compared, and then the user grouping effect of online education is improved.
Description
Technical Field
The present application relates to the field of packet technologies, and in particular, to a method, an apparatus, and a system for generating a packet.
Background
As society progresses, more and more users begin to choose online education. With the increase of the number of online education, how to reasonably group and arrange users who select online education is a technical problem which needs to be solved urgently. In order to solve the above problems, in the prior art, the users of online education are automatically grouped by using the traditional automatic grouping technology of colleges and universities and training institutions. However, due to the grouping technology of the conventional colleges and universities and training institutions, the target objects to be grouped are users of the same or similar age groups, and the users have the same or similar receptivity, while in online education, the age levels of the users may be far apart, such as online art education, and the target objects are aged from 4 to 10 years, resulting in the uneven receptivity. And because the traditional grouping technology has no requirement on the number of people, all users can be grouped in a certain batch, most of online education is a small class system, the number of people is strictly limited, the teaching effect is influenced when the number of people is too large, and the utilization of teacher resources is not facilitated when the number of people is too small. Thus, conventional grouping techniques are not well suited for online education.
Disclosure of Invention
The technical problem to be solved by the embodiments of the present application is to provide a packet generation method, device and system, so as to improve a user grouping effect of online education.
In order to solve the above problem, an embodiment of the present application provides a packet generation method, which at least includes the following steps:
acquiring user ages and user weights of users to be grouped; wherein the user weight is proportional to the time the user has not made up a packet;
according to an age grouping strategy, performing age grouping on each user based on the user age, including performing age sorting on each user according to the user age, sequentially dividing every N users meeting preset conditions into the same age group according to the age sorting, and recording all the users which cannot be grouped according to the user age as a first non-grouping user set; the preset condition is that the age difference between any two users in the same user group is not greater than a first preset value, N is a second preset value, and the second preset value is greater than or equal to 2; and the number of the first and second groups,
according to a weight grouping strategy, performing weight grouping on each user based on the user weight, wherein the weight sorting is performed on each user according to the user weight, after each user with the same user weight is subjected to secondary sorting according to the user age, according to the secondary sorting, every N users are divided into the same weight grouping according to the preset condition in sequence, and all the users which cannot be grouped according to the user weight are recorded as a second non-grouped user set;
selecting one of the age grouping policy and the weight grouping policy as an optimal grouping policy according to the number of users in the first non-grouped user set and the second non-grouped user set, and the user weight of each user in the first non-grouped user set and the user weight of each user in the second non-grouped user set;
and grouping each user according to the optimal grouping strategy.
Further, said sorting age of each user according to the age of each user, sequentially dividing every N users meeting a preset condition into the same age group according to the age sorting, and recording all the users that cannot be grouped according to the age of the users as a first non-grouped user set, includes:
step S11, sorting the users which are not grouped according to the ages of the users from small to big to form an age sorting linked list;
step S12, using the user age of any user extracted from the age sorting linked list as reference information, traversing the age sorting linked list in sequence according to the reference information, and putting the sequentially traversed users meeting the preset conditions into the same age group until N users are put into the same age group, or executing step S13 after traversing of the age sorting linked list is completed;
step S13, identifying whether N users exist in the age group, if yes, executing step S15, otherwise, executing step S14;
step S14, using the first traversed user not meeting the preset condition as a reference user, traversing the age groups according to the reference user in sequence, marking the users in the age groups capable of forming the same age group with the reference user as the users not grouped, dividing the users not marked in the age groups into the users incapable of forming the group according to the user ages, and executing step S15;
step S15, judging whether the number of the users which are not grouped is less than N, if yes, finishing the grouping, dividing the users which are not grouped into users which can not be grouped according to the age of the users, and recording all the users which can not be grouped according to the age of the users as a first non-grouping user set; otherwise, return to step S11.
Further, the performing weight sorting on each user according to each user weight, performing secondary sorting on each user with the same user weight according to each user age, dividing every N users into the same weight group according to the secondary sorting and sequentially meeting the preset condition, and recording all the users which cannot be grouped according to the user weight as a second non-grouped user set includes:
step S21, sorting all users which are not grouped according to the weights of all the users from big to small, and sorting all the users which are not grouped and have the same weight for the second time according to the ages of the users from big to small to form a comprehensive sorted list;
step S22, identifying whether the user age difference of each user in the comprehensive sorted list is greater than the first preset value, and executing step S23 when the user age difference of each user in the comprehensive sorted list is identified to be not greater than the first preset value;
step S23, using the user age of the first user extracted from the comprehensive sorting linked list as reference information, traversing the comprehensive sorting linked list in sequence according to the reference information, putting the sequentially traversed users meeting the preset condition into the same weight group, and executing step S24 until N users are put into the same weight group;
step S24, judging whether the number of the users which are not grouped is less than N, if yes, ending the grouping, dividing the users which are not grouped into users which can not be grouped according to the user weight, and recording all the users which can not be grouped according to the user weight as a second non-grouped user set; otherwise, return to step S21.
Further, the step S22 further includes:
when it is recognized that there is a pair of the users whose age difference is greater than the first preset value in the comprehensive ranking list, performing step S25;
the method includes the steps of performing weight sorting on users according to user weights, performing secondary sorting on users with the same user weight according to user ages, dividing every N users into the same weight group according to the secondary sorting and sequentially according to the preset conditions, and recording all the users which cannot be grouped according to the user weights as a second non-group user set, and further includes:
step S25, using the user age of the first user extracted from the comprehensive sorting linked list as reference information, traversing the age sorting linked list in sequence according to the reference information, and putting the sequentially traversed users meeting the preset condition into the same age group until N users are put into the same weight group, or completing traversal of the comprehensive sorting linked list, and then executing step S26;
step S26, identifying whether the weight grouping has N users, if yes, executing step S24, otherwise, executing step S27;
step S27, dividing the first user in the weight grouping and the first user which is not grouped in the comprehensive sorting linked list into users which can not be grouped according to the user weight, and executing step S24 after marking the rest users in the weight grouping as users which are not grouped.
Further, the user weight is calculated in the following manner:
wherein weight is the user weight, currentTime is the time when the user does not form a group, and applyTime is the registration time of the user.
Further, there is provided a packet generation apparatus, including:
the data acquisition module is used for acquiring the user age and the user weight of each user to be grouped; wherein the user weight is proportional to the time the user has not made up a packet;
the age grouping module is used for carrying out age grouping on each user based on the user age according to an age grouping strategy, comprises the steps of carrying out age sequencing on each user according to the user age, sequentially dividing every N users meeting preset conditions into the same age grouping according to the age sequencing, and recording all the users which cannot be grouped according to the user age as a first non-grouping user set;
the weight grouping module is used for performing weight grouping on each user based on the user weight according to a weight grouping strategy, comprises performing weight sorting on each user according to the user weight, performing secondary sorting on each user with the same user weight according to the user age, dividing each N users into the same weight grouping according to the secondary sorting and sequentially meeting the preset condition, and recording all the users which cannot be grouped according to the user weight as a second non-grouping user set; the preset condition is that the age difference between any two users in the same user group is not greater than a first preset value, N is a second preset value, and the second preset value is greater than or equal to 2;
a policy determination module, configured to select one of the age grouping policy and the weight grouping policy as an optimal grouping policy according to a difference between numbers of users in the first non-grouped user set and the second non-grouped user set, and a maximum user weight in the first non-grouped user set and a maximum user weight in the second non-grouped user set;
and the grouping execution module is used for grouping the users according to the optimal grouping strategy.
Further, the age grouping module is specifically configured to perform:
step S11, sorting the users which are not grouped according to the ages of the users from small to big to form an age sorting linked list;
step S12, using the user age of any user extracted from the age sorting linked list as reference information, traversing the age sorting linked list in sequence according to the reference information, and putting the sequentially traversed users meeting the preset conditions into the same age group until N users are put into the same age group, or executing step S13 after traversing of the age sorting linked list is completed;
step S13, identifying whether N users exist in the age group, if yes, executing step S15, otherwise, executing step S14;
step S14, using the first traversed user not meeting the preset condition as a reference user, traversing the age groups according to the reference user in sequence, marking the users in the age groups capable of forming the same age group with the reference user as the users not grouped, dividing the users not marked in the age groups into the users incapable of forming the group according to the user ages, and executing step S15;
step S15, judging whether the number of the users which are not grouped is less than N, if yes, finishing the grouping, dividing the users which are not grouped into users which can not be grouped according to the age of the users, and recording all the users which can not be grouped according to the age of the users as a first non-grouping user set; otherwise, return to step S11.
Further, the weight grouping module is specifically configured to perform:
step S21, sorting all users which are not grouped according to the weights of all the users from big to small, and sorting all the users which are not grouped and have the same weight for the second time according to the ages of the users from big to small to form a comprehensive sorted list;
step S22, identifying whether the user age difference of each user in the comprehensive sorted list is greater than the first preset value, and executing step S23 when the user age difference of each user in the comprehensive sorted list is identified to be not greater than the first preset value;
step S23, using the user age of the first user extracted from the comprehensive sorting linked list as reference information, traversing the comprehensive sorting linked list in sequence according to the reference information, putting the sequentially traversed users meeting the preset condition into the same weight group, and executing step S24 until N users are put into the same weight group;
step S24, judging whether the number of the users which are not grouped is less than N, if yes, ending the grouping, dividing the users which are not grouped into users which can not be grouped according to the user weight, and recording all the users which can not be grouped according to the user weight as a second non-grouped user set; otherwise, return to step S21.
Further, the step S22 further includes:
when it is recognized that there is a pair of the users whose age difference is greater than the first preset value in the comprehensive ranking list, performing step S25;
the weight grouping module is further configured to perform:
step S25, using the user age of the first user extracted from the comprehensive sorting linked list as reference information, traversing the age sorting linked list in sequence according to the reference information, and putting the sequentially traversed users meeting the preset condition into the same age group until N users are put into the same weight group, or completing traversal of the comprehensive sorting linked list, and then executing step S26;
step S26, identifying whether the weight grouping has N users, if yes, executing step S24, otherwise, executing step S27;
step S27, after dividing the first user in the weight grouping and the first user not grouped in the comprehensive sorting linked list into users which can not be grouped according to the user weight, executing step S24.
Further, a packet generating system is also provided, which includes the packet generating apparatus according to the above embodiment.
The embodiment of the application has the following beneficial effects:
compared with the prior art, the embodiment respectively executes the corresponding grouping strategies according to different age levels and the registration time of the user, and selects one of the better solutions to group after comparing the grouping results of the two strategies, thereby improving the user grouping effect of online education.
Drawings
Fig. 1 is a schematic flowchart of a packet generation method according to a first embodiment of the present application;
FIG. 2 is a flowchart illustrating step S2 according to one embodiment;
FIG. 3 is a flowchart illustrating step S3 according to an embodiment;
FIG. 4 is a schematic flowchart illustrating step S3 according to an embodiment;
fig. 5 is a schematic structural diagram of a packet generation apparatus according to a second embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, it is a schematic flowchart of a packet generation method provided in an embodiment of the present application, as shown in fig. 1, including:
step S1, the user age and user weight of each user to be grouped are acquired.
Where the user weight is proportional to the time the user has not made up a packet.
In this embodiment, the acquired information of each user includes user age, user weight, user ID, selected time period for on-line education, etc., and an information linked list is generated to store the acquired information of each user. Wherein, the user weight is calculated according to the following formula:
wherein weight is the user weight, currentTime is the time when the user does not form a group, and applyTime is the registration time of the user. currentTime and applyTime are in milliseconds.
And step S2, according to the age grouping strategy, carrying out age grouping on each user based on the user age, including carrying out age sequencing on each user according to the user age, sequentially dividing every N users meeting the preset conditions into the same age group according to the age sequencing, and recording all the users which can not be grouped according to the user age as a first non-grouping user set.
It should be noted that the preset condition is that the age difference between any two users in the same user group is not greater than a first preset value, N is a second preset value, and the second preset value is greater than or equal to 2.
In this embodiment, age grouping is performed on each user in a recursive execution manner, and a specific execution manner is as shown in fig. 2, and includes:
and step S11, sorting the users which are not grouped according to the ages of the users from small to big to form an age sorting linked list.
In the present embodiment, the formed age sort linked list is defined as userList 1.
And step S12, taking the user age of any user extracted from the age sorting linked list as reference information, traversing the age sorting linked list in sequence according to the reference information, and putting the sequentially traversed users meeting preset conditions into the same age group until N users are put into the same age group or the traversal of the age sorting linked list is completed, and executing step S13.
In this embodiment, the user ages of the first users are obtained from the userList1, after the user ages are used as reference information, the userList1 is traversed sequentially, and the sequentially traversed users meeting the preset condition are placed into the same age group1 until N users are placed into the same age group1, or the traversal of the userList1 is completed, and the users that do not meet the preset condition or are not traversed are placed into the lefters users file.
And step S13, identifying whether N users exist in the age group, if so, executing step S15, otherwise, executing step S14.
Step S14, taking the first traversed user not meeting the preset condition as a reference user, traversing the age groups according to the reference user in sequence, marking the users in the age groups capable of forming the same age group with the reference user as the users not in the group, dividing the users not in the age group into the users incapable of forming the group according to the user age, and executing step S15.
In this embodiment, if the number of users in Group1 is less than N, a temporary grouping nextGroup is generated, and at the same time, the first user who is put into leftUsers is put into nextGroup, and is taken as a reference user, after sequentially traversing the users in Group1, the users in Group1 who satisfy preset conditions with all users in nextGroup are put into nextGroup, and the users in nextGroup are put into leftUsers, which are marked as ungrouped users, and the users who cannot be put into nextGroup in Group1 are classified as users that cannot be grouped according to the age of the users.
Step S15, judging whether the number of users which are not grouped is less than N, if yes, finishing the grouping, dividing the users which are not grouped into users which can not be grouped according to the age of the users, and recording all the users which can not be grouped according to the age of the users as a first non-grouping user set; otherwise, return to step S11.
In this embodiment, when the number of users in leftUsers is less than N, the grouping is ended, and all the users in leftUsers and the users classified as being unable to be grouped according to the age of the users are recorded as the first non-grouping user set.
And step S3, according to the weight grouping strategy, carrying out weight grouping on each user based on the user weight, including carrying out weight sequencing on each user according to the user weight, carrying out secondary sequencing on each user with the same user weight according to the user age, dividing each N users into the same weight grouping according to the secondary sequencing and sequentially according with the preset condition, and recording all the users which can not be grouped according to the user weight as a second non-grouping user set.
In this embodiment, a recursive execution manner is adopted to group the weights of the users, and a specific execution manner is shown in fig. 3, which includes:
and step S21, sorting all users which are not grouped according to the weights of all users from big to small, and sorting all users which are not grouped and have the same weight of the users for the second time according to the ages of the users from big to small to form a comprehensive sorting list.
In the present embodiment, the comprehensive ordered list is defined as userlst 2.
Step S22, identifying whether the user age difference of each user in the comprehensive ranking list is greater than a first preset value, and executing step S23 when the user age difference of each user in the comprehensive ranking list is not greater than the first preset value.
And step S23, traversing the comprehensive sorting linked list in sequence according to the reference information by taking the user age of the first user extracted from the comprehensive sorting linked list as the reference information, putting the sequentially traversed users meeting the preset conditions into the same weight group, and executing the step S24 until the N users are put into the same weight group.
In this embodiment, the user age of the first user is obtained from the userList2, and after the user age is used as the reference information, the userList2 is sequentially traversed, and the sequentially traversed users meeting the preset condition are placed into the same weight group2, until after the N users are placed into the same weight group2, the remaining users in the userList2 are placed into the nexters file.
Step S24, judging whether the number of users which are not grouped is less than N, if yes, finishing grouping, dividing the users which are not grouped into users which can not be grouped according to the user weight, and recording all the users which can not be grouped according to the user weight as a second non-grouped user set; otherwise, return to step S21.
In this embodiment, when the number of users in nextUsers is less than N, the grouping is ended, and all users in nextUsers are regarded as users that cannot be grouped according to the user weight.
In this embodiment, as shown in fig. 4, it is another schematic flow chart of step S3. In the present embodiment, in addition to the flow shown in fig. 3, step S22 further includes: and when a pair of users with age gaps larger than the first preset value exists in the comprehensive ranking list, executing step S25.
And step S25, taking the user age of the first user extracted from the comprehensive sorting linked list as reference information, traversing the age sorting linked list in sequence according to the reference information, and putting the sequentially traversed users meeting preset conditions into the same age group until N users are put into the same weight group or the traversal of the comprehensive sorting linked list is completed, and executing step S26.
In this embodiment, the user age of the first user is obtained from the userList2, and after the user age is used as the reference information, the userList2 is traversed sequentially, and the sequentially traversed users meeting the preset condition are placed into the same weight group2 until N users are placed into the same age group2, or the traversal of the userList2 is completed, and the users that do not meet the preset condition or are not traversed are placed into the nexters us file.
And step S26, identifying whether the weight group has N users, if so, executing step S24, otherwise, executing step S27.
Step S27, dividing the first user in the weight grouping and the first user not grouped in the comprehensive sorting linked list into users which can not be grouped according to the user weight, and after marking the rest users in the weight grouping as users not grouped, executing step S24.
In this embodiment, users marked as ungrouped in the weight grouping are placed into the nextUsers file.
Step S4, selecting one of the age grouping policy and the weight grouping policy as the optimal grouping policy according to the number difference between the users of the first non-grouped user set and the second non-grouped user set, and the maximum user weight in the first non-grouped user set and the maximum user weight in the second non-grouped user set.
In this embodiment, when the number of users in one of the first non-packet user set and the second non-packet user set is zero, the packet policy corresponding to the non-packet user set is selected as the optimal policy. And if the number of the users in the first non-grouping user set is zero, selecting an age grouping strategy as an optimal grouping strategy, or selecting randomly if the number of the users in the first non-grouping user set is zero. And if the number difference is larger than the preset threshold value, selecting a grouping strategy corresponding to the non-grouping user set with smaller number. The preset threshold value can be set according to needs, and is not limited herein; and if the quantity difference is not larger than the preset threshold value, preferentially comparing the average weight of all users in the first non-packet user set with the average weight of all users in the second non-packet user set, and taking the packet strategy corresponding to the party with the larger average weight as the optimal packet strategy. If the average weights are the same, comparing the maximum user weights of the two parties, and selecting the grouping strategy corresponding to the party with the larger user weight as the optimal grouping strategy; if the maximum user weights of the two parties are the same, the next-highest user weight is compared, and so on.
And step S5, grouping the users according to the optimal grouping strategy.
Compared with the prior art, the embodiment respectively executes the corresponding grouping strategies according to different age levels and the registration time of the user, and selects one of the better solutions to group after comparing the grouping results of the two strategies, thereby improving the user grouping effect of online education.
Further, referring to fig. 5, a schematic structural diagram of a packet generating device according to a second embodiment of the present application is provided. The method comprises the following steps:
a data obtaining module 101, configured to obtain user ages and user weights of users to be grouped.
Where the user weight is proportional to the time the user has not made up a packet.
The age grouping module 102 is configured to perform age grouping on the users based on the user ages according to an age grouping policy, including performing age sorting on the users according to the user ages, sequentially dividing every N users meeting a preset condition into the same age group according to the age sorting, and recording all the users that cannot be grouped according to the user ages as a first non-grouped user set.
In this embodiment, the age grouping module 102 is specifically configured to execute the step flow described in fig. 2.
And the weight grouping module 103 is used for performing weight grouping on each user based on the user weight according to a weight grouping strategy, including performing weight sorting on each user according to the user weight, performing secondary sorting on each user with the same user weight according to the user age, dividing each N users into the same weight grouping according to the secondary sorting and sequentially meeting preset conditions, and recording all the users which cannot be grouped according to the user weight as a second non-grouping user set.
The preset condition is that the user age difference between any two users in the same user group is not larger than a first preset value, N is a second preset value, and the second preset value is larger than or equal to 2.
In this embodiment, the weight grouping module 103 is specifically configured to execute the step flow shown in fig. 3 or fig. 4.
And the policy determining module 104 is configured to select one of an age grouping policy and a weight grouping policy as the optimal grouping policy according to the number difference between users in the first non-grouped user set and the second non-grouped user set, and the maximum user weight in the first non-grouped user set and the maximum user weight in the second non-grouped user set.
And the grouping execution module 105 is used for grouping the users according to the optimal grouping strategy.
Further, another embodiment of the present application further provides a packet generation system, including the packet generation apparatus according to embodiment two.
Yet another embodiment of the present application further provides a packet generation terminal device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and the processor, when executing the computer program, implements the packet generation method according to the above embodiment.
The foregoing is a preferred embodiment of the present application, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present application, and these modifications and decorations are also regarded as the protection scope of the present application.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
Claims (10)
1. A packet generation method, characterized by comprising at least the steps of:
acquiring user ages and user weights of users to be grouped; wherein the user weight is proportional to the time the user has not made up a packet;
according to an age grouping strategy, performing age grouping on each user based on the user age, including performing age sorting on each user according to the user age, sequentially dividing every N users meeting preset conditions into the same age group according to the age sorting, and recording all the users which cannot be grouped according to the user age as a first non-grouping user set; the preset condition is that the age difference between any two users in the same user group is not greater than a first preset value, N is a second preset value, and the second preset value is greater than or equal to 2; and the number of the first and second groups,
according to a weight grouping strategy, performing weight grouping on each user based on the user weight, wherein the weight sorting is performed on each user according to the user weight, after each user with the same user weight is subjected to secondary sorting according to the user age, according to the secondary sorting, every N users are divided into the same weight grouping according to the preset condition in sequence, and all the users which cannot be grouped according to the user weight are recorded as a second non-grouped user set;
selecting one of the age grouping policy and the weight grouping policy as an optimal grouping policy according to the number of users in the first non-grouped user set and the second non-grouped user set, and the user weight of each user in the first non-grouped user set and the user weight of each user in the second non-grouped user set;
and grouping each user according to the optimal grouping strategy.
2. The method according to claim 1, wherein said ranking the ages of the users according to the ages of the users, sequentially classifying every N users meeting a preset condition into the same age group according to the age ranking, and recording all the users that cannot be grouped according to the ages of the users as a first non-grouped user set comprises:
step S11, sorting the users which are not grouped according to the ages of the users from small to big to form an age sorting linked list;
step S12, using the user age of any user extracted from the age sorting linked list as reference information, traversing the age sorting linked list in sequence according to the reference information, and putting the sequentially traversed users meeting the preset conditions into the same age group until N users are put into the same age group, or executing step S13 after traversing of the age sorting linked list is completed;
step S13, identifying whether N users exist in the age group, if yes, executing step S15, otherwise, executing step S14;
step S14, using the first traversed user not meeting the preset condition as a reference user, traversing the age groups according to the reference user in sequence, marking the users in the age groups capable of forming the same age group with the reference user as the users not grouped, dividing the users not marked in the age groups into the users incapable of forming the group according to the user ages, and executing step S15;
step S15, judging whether the number of the users which are not grouped is less than N, if yes, finishing the grouping, dividing the users which are not grouped into users which can not be grouped according to the age of the users, and recording all the users which can not be grouped according to the age of the users as a first non-grouping user set; otherwise, return to step S11.
3. The method according to claim 1, wherein the performing weight sorting on the users according to the user weights, performing secondary sorting on the users with the same user weight according to the user ages, dividing every N users into the same weight group according to the secondary sorting and sequentially meeting the preset condition, and recording all the users that cannot be grouped according to the user weights as a second non-grouped user set according to the secondary sorting comprises:
step S21, sorting all users which are not grouped according to the weights of all the users from big to small, and sorting all the users which are not grouped and have the same weight for the second time according to the ages of the users from big to small to form a comprehensive sorted list;
step S22, identifying whether the user age difference of each user in the comprehensive sorted list is greater than the first preset value, and executing step S23 when the user age difference of each user in the comprehensive sorted list is identified to be not greater than the first preset value;
step S23, using the user age of the first user extracted from the comprehensive sorting linked list as reference information, traversing the comprehensive sorting linked list in sequence according to the reference information, putting the sequentially traversed users meeting the preset condition into the same weight group, and executing step S24 until N users are put into the same weight group;
step S24, judging whether the number of the users which are not grouped is less than N, if yes, ending the grouping, dividing the users which are not grouped into users which can not be grouped according to the user weight, and recording all the users which can not be grouped according to the user weight as a second non-grouped user set; otherwise, return to step S21.
4. The packet generation method according to claim 3, wherein the step S22 further includes:
when it is recognized that there is a pair of the users whose age difference is greater than the first preset value in the comprehensive ranking list, performing step S25;
the method includes the steps of performing weight sorting on users according to user weights, performing secondary sorting on users with the same user weight according to user ages, dividing every N users into the same weight group according to the secondary sorting and sequentially according to the preset conditions, and recording all the users which cannot be grouped according to the user weights as a second non-group user set, and further includes:
step S25, using the user age of the first user extracted from the comprehensive sorting linked list as reference information, traversing the age sorting linked list in sequence according to the reference information, and putting the sequentially traversed users meeting the preset condition into the same age group until N users are put into the same weight group, or completing traversal of the comprehensive sorting linked list, and then executing step S26;
step S26, identifying whether the weight grouping has N users, if yes, executing step S24, otherwise, executing step S27;
step S27, after dividing the first user in the weight grouping and the first user not grouped in the comprehensive sorting linked list into users which can not be grouped according to the user weight, executing step S24.
6. A packet generation apparatus comprising:
the data acquisition module is used for acquiring the user age and the user weight of each user to be grouped; wherein the user weight is proportional to the time the user has not made up a packet;
the age grouping module is used for carrying out age grouping on each user based on the user age according to an age grouping strategy, comprises the steps of carrying out age sequencing on each user according to the user age, sequentially dividing every N users meeting preset conditions into the same age grouping according to the age sequencing, and recording all the users which cannot be grouped according to the user age as a first non-grouping user set;
the weight grouping module is used for performing weight grouping on each user based on the user weight according to a weight grouping strategy, comprises performing weight sorting on each user according to the user weight, performing secondary sorting on each user with the same user weight according to the user age, dividing each N users into the same weight grouping according to the secondary sorting and sequentially meeting the preset condition, and recording all the users which cannot be grouped according to the user weight as a second non-grouping user set; the preset condition is that the age difference between any two users in the same user group is not greater than a first preset value, N is a second preset value, and the second preset value is greater than or equal to 2;
a policy determination module, configured to select one of the age grouping policy and the weight grouping policy as an optimal grouping policy according to a difference between numbers of users in the first non-grouped user set and the second non-grouped user set, and a maximum user weight in the first non-grouped user set and a maximum user weight in the second non-grouped user set;
and the grouping execution module is used for grouping the users according to the optimal grouping strategy.
7. The grouping generation apparatus of claim 6, wherein the age grouping module is specifically configured to perform:
step S11, sorting the users which are not grouped according to the ages of the users from small to big to form an age sorting linked list;
step S12, using the user age of any user extracted from the age sorting linked list as reference information, traversing the age sorting linked list in sequence according to the reference information, and putting the sequentially traversed users meeting the preset conditions into the same age group until N users are put into the same age group, or executing step S13 after traversing of the age sorting linked list is completed;
step S13, identifying whether N users exist in the age group, if yes, executing step S15, otherwise, executing step S14;
step S14, using the first traversed user not meeting the preset condition as a reference user, traversing the age groups according to the reference user in sequence, marking the users in the age groups capable of forming the same age group with the reference user as the users not grouped, dividing the users not marked in the age groups into the users incapable of forming the group according to the user ages, and executing step S15;
step S15, judging whether the number of the users which are not grouped is less than N, if yes, finishing the grouping, dividing the users which are not grouped into users which can not be grouped according to the age of the users, and recording all the users which can not be grouped according to the age of the users as a first non-grouping user set; otherwise, return to step S11.
8. The packet generation apparatus according to claim 6, wherein the weight grouping module is specifically configured to perform:
step S21, sorting all users which are not grouped according to the weights of all the users from big to small, and sorting all the users which are not grouped and have the same weight for the second time according to the ages of the users from big to small to form a comprehensive sorted list;
step S22, identifying whether the user age difference of each user in the comprehensive sorted list is greater than the first preset value, and executing step S23 when the user age difference of each user in the comprehensive sorted list is identified to be not greater than the first preset value;
step S23, using the user age of the first user extracted from the comprehensive sorting linked list as reference information, traversing the comprehensive sorting linked list in sequence according to the reference information, putting the sequentially traversed users meeting the preset condition into the same weight group, and executing step S24 until N users are put into the same weight group;
step S24, judging whether the number of the users which are not grouped is less than N, if yes, ending the grouping, dividing the users which are not grouped into users which can not be grouped according to the user weight, and recording all the users which can not be grouped according to the user weight as a second non-grouped user set; otherwise, return to step S21.
9. The packet generation apparatus according to claim 8, wherein the step S22 further includes:
when it is recognized that there is a pair of the users whose age difference is greater than the first preset value in the comprehensive ranking list, performing step S25;
the weight grouping module is further configured to perform:
step S25, using the user age of the first user extracted from the comprehensive sorting linked list as reference information, traversing the age sorting linked list in sequence according to the reference information, and putting the sequentially traversed users meeting the preset condition into the same age group until N users are put into the same weight group, or completing traversal of the comprehensive sorting linked list, and then executing step S26;
step S26, identifying whether the weight grouping has N users, if yes, executing step S24, otherwise, executing step S27;
step S27, dividing the first user in the weight grouping and the first user which is not grouped in the comprehensive sorting linked list into users which can not be grouped according to the user weight, and executing step S24 after marking the rest users in the weight grouping as users which are not grouped.
10. A packet generation system comprising the packet generation apparatus according to any one of claims 6 to 9.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911029596.7A CN110837955A (en) | 2019-10-25 | 2019-10-25 | Packet generation method, device and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911029596.7A CN110837955A (en) | 2019-10-25 | 2019-10-25 | Packet generation method, device and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110837955A true CN110837955A (en) | 2020-02-25 |
Family
ID=69575546
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911029596.7A Pending CN110837955A (en) | 2019-10-25 | 2019-10-25 | Packet generation method, device and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110837955A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111709782A (en) * | 2020-06-17 | 2020-09-25 | 北京字节跳动网络技术有限公司 | Information interaction method and device and electronic equipment |
-
2019
- 2019-10-25 CN CN201911029596.7A patent/CN110837955A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111709782A (en) * | 2020-06-17 | 2020-09-25 | 北京字节跳动网络技术有限公司 | Information interaction method and device and electronic equipment |
CN111709782B (en) * | 2020-06-17 | 2023-04-28 | 北京字节跳动网络技术有限公司 | Information interaction method and device and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103679132B (en) | A kind of nude picture detection method and system | |
US20230043174A1 (en) | Method for pushing anchor information, computer device, and storage medium | |
CN107122375A (en) | The recognition methods of image subject based on characteristics of image | |
CN113688167A (en) | Deep interest capture model construction method and device based on deep interest network | |
CN104994424B (en) | A kind of method and apparatus for building audio and video standard data set | |
CN108388508A (en) | A kind of test cases selection method based on user conversation and hierarchical clustering algorithm | |
CN114418807B (en) | Course recommendation method and system of online education platform based on historical score | |
CN111723973B (en) | Learning effect optimization method based on user behavior causal relationship in MOOC log data | |
CN110659311A (en) | Topic pushing method and device, electronic equipment and storage medium | |
CN112733035A (en) | Knowledge point recommendation method and device based on knowledge graph, storage medium and electronic device | |
CN105260457A (en) | Coreference resolution-oriented multi-semantic web entity contrast table automatic generation method | |
CN104750828B (en) | A kind of unconscious self-learning method of conclusion deductive knowledge based on 6W rules | |
CN110837955A (en) | Packet generation method, device and system | |
Elahi et al. | Adapting to natural rating acquisition with combined active learning strategies | |
CN111159420A (en) | Entity optimization method based on attribute calculation and knowledge template | |
CN104484451B (en) | The extracting method and device of Webpage information | |
CN107644094B (en) | Method, device, server and storage medium for constructing boutique resource library | |
CN113918471A (en) | Test case processing method and device and computer readable storage medium | |
Traub et al. | Measuring the effectiveness of gamesourcing expert oil painting annotations | |
CN106911512A (en) | Link Forecasting Methodology and system based on game in commutative figure | |
CN111292062A (en) | Crowdsourcing garbage worker detection method and system based on network embedding and storage medium | |
CN115952908A (en) | Learning path planning method, system, device and storage medium | |
JP7562961B2 (en) | Answer generation device and program | |
CN115759679A (en) | Grouping method and device | |
CN112733036A (en) | Knowledge point recommendation method and device, storage medium and electronic device |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200225 |
|
RJ01 | Rejection of invention patent application after publication |