A method and system for detecting game studio users based on trajectory clustering
By applying a trajectory clustering method in the game database and identifying game studio users, the problem of complex and high cost of identifying studio users in the early stage of game release is solved, and efficient and accurate recognition effect is achieved.
Patent Information
- Application Number
- CN202111303404.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-04
- Publication Date
- 2025-06-17
- Estimated Expiration
- 2041-11-04
AI Technical Summary
In the early stages of game release, the process of identifying studio users was complicated and costly, and the existing technology was difficult to effectively solve this problem.
Using a trajectory clustering method, by obtaining user event records in the game database, encoding and preprocessing, key feature points are determined, data is segmented into subsequence segments, clustering according to similarity, key subsequences of class clusters are obtained, and target ranges are circled in the user event trajectory, and user event records are analyzed to determine studio users.
This method can effectively narrow the scope of verification, reduce the labor and time cost of identifying studio users, and improve the identification efficiency and accuracy.
Smart Images

Figure CN114154033B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method and system for detecting game studio users based on trajectory clustering. Background Art
[0002] With the development of the e-sports industry, many high-quality games have emerged. Along with this, various illegal cheating behaviors also exist in the life cycle of games. Among them, game studios register accounts with eye-catching user names in the early stage of game release, and then use illegal means such as scripting languages to concentrate on "leveling up" the accounts. After reaching a certain level and having a certain value, the accounts are sold for bad profits.
[0003] In related technologies, classification methods based on supervised learning, such as random forests, are used to identify the above users. This method requires learning and training based on a large amount of sample data with studio labels, and then applied to the identification of studio users. However, in the early stage of game release, there was not a large amount of sample data. In addition, operation and maintenance personnel could not determine what characteristics studio users had, and the sample characteristics of each studio were also different.
[0004] Currently, there is no effective solution to the problem of how to identify studio users in the early stages of the game in related technologies. Summary of the invention
[0005] The embodiments of the present application provide a method, system, computer device and computer-readable storage medium for detecting game studio users based on trajectory clustering, so as to at least solve the problem of complex process and high cost of identifying studio users in related technologies.
[0006] In a first aspect, an embodiment of the present application provides a method for detecting game studio users based on trajectory clustering, the method comprising:
[0007] Acquire user event records in a game database, and encode the user event records to obtain preprocessed data;
[0008] In the user event trajectory composed of the preprocessed data, key feature points are determined according to the MDL costs of the feature points, and the preprocessed data are segmented into a plurality of subsequence segments according to the key feature points;
[0009] Clustering the subsequence segments into a plurality of clusters according to the similarities between the subsequence segments, and obtaining key subsequences of the clusters respectively;
[0010] In the user event trajectory, a target range is defined based on the key subsequence, and the studio user is determined in the game database by analyzing the user event records within the target range.
[0011] In some of these embodiments, determining the key feature points according to the MDL cost of the feature points includes:
[0012] Step 1, determine the target feature points, obtain the first MDL cost where there are key feature points between the starting feature points and the target feature points, and obtain the second MDL cost where there are no key feature points between the starting feature points and the target feature points;
[0013] Step 2, determine whether the first MDL cost is greater than the second MDL cost. If so, the feature point before the target feature point is the key feature point, and use the key feature point as the starting feature point to loop and execute Step 1 and Step 2. If not, use the feature point after the target feature point as the target feature point to loop and execute Step 1 and Step 2.
[0014] In some of these embodiments, segmenting the preprocessed data into multiple subsequence segments according to the key points includes:
[0015] In the trajectory formed by the preprocessed data, obtain the feature points between the starting feature points and the key feature points as a set of feature points, and use the set of feature points as the subsequence segment.
[0016] In some of these embodiments, clustering the subsequence segments into multiple clusters according to the similarity between the subsequence segments includes:
[0017] Obtain the trajectory segments corresponding to the subsequence segments, and calculate the absolute distance between each pair of trajectory segments respectively, where the absolute distance represents the similarity between the subsequence segments;
[0018] Define clusters in the preprocessed data, including: defining a clustering center, defining a class neighborhood radius, and defining a minimum number of subsequence segments;
[0019] Obtain the target subsequence segments whose absolute distance is less than the class neighborhood radius. When the number of the target subsequence segments is greater than the minimum number of subsequence segments, divide the target subsequence segments into the corresponding clusters.
[0020] In some of these embodiments, obtaining the key subsequence of the clusters includes:
[0021] Calculate the average direction vector of the cluster, and sort and encode the feature points in the subsequence segment according to the average direction vector;
[0022] Determine the target feature points in the subsequence segment where the encoded coordinates are the same as the feature point coordinates, and determine the number of the target feature points;
[0023] When the number of the target feature points is greater than the number of the minimum subsequence segments, calculate the difference between the encoded coordinates of the target feature point and the previous feature point of the target feature point;
[0024] When the encoded coordinate difference is greater than or equal to a preset smoothing parameter, calculate the average encoded coordinates of all the feature points in the subsequence segment, and decode the average encoded coordinates according to the average direction vector to obtain the average coordinates of the subsequence segment, where the average coordinates represent the key subsequence.
[0025] In some embodiments, when the game player is a studio user, obtain the user event record in the game database, and encode the user event record to obtain preprocessed data, where in the user event record, multiple studio users have similar behaviors and concentrated login times;
[0026] In the user event trajectory composed of the preprocessed data, determine the key feature points according to the MDL cost of the feature points, and segment the preprocessed data into multiple subsequence segments according to the key feature points;
[0027] According to the similarity between the subsequence segments, cluster the subsequence segments to obtain multiple clusters, and respectively obtain the key subsequences of the clusters, where the key subsequence includes the user event record generated by the studio user;
[0028] Circumscribe a target range corresponding to the key subsequence in the user event trajectory, and determine the studio user in the game database by analyzing the user event record within the target range.
[0029] In a second aspect, an embodiment of the present application provides a game studio user detection system based on trajectory clustering, and the system includes: a game database, a reading module, a segmentation module, a clustering module, and an analysis module;
[0030] The reading module is configured to obtain a user event record in the game database and encode the user event record to obtain preprocessed data;
[0031] The segmentation module is configured to determine key feature points according to the MDL cost of the feature points in the user event trajectory composed of the preprocessed data, and segment the preprocessed data into multiple subsequence segments according to the key feature points;
[0032] The clustering module is configured to cluster the subsequence segments into multiple clusters according to the similarity between the subsequence segments, and respectively obtain the key subsequences of the clusters;
[0033] The analysis module is used to delimit a target range based on the key subsequence in the user event trajectory, and analyze the user event records within the target range to determine studio users in the game database.
[0034] In some embodiments, the segmentation module determines the key feature points according to the MDL cost of the feature points, including the following steps:
[0035] Step 1, determine the target feature point, obtain the first MDL cost of the existence of key feature points between the starting feature point and the target feature point, and obtain the second MDL cost of the non-existence of key feature points between the starting feature point and the target feature point;
[0036] Step 2, determine whether the first MDL cost is greater than the second MDL cost. If so, the feature point before the target feature point is the key feature point, and steps 1 and 2 are cyclically executed with the key feature point as the starting feature point. If not, the feature point after the target feature point is used as the target feature point to cyclically execute steps 1 and 2.
[0037] In a third aspect, an embodiment of the present application provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, it implements the method for detecting game studio users based on trajectory clustering as described in the first aspect above.
[0038] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, it implements the method for detecting game studio users based on trajectory clustering as described in the first aspect above.
[0039] Compared with the related art, the method for detecting game studio users based on trajectory clustering provided by the embodiments of the present application obtains user event records in the game database, encodes the user event records to obtain preprocessed data. In the user event trajectory composed of the preprocessed data, key feature points are determined according to the MDL cost of the feature points, and the preprocessed data is segmented into multiple subsequence segments according to the key feature points; according to the similarity between the subsequence segments, the subsequence segments are clustered into multiple clusters, and the key subsequences of the clusters are respectively obtained; a target range corresponding to the key subsequence is determined in the user event trajectory, and by analyzing the user event records within the target range, studio users are determined in the game database. Through the present application, the problems of complex process and high cost in identifying studio users in the early stage of the game in the related art are solved, suspicious target populations can be delimited, the verification range can be narrowed, thereby improving the human and time costs of distinguishing studio users. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The accompanying drawings described herein are used to provide a further understanding of the present application and form a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation to the present application. In the drawings:
[0041] Figure 1 is a schematic diagram of the application environment of a method for detecting game studio users based on trajectory clustering according to an embodiment of the present application;
[0042] Figure 2 is a flowchart of a method for detecting game studio users based on trajectory clustering according to an embodiment of the present application;
[0043] Figure 3 is a schematic diagram of a user event trajectory according to an embodiment of the present application;
[0044] Figure 4 is a schematic diagram of a behavior trajectory according to an embodiment of the present application;
[0045] Figure 5 is a system for detecting game studio users based on trajectory clustering according to an embodiment of the present application;
[0046] Figure 6 is a schematic diagram of the internal structure of an electronic device according to an embodiment of the present application. Detailed implementation manners
[0047] In order to make the purpose, technical solutions and advantages of the present application clearer and more understandable, the present application will be described and explained below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application. Based on the embodiments provided by the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.
[0048] Obviously, the accompanying drawings in the following description are only some examples or embodiments of the present application. For those of ordinary skill in the art, without creative efforts, the present application can also be applied to other similar scenarios based on these drawings. In addition, it can also be understood that although the efforts made in this development process may be complex and lengthy, for those of ordinary skill in the art related to the content disclosed in the present application, some design, manufacturing or production changes based on the technical content disclosed in the present application are only conventional technical means and should not be understood that the content disclosed in the present application is insufficient.
[0049] References to "embodiments" in this application mean that specific features, structures, or characteristics described in connection with the embodiments can be included in at least one embodiment of the application. The phrase appears in various places in the specification and does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. It is explicitly and implicitly understood by those of ordinary skill in the art that the embodiments described in this application can be combined with other embodiments without conflict.
[0050] Unless otherwise defined, technical terms or scientific terms involved in this application shall have the ordinary meaning understood by those with ordinary skills in the technical field to which this application belongs. The words "a", "an", "one kind", "the", and similar words involved in this application do not indicate a limitation in quantity and can represent singular or plural. The terms "include", "comprise", "have" and any variations thereof involved in this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may further include steps or units not listed, or may further include other steps or units inherent to these processes, methods, products, or devices. The words "connect", "be connected", "couple" and similar words involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "plurality" involved in this application means two or more. "And / or" describes the association relationship of associated objects and indicates that three relationships may exist. For example, "A and / or B" may represent: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally represents an "or" relationship between the associated objects before and after. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific order for the objects.
[0051] A method for detecting game studio users based on trajectory clustering provided by this application can be applied in, for example, Figure 1 the application environment shown, Figure 1 which is a schematic diagram of the application environment of a method for detecting game studio users based on trajectory clustering according to an embodiment of this application. As shown in Figure 1As shown, the terminal 10 communicates with the server 11 via a network, and the user outputs access traffic through the terminal 10 and sends it to the server 11. Further, the server 11 receives the user's access traffic and can generate different user event records based on the access traffic and save them in the database. Additionally, various types of application clients are installed on the terminal 10, which can be the game application client involved in this application. Among them, for some popular game applications, there may be studio users engaging in illegal cheating behaviors in the game environment. Through the method for detecting studio users based on trajectory clustering deployed in the server 11 in this application, a relatively small range where studio users may exist can be delineated from all current user record data, thereby reducing the labor cost of differentiating studio users. It should be noted that the terminal 10 in the embodiments of this application can be a smart phone, a tablet computer, a desktop computer, a laptop computer, and a smart wearable device, and the server 11 can be an independent server or a server cluster composed of multiple servers.
[0052] This application provides a method for detecting game studio users based on trajectory clustering. Figure 2 It is a flowchart of a method for detecting game studio users based on trajectory clustering according to an embodiment of this application. As Figure 2 shown, this process includes the following steps:
[0053] S201, obtain user event records in the game database, and encode the user event records to obtain preprocessed data;
[0054] In this embodiment, the user event records are composed of record sequence data generated by all player accounts in the current game environment, which can be the login / logout time, online duration, recharge information, account upgrade information, and occupation information of the players, etc. Additionally, the user event records are matched with the player accounts and are continuously updated with the player's behaviors.
[0055] Optionally, the database parameters in the ini configuration file can be read through the configparser package of Python to obtain the user event records. The user event records can be stored in a record table, where the record table includes user IDs and user event records, and the user IDs are matched with the user event records. In the record table, the user event records are saved in the form of strings.
[0056] It should be noted that before applying the user event records for clustering, a preprocessing step needs to be performed on them to convert them into a format that can be recognized and processed by the algorithm model. Optionally, specifically, it includes: encoding the user event records into the form of event numbers through an encoder. For example, encoding the original user event records [event 1|event 2|...|event ni] into [event 1 encoding, event 2 encoding,..., event ni encoding].
[0057] S202. In the user event trajectory composed of preprocessed data, determine key feature points according to the MDL cost of the feature points, and segment the preprocessed data into multiple subsequence segments according to the key feature points.
[0058] Figure 3 It is a schematic diagram of a user event trajectory according to an embodiment of the present application. As Figure 3 shown, the event trajectory is composed of individual user event records. In this event trajectory, each record corresponds to a feature point in the trajectory graph. As Figure 3 shown, it can be seen that due to the complexity and uncertainty of user records, the user event trajectory presents as an irregular connection line.
[0059] Furthermore, the trajectory segmentation in this step is to select some key feature points in the original event trajectory and use the connection lines of the key feature points to approximate the original trajectory. Among them, the points with larger angle changes in the trajectory graph are selected as key feature points.
[0060] It should be noted that the process of trajectory segmentation should ensure accuracy and simplicity. Among them, accuracy means that the number of feature points cannot be too small, otherwise it is not enough to summarize the trajectory characteristics; simplicity means that the trajectory characteristics should be summarized with as few points as possible. These two characteristics are contradictory, so it is necessary to balance these two characteristics well. In this embodiment, by calculating the MDL (Minimum Description Length) cost to determine the key feature points, these two characteristics can be better balanced.
[0061] S203. Cluster the subsequence segments into multiple clusters according to the similarity between the subsequence segments, and respectively obtain the key subsequences of the clusters.
[0062] For the subsequence segments after segmentation, the similarity data can be obtained by calculating the absolute distance between the subsequence segment trajectories. Among them, for two trajectory segments with the same length, parallel to each other, and the starting points of both perpendicular to the original trajectory, their vertical distance can be directly used to measure the similarity between them. The closer the distance, the more similar. This vertical distance can be represented by d ⊥ ; for two trajectory segments that are parallel to each other but have different lengths or are misaligned, the difference in their horizontal directions needs to be introduced to calculate the horizontal distance, and the similarity is measured by this horizontal distance. This horizontal distance can be represented by d || ; for two trajectory segments that are not parallel to each other, the larger the included angle, the smaller the similarity. Therefore, the included angle between them needs to be introduced to calculate the included angle distance. This included angle distance can be represented by d θ .
[0063] After obtaining the similarity data between subsequence segments, multiple clusters can be obtained by clustering each subsequence segment according to the similarity, and then the most representative key subsequence in each cluster can be further obtained.
[0064] S204. In the user event trajectory, delimit a target range based on the key subsequence, and determine studio users in the game database by analyzing the user event records within the target range.
[0065] It should be noted that since studio users have centralized online behavior and their game behaviors are often mostly the same, studio users are very likely to be concentrated in several representative user event trajectories. And the above key subsequences are the most representative sequences of each type of game behavior. Therefore, by analyzing these key subsequences, a smaller range where studio users may exist can be delimited. Then, through further manual or combined with some simple computer logic, the studio users among them can be determined.
[0066] Through the above steps S201 to S203, compared with the method of using supervised algorithms such as random forest to identify studio users in the related art, the embodiment of the present application is based on an unsupervised algorithm of trajectory clustering. After segmenting, clustering, and obtaining representative sequences of the user event trajectory, a smaller target range is delimited based on the representative subsequence segment, and studio users are determined within this target range. Through this method, the problem in the related art that in the early stage of game operation, due to the inability to obtain a large-scale sample data of studio users, the supervised algorithm cannot be applied to detect studio users is solved, the verification range can be narrowed, and thus the human and time costs for distinguishing studio users are improved.
[0067] In some embodiments, determining the key feature points according to the MDL cost of the feature points includes:
[0068] Step 1: Determine the target feature point, obtain the first MDL cost of the existence of key feature points between the starting feature point and the target feature point, and obtain the second MDL cost of the non-existence of key feature points in the starting feature point and the target feature point;
[0069] Step 2: Judge whether the first MDL cost is greater than the second MDL cost. If so, the feature point before the target feature point is the key feature point, and steps 1 and 2 are cyclically executed with the key feature point as the starting feature point. If not, the feature point after the target feature point is used as the target feature point to cyclically execute steps 1 and 2.
[0070] It should be noted that MDL (minimum description length) is a widely used rule in information compression. Its basic principle is that for a given set of instance data D, if we want to save it, in order to save storage space, we generally use a model H to encode and compress it, and then save the compressed data. At the same time, in order to correctly restore these instance data in the future, the model used also needs to be saved. Therefore, the length of the data to be saved is equal to the total description length obtained by adding the length after encoding and compression to the length of the data required to save the model. And by applying the principle of minimum description length (MDL), we can select the model that can most accurately and concisely segment the subsequence segments.
[0071] Among them, the MDL principle includes two parts: L(H) and L(D|H). Among them, L(H) is used to describe the length required to compress the model (or encoding method), which is equivalent to storing data; L(D|H) is used to describe the length required to encode the data using the compression model, which is equivalent to storing space data. Among them, L(H) and L(D|H) are calculated through the following formulas 1 and 2 respectively:
[0072] Formula 1:
[0073] Formula 2:
[0074] Among them, represents the starting feature point and the ending feature point of the subsequence segment trajectory, and d ⊥ represents the vertical distance, and d θ represents the angular distance.
[0075] Furthermore, Figure 4 is a schematic diagram of a behavior trajectory according to an embodiment of the present application. As Figure 4 shown, a calculation example of L(H) and L(D|H) is as shown in the following formulas 3 and 4:
[0076] Formula 3: L(H) = log2(len(p1p4)
[0077] Formula 4: L(D|H) = log2(d ⊥ (p1p4, p1p2) + d ⊥ (p1p4, p2p3) + d ⊥ (p1p4, p3p4 +)) + log2(d θ (p1p4, p1p2) + d θ (p1p4, p2p3) + d θ (p1p4, p3p4)
[0078] Further, segmenting the preprocessed data into multiple subsequence segments according to key points includes: in the trajectory composed of the preprocessed data, obtaining the key points between the starting key point and the key feature points as the key point set, and using the key point set as the subsequence segment.
[0079] In some embodiments, clustering the subsequence segments into multiple clusters according to the similarity between the subsequence segments includes:
[0080] First, obtain the trajectory line segments of the subsequence segments corresponding to the subsequence segments, and calculate the absolute distance between each trajectory line segment of the subsequence segments respectively, where the absolute distance includes the vertical distance, the parallel distance, and the angular distance, which can characterize the similarity between the subsequence segments;
[0081] Further, define clusters in the preprocessed data, including: defining the clustering center, defining the cluster neighborhood radius, and defining the minimum number of subsequence segments; obtaining the target subsequence segments with an absolute distance less than the cluster neighborhood radius, and in the case where the number of target subsequence segments is greater than the minimum number of subsequence segments, dividing the target subsequence segments into the corresponding clusters. Among them, the target subsequence segments with an absolute distance less than the cluster neighborhood radius can be obtained according to the following formula 5:
[0082] Formula 5: N ε (L) = {[L i | dist(L, L i ) < ε]; dist(L, L i ) = w ⊥ ·d ⊥ (L, L i ) + w || ·d || (L, L i ) + w θ ·d θ (L, L i )}
[0083] In the above formula 5, N ε (L) is the target subsequence segment, ε is the cluster neighborhood radius, dist(L, L i ) is the absolute distance between the subsequence segments, w ⊥ , w θ , w || are the weights corresponding to each type of distance data, and here they can all be taken as 1.
[0084] In some embodiments, after clustering, obtain the most representative key subsequence in each cluster for screening studio users, where obtaining the key subsequence specifically includes:
[0085] Calculate the average direction vector of the cluster, and sort and encode the feature points in the subsequence segment according to the average direction vector. It should be noted that the specific implementation process of sorting and encoding according to the average direction vector is as follows: Rotate the coordinate system of the feature points so that the original X-axis is parallel to the average direction vector to obtain a new coordinate axis X'. The value obtained on the new X'-axis is the value after encoding and sorting.
[0086] Determine the target feature points in the subsequence segment whose encoded coordinates are the same as the feature point coordinates, and determine the number of target feature points. Further, in the case where the number of target feature points is greater than the minimum number of subsequence segments, calculate the difference between the encoded coordinates of the target feature point and the previous feature point of the target feature point.
[0087] In the case where the encoded coordinate difference is greater than or equal to the preset smoothing parameter, calculate the average encoded coordinate of all feature points in the subsequence segment, and decode the average encoded coordinate according to the average direction vector to obtain the average coordinate of the subsequence segment. The average coordinate is used to represent the key subsequence. It can be understood that this decoding process is to rotate the X'-axis back to the original X-axis, and the value obtained on this X-axis is the decoded value.
[0088] In some embodiments, when the game player is a studio user, obtain the user event record in the game database, and encode the user event record to obtain the preprocessed data. Among them, in the user event record, multiple studio users have similar behaviors and concentrated login times.
[0089] In the user event trajectory composed of the preprocessed data, determine the key feature points according to the MDL cost of the feature points, and segment the preprocessed data into multiple subsequence segments according to the key feature points; cluster the subsequence segments according to the similarity between the subsequence segments to obtain multiple clusters, and respectively obtain the key subsequences of the clusters. The key subsequence includes the user event records generated by studio users; determine the target range corresponding to the key subsequence in the user event trajectory, and determine the studio users in the game database by analyzing the user event records in the target range.
[0090] It should be noted that the steps shown in the above process or the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0091] This embodiment also provides a game studio user detection system based on trajectory clustering. This system is used to implement the above-mentioned embodiments and preferred implementation manners, and those that have been described will not be repeated here. As used hereinafter, terms such as "module", "unit", "sub-unit", etc. can be a combination of software and / or hardware that can achieve a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.
[0092] Figure 5 A game studio user detection system based on trajectory clustering according to an embodiment of the present application, as Figure 5 shown, the system includes: a game database 51, a reading module 52, a segmentation module 53, a clustering module 54, and an analysis module 55;
[0093] The reading module 52 is used to obtain user event records in the game database 51 and encode the user event records to obtain preprocessed data;
[0094] The segmentation module 53 is used to determine key feature points according to the MDL cost of feature points in the user event trajectory composed of preprocessed data, and segment the preprocessed data into multiple subsequence segments according to the key feature points;
[0095] The clustering module 54 is used to cluster the subsequence segments into multiple clusters according to the similarity between the subsequence segments, and respectively obtain the key subsequences of the clusters;
[0096] The analysis module 55 is used to delimit a target range according to the key subsequences in the user event trajectory, and analyze the user event records within the target range to determine studio users in the game database 51.
[0097] In some embodiments, the segmentation module 53 determines key feature points according to the MDL cost of feature points, including the following steps:
[0098] Step 1, determine target feature points, obtain a first MDL cost with key feature points existing between the starting feature point and the target feature point, and obtain a second MDL cost with no key feature points between the starting feature point and the target feature point;
[0099] Step 2, judge whether the first MDL cost is greater than the second MDL cost. If so, the feature point before the target feature point is the key feature point, and steps 1 and 2 are looped with the key feature point as the starting feature point. If not, the feature point after the target feature point is used as the target feature point to loop and execute steps 1 and 2.
[0100] In one embodiment, a computer device is provided, and the computer device may be a terminal. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it implements a method for detecting game studio users based on trajectory clustering. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device may be a touch layer covering the display screen, or may be a button, a trackball, or a touchpad provided on the computer device housing, or may also be an external keyboard, touchpad, or mouse, etc.
[0101] In one embodiment, Figure 6 is a schematic internal structure diagram of an electronic device according to an embodiment of the present application, as Figure 6 shown, an electronic device is provided, and the electronic device may be a server, and its internal structure diagram may be as Figure 6 shown. The electronic device includes a processor, a network interface, an internal memory, and a non-volatile memory connected through an internal bus. Among them, the non-volatile memory stores an operating system, computer programs, and a database. The processor is used to provide computing and control capabilities, the network interface is used to communicate with an external terminal through a network connection, the internal memory is used to provide an environment for the operation of the operating system and computer programs, the computer program is executed by the processor to implement a method for detecting game studio users based on trajectory clustering, and the database is used to store data.
[0102] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. This computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the embodiments provided in the present application can include non-volatile and / or volatile memories. Non-volatile memories can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memories can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.
[0103] Those skilled in the art should understand that the technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification. The above embodiments only represent several implementation manners of the present application, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application should be subject to the appended claims.
Claims
1. A method for detecting game studio users based on trajectory clustering, characterized in that, The method includes: Obtaining user event records in the game database and encoding the user event records to obtain preprocessed data, including: encoding the user event records into the form of event numbers through an encoder; In the user event trajectory composed of the preprocessed data, determining key feature points according to the MDL cost of the feature points, and segmenting the preprocessed data into multiple subsequence segments according to the key feature points. Among them, an event trajectory is composed of multiple user event records. In the event trajectory, each record corresponds to a feature point in the trajectory graph. The determining key feature points according to the MDL cost of the feature points includes: Step 1, determining a target feature point, obtaining a first MDL cost with a key feature point existing between the starting feature point and the target feature point, and obtaining a second MDL cost with no key feature point between the starting feature point and the target feature point; Step 2, judging whether the first MDL cost is greater than the second MDL cost. If so, the feature point before the target feature point is the key feature point, and steps 1 and 2 are looped with the key feature point as the starting feature point. If not, the feature point after the target feature point is used as the target feature point to loop and execute steps 1 and 2; Obtaining the similarity between subsequence segments according to the absolute distance between the subsequence segments, clustering the subsequence segments into multiple clusters, and respectively obtaining the key subsequences of the clusters; In the user event trajectory, defining a target range based on the key subsequence, and determining studio users in the game database by analyzing the user event records within the target range.
2. The method according to claim 1, characterized in that, The segmenting the preprocessed data into multiple subsequence segments according to the key feature points includes: In the trajectory composed of the preprocessed data, obtaining the feature points between the starting feature point and the key feature point as a feature point set, and using the feature point set as the subsequence segment.
3. The method according to claim 2, characterized in that, The clustering the subsequence segments into multiple clusters according to the similarity between the subsequence segments includes: Obtaining the trajectory line segments corresponding to the subsequence segments, and respectively calculating the absolute distance between each trajectory line segment, where the absolute distance represents the similarity between the subsequence segments; Defining clusters in the preprocessed data, including: defining a clustering center, defining a class neighborhood radius, and defining a minimum number of subsequence segments; Obtaining target subsequence segments with the absolute distance less than the class neighborhood radius, and dividing the target subsequence segments into the corresponding clusters when the number of the target subsequence segments is greater than the minimum number of subsequence segments.
4. The method according to claim 3, characterized in that, The obtaining the key subsequences of the clusters includes: Calculating the average direction vector of the cluster, and sorting and encoding the feature points in the subsequence segment according to the average direction vector; Determining target feature points with the same encoding coordinates and feature point coordinates in the subsequence segment, and determining the number of the target feature points; When the number of the target feature points is greater than the minimum number of subsequence segments, calculating the encoding coordinate difference between the target feature point and the feature point before the target feature point; When the encoded coordinate difference is greater than or equal to a preset smoothing parameter, calculate the average encoded coordinates of all feature points in the subsequence segment, and decode the average encoded coordinates according to the average direction vector to obtain the average coordinates of the subsequence segment, where the average coordinates represent the key subsequence.
5. The method according to claim 1, characterized in that, The method further includes: When the game player is a studio user, obtain user event records in the game database, and encode the user event records to obtain preprocessed data. Among the user event records, multiple studio users have similar behaviors and concentrated login times. In the user event trajectory composed of the preprocessed data, determine key feature points according to the MDL cost of the feature points, and segment the preprocessed data into multiple subsequence segments according to the key feature points. According to the similarity between the subsequence segments, cluster the subsequence segments to obtain multiple clusters, and respectively obtain the key subsequences of the clusters, where the key subsequence includes the user event records generated by the studio user. Circumscribe a target range corresponding to the key subsequence in the user event trajectory, and determine studio users in the game database by analyzing the user event records within the target range.
6. A system for detecting game studio users based on trajectory clustering, characterized in that, The system includes: a game database, a reading module, a segmentation module, a clustering module, and an analysis module. The reading module is used to obtain user event records in the game database and encode the user event records to obtain preprocessed data, including: encoding the user event records into the form of event numbers through an encoder. The segmentation module is used to determine key feature points according to the MDL cost of the feature points in the user event trajectory composed of the preprocessed data, and segment the preprocessed data into multiple subsequence segments according to the key feature points. An event trajectory is composed of multiple user event records. In the event trajectory, each record corresponds to a feature point in the trajectory graph. The determination of key feature points according to the MDL cost of the feature points includes: Step 1, determine a target feature point, obtain a first MDL cost with a key feature point existing between the starting feature point and the target feature point, and obtain a second MDL cost with no key feature point existing between the starting feature point and the target feature point. Step 2, judge whether the first MDL cost is greater than the second MDL cost. If so, the feature point before the target feature point is the key feature point, and loop to execute Step 1 and Step 2 with the key feature point as the starting feature point. If not, loop to execute Step 1 and Step 2 with the feature point after the target feature point as the target feature point. The clustering module is used to obtain the similarity between the subsequence segments according to the absolute distance between the subsequence segments, cluster the subsequence segments into multiple clusters, and respectively obtain the key subsequences of the clusters. The analysis module is used to circumscribe a target range based on the key subsequence in the user event trajectory, and analyze the user event records within the target range to determine studio users in the game database.
7. A computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method for detecting game studio users based on trajectory clustering according to any one of claims 1 to 5.
8. A computer-readable storage medium, having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method for detecting game studio users according to any one of claims 1 to 5.
Citation Information
Patent Citations
Anomaly detection method and device for MMORPGs
CN107158707A
Rapid map matching method for large-scale trajectory data based on clustering
CN111694032A