User behavior trajectory generation method, device, equipment and storage medium

By receiving user login information, asynchronously pulling and escaping logs, judging rationality and sorting requests, user behavior trajectories are generated, which solves the problem of low efficiency of user behavior data generation in the existing technology and achieves fast and accurate trajectory generation and inconsistency. Quick location of legitimate requests.

CN111199423BActive Publication Date: 2024-09-20PING AN SECURITIES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201911362664.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-12-25
Publication Date
2024-09-20
Estimated Expiration
2039-12-25

AI Technical Summary

Technical Problem

Existing technology cannot quickly and accurately generate behavior trajectory data based on user behavior data, resulting in inefficiency of customer service personnel in event processing.

Method used

By receiving user login information, querying whether the user is a registered user, obtaining user identification and pulling logs asynchronously, performing log escaping and rationality judgment, sorting and marking request sequences in chronological order, and generating user behavior tracks.

Benefits of technology

It realizes the rapid and accurate generation of user behavior trajectories, ensures the accuracy of the trajectories and facilitates inquiries by customer service personnel, and improves the efficiency of event processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111199423B
    Figure CN111199423B
Patent Text Reader

Abstract

The present invention discloses a method, device, equipment and storage medium for generating a user behavior trajectory, the method comprising: receiving user login information, querying whether the user is a registered user; if so, using asynchronous operation to pull the user log from the log system; performing parameter escape on the user log to obtain an escape result; judging the rationality of the user request in the log according to the escape result and obtaining a judgment result; sorting the requests in chronological order to obtain a request sequence, marking the request sequence according to the judgment result and generating a corresponding user behavior trajectory. Since the user log is automatically pulled according to the user ID corresponding to the registered user, the rationality of the request in the log is judged after the log is escaped, and the corresponding user behavior trajectory is generated after the request sequence is marked according to the judgment result, the accuracy of the generated user behavior trajectory can be guaranteed, and the rapid positioning of unreasonable requests can be achieved, which is convenient for customer service personnel to inquire.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a method, device, equipment and storage medium for generating a user behavior trajectory. Background Art

[0002] At present, there are not many tools on the market that can query user behavior trajectories based on user behavior logs. This is mainly because the front-end and back-end systems are highly correlated, and different user behavior logs involve a wide range of data with high fragmentation, making it difficult to fully and accurately analyze all the problems that arise in user behavior.

[0003] In the prior art, when customer service personnel analyze and query user trajectories, they often need to rely on technical personnel to verify, resulting in a low timeliness in event processing. Therefore, how to quickly and accurately generate corresponding behavior trajectory data based on user behavior data for customer service personnel to query has become an urgent problem to be solved.

[0004] The above contents are only used to assist in understanding the technical solution of the present invention and do not constitute an admission that the above contents are prior art. Summary of the invention

[0005] The main purpose of the present invention is to provide a method, device, equipment and storage medium for generating a user behavior trajectory, aiming to solve the technical problem that the prior art cannot quickly and accurately generate corresponding behavior trajectory data based on the user's behavior data.

[0006] To achieve the above object, the present invention provides a method for generating a user behavior trajectory, the method comprising the following steps:

[0007] Receive user login information, and query whether the user corresponding to the user login information is a registered user;

[0008] When the user is a registered user, a user ID corresponding to the user is obtained, and a user log corresponding to the user ID is pulled from a log system using an asynchronous operation;

[0009] Perform parameter escape on the user log according to a preset log escape method to obtain an escape result;

[0010] Performing a rationality judgment on the user request recorded in the user log according to the escape result, and obtaining a judgment result;

[0011] Sorting the user requests in chronological order to obtain a request sequence, and marking the request sequence according to the judgment result;

[0012] A user behavior trajectory corresponding to the user is generated according to the marked request sequence.

[0013] Preferably, when the user is a registered user, the step of obtaining a user identifier corresponding to the user and pulling a user log corresponding to the user identifier from a log system using an asynchronous operation includes:

[0014] When the user is a registered user, obtaining registration information corresponding to the user, and extracting a user identifier corresponding to the user from the registration information;

[0015] Obtain the number of available threads in the current thread pool, and detect whether the number exceeds a preset threshold;

[0016] When the number exceeds the preset threshold, the user log corresponding to the user identifier is pulled from the log system by asynchronous operation based on the available thread.

[0017] Preferably, after the step of obtaining the number of available threads in the current thread pool and detecting whether the number exceeds a preset threshold, the method further includes:

[0018] When the number does not exceed the preset threshold, obtaining available memory of the local storage space;

[0019] Creating threads in the current thread pool based on the available memory to obtain a new thread pool;

[0020] Based on the new thread pool, an asynchronous operation is adopted to pull the user log corresponding to the user identifier from the log system.

[0021] Preferably, the step of performing parameter escape on the user log according to a preset log escape method to obtain an escape result includes:

[0022] Reading log data corresponding to the user log, and detecting whether there are characters to be escaped in the log data according to a pre-built character escape table;

[0023] If it exists, then the character to be escaped is escaped according to the character escape table to obtain an escaped character;

[0024] An escape result corresponding to the log data is determined according to the escape character and unescaped characters in the log data.

[0025] Preferably, the step of judging the rationality of the user request recorded in the user log according to the escape result and obtaining the judgment result includes:

[0026] Reading output parameters from the escape result, and matching the output parameter fields contained in the output parameters with the data stored in the preset database;

[0027] When the match is successful, performing field extraction on the user requests recorded in the user log to obtain the target fields corresponding to each user request;

[0028] Reading the attribute value corresponding to the target field, and detecting whether the attribute value is a preset value;

[0029] When the attribute value is the preset value, the user request is determined to be reasonable; and when the attribute value is not the preset value, the user request is determined to be unreasonable.

[0030] Preferably, the step of reading output parameters from the escape result and matching the output parameter fields contained in the output parameters with the data stored in the preset database includes:

[0031] Reading an output parameter from the escape result, and reading a corresponding output parameter field from the output parameter according to a preset data dimension;

[0032] Determine a target database to be matched from a preset database according to the preset data dimension;

[0033] Use exact match retrieval to find out whether there is data corresponding to the output parameter field in the target database;

[0034] If it exists, the match is determined to be successful; if it does not exist, the match is determined to be unsuccessful.

[0035] Preferably, the step of sorting the user requests in chronological order to obtain a request sequence, and marking the request sequence according to the judgment result, comprises:

[0036] Reading a request timestamp corresponding to each user request from the user log;

[0037] sorting the request timestamps in chronological order to obtain a request time sequence;

[0038] Sort each user request in the user log according to the request time sequence to obtain a request sequence;

[0039] Detecting whether there is an unreasonable request in the request sequence according to the judgment result;

[0040] If so, the unreasonable requests in the request sequence are marked by the first type of mark, and the reasonable requests in the request sequence are marked by the second type of mark.

[0041] In addition, to achieve the above-mentioned purpose, the present invention also proposes a user behavior trajectory generating device, the device comprising:

[0042] An information query module, used to receive user login information and query whether the user corresponding to the user login information is a registered user;

[0043] A log pulling module, used to obtain a user ID corresponding to the user when the user is a registered user, and to pull a user log corresponding to the user ID from a log system using an asynchronous operation;

[0044] A log escape module, used to perform parameter escape on the user log according to a preset log escape method to obtain an escape result;

[0045] A request judgment module, used to judge the rationality of the user request recorded in the user log according to the escape result, and obtain a judgment result;

[0046] A request marking module, used for sorting the user requests in chronological order to obtain a request sequence, and marking the request sequence according to the judgment result;

[0047] The trajectory generation module is used to generate a user behavior trajectory corresponding to the user according to the marked request sequence.

[0048] In addition, to achieve the above-mentioned purpose, the present invention also proposes a user behavior trajectory generating device, which includes: a memory, a processor, and a user behavior trajectory generating program stored in the memory and executable on the processor, wherein the user behavior trajectory generating program is configured to implement the steps of the user behavior trajectory generating method described above.

[0049] In addition, to achieve the above-mentioned purpose, the present invention further proposes a storage medium, on which a user behavior trajectory generation program is stored, and when the user behavior trajectory generation program is executed by a processor, the steps of the user behavior trajectory generation method described above are implemented.

[0050] The present invention receives user login information and inquires whether the user corresponding to the user login information is a registered user; when the user is a registered user, obtains the user ID corresponding to the user, and uses asynchronous operation to pull the user log corresponding to the user ID from the log system; performs parameter escape on the user log according to the preset log escape method to obtain the escape result; makes a rationality judgment on the user request recorded in the user log according to the escape result and obtains the judgment result; sorts the user requests in chronological order to obtain a request sequence, and marks the request sequence according to the judgment result; generates a corresponding user behavior track according to the marked request sequence. Since the present invention automatically pulls the user log according to the user ID corresponding to the registered user, then judges the rationality of the request in the log after escaping the log, and then generates the corresponding user behavior track after marking the request sequence according to the judgment result, it can ensure the accuracy of the generated user behavior track, and can also achieve rapid positioning of unreasonable requests, which is convenient for customer service personnel to inquire. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 It is a structural schematic diagram of a user behavior trajectory generating device in a hardware operating environment involved in an embodiment of the present invention;

[0052] Figure 2 This is a flow chart of the first embodiment of the method for generating user behavior trajectories of the present invention;

[0053] Figure 3 This is a flow chart of a second embodiment of a method for generating a user behavior trajectory according to the present invention;

[0054] Figure 4 It is a flowchart of the third embodiment of the method for generating user behavior trajectory of the present invention;

[0055] Figure 5 This is a structural block diagram of the first embodiment of the user behavior trajectory generating device of the present invention.

[0056] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0057] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0058] Reference Figure 1 , Figure 1 A schematic diagram of the structure of a user behavior trajectory generating device in a hardware operating environment involved in an embodiment of the present invention.

[0059] like Figure 1As shown, the user behavior trajectory generation device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (WIreless-FIdelity, WI-FI) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM) memory, or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0060] Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation on the user behavior trajectory generating device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0061] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating system, a data storage module, a network communication module, a user interface module, and a user behavior trajectory generation program.

[0062] exist Figure 1 In the user behavior trajectory generating device shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the user behavior trajectory generating device of the present invention can be set in the user behavior trajectory generating device, and the user behavior trajectory generating device calls the user behavior trajectory generating program stored in the memory 1005 through the processor 1001, and executes the user behavior trajectory generating method provided by the embodiment of the present invention.

[0063] The embodiment of the present invention provides a method for generating a user behavior trajectory, referring to Figure 2 , Figure 2 Schematic diagram of the flow chart of the first embodiment of the method for generating user behavior trajectory of the present invention.

[0064] In this embodiment, the user behavior trajectory generation method includes the following steps:

[0065] Step S10: receiving user login information, and querying whether the user corresponding to the user login information is a registered user;

[0066] It should be noted that the execution subject of the method of this embodiment can be an application client or a trajectory data processing platform (hereinafter referred to as the user trajectory platform) with data processing, network communication and program running functions. The application scenario of the user behavior trajectory generation method proposed in this embodiment can be that when a user encounters a problem that he cannot solve by himself during the operation of the application, he reports the problem to the customer service staff. After obtaining these problems, the customer service staff directly enters the user login information (such as mobile phone number, login account, etc.) in the user trajectory platform to query the user operation information.

[0067] It should be understood that the user trajectory platform in this embodiment is mainly used by customer service personnel to query the user's operation behavior trajectory information through the platform when receiving application usage problems reported by users, so as to determine the problem and solve the problem for the user as soon as possible.

[0068] In a specific implementation, after receiving the user login information input by the customer service personnel, the user track platform can query whether the user corresponding to the user login information is a registered user in the user system database corresponding to the platform. Specifically, the user login information can be matched in the user system database according to the user login information, and it can be determined whether the user login information corresponding to the user exists in the user system database according to the matching result. If it does not exist, it indicates that the user is not a registered user or is a user who logs in for the first time. If it exists, it indicates that the user is a registered user or a user who does not log in for the first time.

[0069] Step S20: when the user is a registered user, obtaining a user ID corresponding to the user, and pulling a user log corresponding to the user ID from a log system using an asynchronous operation;

[0070] It should be understood that the user identifier may be unique identification information that can distinguish different registered users, such as a mobile phone number, ID number, account identification number (Identity Document, ID), etc. The asynchronous operation is a parallel processing method. In this embodiment, since the log system usually stores user operation logs according to different functional modules (for example, the functional modules involved in securities trading applications may include transaction entrustment, account login, bank-to-securities transfer, total asset query, ID card update, etc.), the use of asynchronous operation to pull logs can greatly save the time of obtaining user logs.

[0071] In a specific implementation, when the user track platform finds that the user is a registered user, it can first obtain the registration information corresponding to the user, then extract the user ID from the registration information, and then use asynchronous operations to pull all user logs containing the user ID from the log system corresponding to the client application.

[0072] Step S30: performing parameter escape on the user log according to a preset log escape method to obtain an escape result;

[0073] It should be understood that in actual situations, the user logs pulled by the user track platform are usually data represented by computer language (such as strings). For example, the user logs pulled by the user track platform may be the following character data:

[0074] {"actionAuth":null,"status":1,"errmsg":null,"requestid":"AYLCAPP4D317735827749A5AAC679E50DA594AF",

[0075] "results":{"tips":null,"availableSize":null,"rmb":{"totalAssetVal":"10","totalMktVal":"10","totalMktDetail":{"stockMktVal":"30 1481.50","reverse":"0.00","reverseIncome":"0.00"},"fundMktVal":"1966.61","fundMktDetail":[{"name":"hqMktTotal","value":"0.00",

[0076] At this time, the user track platform needs to escape the user logs represented by these strings into log data that the customer service staff can understand. Specifically, the user track platform can escape the parameters of the user logs according to a pre-set escape format to obtain the escaped results.

[0077] For example, the escape result of the above character data after parameter escape is:

[0078] Total assets: 10, stock market value: 10, fund management market value: 1966.61, cash balance: 3973.58, cash available for withdrawal: 3973.58, cash treasure: +109.69.

[0079] Furthermore, to improve the efficiency of escaping, the user trajectory platform of this embodiment can pre-build a character escape table before performing parameter escaping, and the character escape table stores the escape rules corresponding to each character that needs to be escaped or the characters obtained after escaping. When performing parameter escaping, the user trajectory platform can perform parameter escape according to the character escape table.

[0080] Specifically, the user trajectory platform can read the log data corresponding to the user log, and detect whether there are characters to be escaped in the log data according to a pre-built character escape table; if so, escape the characters to be escaped according to the character escape table to obtain escaped characters; and then determine the escape result corresponding to the log data according to the escaped characters and the unescaped characters in the log data.

[0081] Step S40: judging the rationality of the user request recorded in the user log according to the escape result, and obtaining a judgment result;

[0082] It should be understood that the so-called rationality judgment of the user request is to judge whether the user request has a request failure or cannot be responded to. In this embodiment, when judging the rationality of the user request, the attribute value corresponding to the target field recorded in each user request log information in the user log escape result can be used to judge, and specifically, the attribute value corresponding to the status field can be used to judge whether each user request is reasonable.

[0083] In a specific implementation, the user track platform can make a rationality judgment on the user requests recorded in the user log according to the escape result, and then obtain a judgment result on whether each user request is reasonable.

[0084] Step S50: sorting the user requests in chronological order to obtain a request sequence, and marking the request sequence according to the judgment result;

[0085] It is understandable that since the location where user logs are stored in the log system is not necessarily the same, simply pulling user logs from the log system cannot directly know the order in which each user request in the log occurs. At this time, in order to further investigate the specific location of the problem reported by the user, the user track platform needs to first sort the user requests in chronological order to obtain the request sequence, and then mark the user requests based on the judgment result of the rationality judgment, that is, mark whether the user request is reasonable.

[0086] In this embodiment, for unreasonable requests, the user track platform may use a distinguishing mark to them, so that when the user track platform displays these unreasonable user requests, it is easy for customer service personnel to view them.

[0087] In a specific implementation, the user trajectory platform can read the request timestamp corresponding to each user request from the user log; then sort the request timestamps in chronological order to obtain a request time sequence; then sort the user requests in the user log according to the request time sequence to obtain a request sequence; finally, detect whether there are unreasonable requests in the request sequence according to the judgment result; if so, mark the unreasonable requests in the request sequence with a first type of mark, and mark the reasonable requests in the request sequence with a second type of mark.

[0088] Before the user track platform sorts the request timestamps in chronological order, it can first convert the request timestamps into a preset time format, such as a time parameter in the format of "Y / M / D: year / month / day", and then sort the time parameters based on the chronological order to obtain the request time sequence. The first type of mark is a mark corresponding to an unreasonable request, and the second type of mark is a mark corresponding to a reasonable request.

[0089] Step S60: generating a user behavior trajectory corresponding to the user according to the marked request sequence.

[0090] It should be noted that before executing step S60, a display template of a request sequence may be pre-configured so that after obtaining the marked request sequence, the user trajectory platform writes these marked request sequences into the display template to obtain the user behavior trajectory corresponding to the user.

[0091] This embodiment receives user login information and queries whether the user corresponding to the user login information is a registered user; when the user is a registered user, obtains the user ID corresponding to the user, and uses asynchronous operation to pull the user log corresponding to the user ID from the log system; escapes the parameters of the user log according to the preset log escape method to obtain the escape result; makes a rationality judgment on the user request recorded in the user log according to the escape result and obtains the judgment result; sorts the user requests in chronological order to obtain the request sequence, and marks the request sequence according to the judgment result; generates the corresponding user behavior track according to the marked request sequence. Since the user log is automatically pulled according to the user ID corresponding to the registered user, and then the rationality of the request in the log is judged after the log is escaped, and then the corresponding user behavior track is generated after the request sequence is marked according to the judgment result, the accuracy of the generated user behavior track can be guaranteed, and the unreasonable request can be quickly located, which is convenient for customer service personnel to inquire.

[0092] refer to Figure 3 , Figure 3 Schematic diagram of the flow chart of the second embodiment of the method for generating user behavior trajectory of the present invention.

[0093] Based on the above first embodiment, in this embodiment, step S20 includes:

[0094] Step S201: when the user is a registered user, obtaining registration information corresponding to the user, and extracting a user identifier corresponding to the user from the registration information;

[0095] It should be understood that when users register an account, they usually enter registration information such as account number, mobile phone number or ID number. For securities trading systems, users also need to enter information such as the bank card number corresponding to the third-party escrow bank account.

[0096] Therefore, when the user trajectory platform finds that the user is a registered user, it can obtain the registration information corresponding to the user from the user system database, and then select any one of the account number, mobile phone number, ID number or bank card number contained in the registration information as the user ID corresponding to the user.

[0097] Step S202: obtaining the number of available threads in the current thread pool, and detecting whether the number exceeds a preset threshold;

[0098] It should be understood that asynchronous operations usually process multiple tasks simultaneously in a parallel processing manner, and the parallel processing method usually needs to be implemented based on the currently available threads in the thread pool. Therefore, in this embodiment, before performing asynchronous operations, the user track platform needs to obtain the number of available threads in the current thread pool of the platform, and then detect whether the number exceeds a preset threshold. If it exceeds, it indicates that these available threads can be directly called to pull user logs at this time, so as to further improve the efficiency of obtaining user logs. Of course, the specific value of the preset threshold can be set by yourself, and this embodiment does not limit this.

[0099] Considering the actual situation, the availability of threads does not mean that the threads are idle, and there may be threads currently being occupied or called among the available threads. Therefore, after determining the available threads in the current thread pool, the user track platform of this embodiment can first detect whether these available threads are currently called, and then filter the available threads according to the detection results to obtain threads that are not currently called, and then use asynchronous operations to pull user logs based on these uncalled threads.

[0100] Step S203: when the number exceeds the preset threshold, the user log corresponding to the user identifier is pulled from the log system by asynchronous operation based on the available thread.

[0101] In a specific implementation, if the user track platform detects that the number of available threads exceeds a preset threshold, the user log corresponding to the user ID can be directly pulled from the log system using asynchronous operations based on the available threads.

[0102] Furthermore, if the user track platform detects that the number of available threads does not exceed the preset threshold, in order to ensure that asynchronous operations can still be used to pull user logs, the user track platform can first obtain the available memory of the local storage space when the number does not exceed the preset threshold; then create threads in the current thread pool based on the available memory to obtain a new thread pool; and then use asynchronous operations based on the new thread pool to pull the user log corresponding to the user identifier from the log system, thereby ensuring that asynchronous operations can be used smoothly to pull user logs.

[0103] When the user is a registered user, this embodiment obtains the registration information corresponding to the user and extracts the user identifier corresponding to the user from the registration information; obtains the number of available threads in the current thread pool, and detects whether the number exceeds a preset threshold; when the number exceeds the preset threshold, an asynchronous operation is adopted based on the available threads to pull the user log corresponding to the user identifier from the log system. Since whether thread creation is required is determined by the number of available threads in the current thread pool, if not, an asynchronous operation is adopted based on the available threads to pull the user log corresponding to the user identifier from the log system, thereby improving the efficiency of log pulling.

[0104] refer to Figure 4 , Figure 4 Schematic diagram of the flow chart of the third embodiment of the method for generating user behavior trajectory of the present invention.

[0105] Based on the above embodiments, in this embodiment, step S40 may specifically include:

[0106] Step S401: reading output parameters from the escape result, and matching the output parameter fields contained in the output parameters with the data stored in the preset database;

[0107] It should be understood that the output parameter, i.e. the data output after the input parameter (input parameter) is called by the corresponding function, is usually called the output parameter in the computer field. Usually, the output parameter contains different fields, such as the user account field: usercode, the timestamp field: timestamp, the system code field: system, the request status field: status, etc.

[0108] In actual applications, the user trajectory platform can read output parameters from the escape result, and then match the output parameter fields similar to the above-listed ones contained in the output parameters with the data stored in the preset database.

[0109] Specifically, the user trajectory platform can read the output parameter from the escape result, and read the corresponding output parameter field from the output parameter according to the preset data dimension; determine the target database to be matched from the preset database according to the preset data dimension; use exact matching retrieval to find out whether there is data corresponding to the output parameter field in the target database; if so, it is determined that the match is successful, and if not, it is determined that the match fails.

[0110] It should be noted that the preset data dimensions may be pre-set bases for data reading, which specify which types of data need to be read. In this embodiment, the preset data dimensions include but are not limited to: account login, request time, request processing results, etc.

[0111] It should be understood that the so-called exact match search refers to a search method in which the search term is exactly the same as a field in the resource library. In this embodiment, the exact match search method can ensure the accuracy of the final matching result.

[0112] Step S402: when the match is successful, performing field extraction on the user requests recorded in the user log to obtain the target field corresponding to each user request;

[0113] It should be noted that the target field in this embodiment is the status field corresponding to each user request. After successfully matching the output parameter field contained in the output parameter, the user track platform can perform field extraction on all user requests recorded in the user log to obtain the status field corresponding to each user request.

[0114] Step S403: reading the attribute value corresponding to the target field, and detecting whether the attribute value is a preset value;

[0115] It should be noted that the status field is a status field. Considering that in actual applications, there is only one normal / correct request status, while there may be multiple abnormal / error request statuses, the preset value in this embodiment is preferably zero or true. That is, when the attribute value corresponding to the status field is zero or true, the user request is reasonable, otherwise when the attribute value corresponding to the status field is non-zero or false, it indicates that the user request is unreasonable.

[0116] In a specific implementation, after extracting the status field corresponding to each user request, the user track platform can read the attribute value corresponding to the field, and then detect whether the attribute value is a preset value.

[0117] Step S404: when the attribute value is the preset value, the user request is determined to be reasonable; when the attribute value is not the preset value, the user request is determined to be unreasonable.

[0118] In a specific implementation, when the user trajectory platform detects that the attribute value corresponding to the target field is a preset value, it can determine that the user request is reasonable, otherwise it can determine that the user request is unreasonable.

[0119] This embodiment reads the output parameter from the escape result, and matches the output parameter field contained in the output parameter with the data stored in the preset database; when the match is successful, the field extraction is performed on the user request recorded in the user log to obtain the target field corresponding to each user request; the attribute value corresponding to the target field is read, and it is detected whether the attribute value is a preset value; when the attribute value is the preset value, the user request is determined to be reasonable, and when the attribute value is not the preset value, the user request is determined to be unreasonable. This embodiment judges whether the request is reasonable based on the field attribute value corresponding to the user request recorded in the user log, thereby improving the efficiency of judging the rationality of the request, and at the same time avoids the omission of user requests by matching the output parameter field contained in the output parameter with the data stored in the preset database.

[0120] In addition, an embodiment of the present invention further provides a storage medium, on which a user behavior trajectory generation program is stored. When the user behavior trajectory generation program is executed by a processor, the steps of the user behavior trajectory generation method described above are implemented.

[0121] Reference Figure 5 , Figure 5 This is a structural block diagram of the first embodiment of the user behavior trajectory generating device of the present invention.

[0122] like Figure 5 As shown, the user behavior trajectory generating device proposed in the embodiment of the present invention includes:

[0123] The information query module 501 is used to receive user login information and query whether the user corresponding to the user login information is a registered user;

[0124] The log pulling module 502 is used to obtain the user ID corresponding to the user when the user is a registered user, and to pull the user log corresponding to the user ID from the log system by asynchronous operation;

[0125] The log escape module 503 is used to perform parameter escape on the user log according to a preset log escape method to obtain an escape result;

[0126] A request judgment module 504 is used to judge the rationality of the user request recorded in the user log according to the escape result and obtain a judgment result;

[0127] A request marking module 505, used to sort the user requests in chronological order to obtain a request sequence, and mark the request sequence according to the judgment result;

[0128] The track generation module 506 is used to generate a user behavior track corresponding to the user according to the marked request sequence.

[0129] This embodiment receives user login information and queries whether the user corresponding to the user login information is a registered user; when the user is a registered user, obtains the user ID corresponding to the user, and uses asynchronous operation to pull the user log corresponding to the user ID from the log system; escapes the parameters of the user log according to the preset log escape method to obtain the escape result; makes a rationality judgment on the user request recorded in the user log according to the escape result and obtains the judgment result; sorts the user requests in chronological order to obtain the request sequence, and marks the request sequence according to the judgment result; generates the corresponding user behavior track according to the marked request sequence. Since the user log is automatically pulled according to the user ID corresponding to the registered user, and then the rationality of the request in the log is judged after the log is escaped, and then the corresponding user behavior track is generated after the request sequence is marked according to the judgment result, the accuracy of the generated user behavior track can be guaranteed, and the unreasonable request can be quickly checked, which is convenient for customer service personnel to inquire.

[0130] Based on the first embodiment of the user behavior trajectory generating device of the present invention, a second embodiment of the user behavior trajectory generating device of the present invention is proposed.

[0131] In this embodiment, the log pulling module 502 is also used to obtain the registration information corresponding to the user when the user is a registered user, and extract the user identifier corresponding to the user from the registration information; obtain the number of available threads in the current thread pool, and detect whether the number exceeds a preset threshold; when the number exceeds the preset threshold, use asynchronous operations based on the available threads to pull the user log corresponding to the user identifier from the log system.

[0132] Furthermore, the log pulling module 502 is also used to obtain the available memory of the local storage space when the number does not exceed the preset threshold; create a thread in the current thread pool based on the available memory to obtain a new thread pool; and use asynchronous operations to pull the user log corresponding to the user identifier from the log system based on the new thread pool.

[0133] Furthermore, the log escape module 503 is also used to read the log data corresponding to the user log, and detect whether there are characters to be escaped in the log data according to a pre-constructed character escape table; if so, escape the characters to be escaped according to the character escape table to obtain escaped characters; and determine the escape result corresponding to the log data according to the escaped characters and the unescaped characters in the log data.

[0134] Furthermore, the request judgment module 504 is also used to read output parameters from the escape result, and match the output parameter fields contained in the output parameters with the data stored in the preset database; when the match is successful, perform field extraction on the user requests recorded in the user log to obtain the target field corresponding to each user request; read the attribute value corresponding to the target field, and detect whether the attribute value is a preset value; when the attribute value is the preset value, determine that the user request is reasonable, and when the attribute value is not the preset value, determine that the user request is unreasonable.

[0135] Furthermore, the request judgment module 504 is also used to read output parameters from the escape result, read corresponding output parameter fields from the output parameters according to preset data dimensions; determine the target database to be matched from the preset database according to the preset data dimensions; use exact match retrieval to find out whether there is data corresponding to the output parameter field in the target database; if so, determine that the match is successful, if not, determine that the match fails.

[0136] Furthermore, the request marking module 505 is also used to read the request timestamp corresponding to each user request from the user log; sort the request timestamps in chronological order to obtain a request time sequence; sort the user requests in the user log according to the request time sequence to obtain a request sequence; detect whether there are unreasonable requests in the request sequence according to the judgment result; if so, mark the unreasonable requests in the request sequence with a first type of mark, and mark the reasonable requests in the request sequence with a second type of mark.

[0137] Other embodiments or specific implementations of the user behavior trajectory generating device of the present invention can refer to the above-mentioned method embodiments, which will not be described in detail here.

[0138] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0139] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0140] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory / random access memory, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0141] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for generating a user behavior trajectory, characterized in that: The method comprises: Receive user login information, and query whether the user corresponding to the user login information is a registered user; When the user is a registered user, a user ID corresponding to the user is obtained, and a user log corresponding to the user ID is pulled from a log system using an asynchronous operation; Perform parameter escape on the user log according to a preset log escape method to obtain an escape result; Performing a rationality judgment on the user request recorded in the user log according to the escape result, and obtaining a judgment result, wherein the rationality judgment is to judge whether the user request has a request failure or cannot be responded to; Sorting the user requests in chronological order to obtain a request sequence, and marking the request sequence according to the judgment result; Generate a user behavior trajectory corresponding to the user according to the marked request sequence; Wherein, when the user is a registered user, the step of obtaining a user identifier corresponding to the user and pulling a user log corresponding to the user identifier from a log system using an asynchronous operation includes: When the user is a registered user, obtaining registration information corresponding to the user, and extracting a user identifier corresponding to the user from the registration information; Obtain the number of available threads in the current thread pool, and detect whether the number exceeds a preset threshold; When the number exceeds the preset threshold, the user log corresponding to the user identifier is pulled from the log system by asynchronous operation based on the available thread.

2. The method according to claim 1, characterized in that After the steps of obtaining the number of available threads in the current thread pool and detecting whether the number exceeds a preset threshold, the method further includes: When the number does not exceed the preset threshold, obtaining available memory of the local storage space; Creating threads in the current thread pool based on the available memory to obtain a new thread pool; Based on the new thread pool, an asynchronous operation is adopted to pull the user log corresponding to the user identifier from the log system.

3. The method according to claim 1, characterized in that The step of performing parameter escape on the user log according to a preset log escape method to obtain an escape result includes: Reading log data corresponding to the user log, and detecting whether there are characters to be escaped in the log data according to a pre-built character escape table; If it exists, then the character to be escaped is escaped according to the character escape table to obtain an escaped character; An escape result corresponding to the log data is determined according to the escape character and unescaped characters in the log data.

4. The method according to claim 3, characterized in that The step of judging the rationality of the user request recorded in the user log according to the escape result and obtaining the judgment result includes: Reading output parameters from the escape result, and matching the output parameter fields contained in the output parameters with the data stored in the preset database; When the match is successful, performing field extraction on the user requests recorded in the user log to obtain the target fields corresponding to each user request; Reading the attribute value corresponding to the target field, and detecting whether the attribute value is a preset value; When the attribute value is the preset value, the user request is determined to be reasonable; and when the attribute value is not the preset value, the user request is determined to be unreasonable.

5. The method according to claim 4, characterized in that The step of reading the output parameter from the escape result and matching the output parameter field contained in the output parameter with the data stored in the preset database includes: Reading an output parameter from the escape result, and reading a corresponding output parameter field from the output parameter according to a preset data dimension; Determine a target database to be matched from a preset database according to the preset data dimension; Use exact match retrieval to find out whether there is data corresponding to the output parameter field in the target database; If it exists, the match is determined to be successful; if it does not exist, the match is determined to be unsuccessful.

6. The method according to any one of claims 1 to 5, characterized in that: The step of sorting the user requests in chronological order to obtain a request sequence, and marking the request sequence according to the judgment result, comprises: Reading a request timestamp corresponding to each user request from the user log; sorting the request timestamps in chronological order to obtain a request time sequence; Sort each user request in the user log according to the request time sequence to obtain a request sequence; Detecting whether there is an unreasonable request in the request sequence according to the judgment result; If so, the unreasonable requests in the request sequence are marked by the first type of mark, and the reasonable requests in the request sequence are marked by the second type of mark.

7. A user behavior trajectory generating device, characterized in that: The device comprises: An information query module, used to receive user login information and query whether the user corresponding to the user login information is a registered user; A log pulling module, used to obtain a user ID corresponding to the user when the user is a registered user, and to pull a user log corresponding to the user ID from a log system using an asynchronous operation; A log escape module, used to perform parameter escape on the user log according to a preset log escape method to obtain an escape result; A request judgment module, used to judge the rationality of the user request recorded in the user log according to the escape result, and obtain a judgment result, wherein the rationality judgment is to judge whether the user request has a request failure or cannot be responded to; A request marking module, used for sorting the user requests in chronological order to obtain a request sequence, and marking the request sequence according to the judgment result; A trajectory generation module, used to generate a user behavior trajectory corresponding to the user according to the marked request sequence; The log pulling module is also used to obtain the registration information corresponding to the user when the user is a registered user, and extract the user identifier corresponding to the user from the registration information; obtain the number of available threads in the current thread pool, and detect whether the number exceeds a preset threshold; when the number exceeds the preset threshold, use asynchronous operations based on the available threads to pull the user log corresponding to the user identifier from the log system.

8. A user behavior trajectory generation device, characterized in that: The device comprises: a memory, a processor, and a user behavior trajectory generation program stored in the memory and executable on the processor, wherein the user behavior trajectory generation program is configured to implement the steps of the user behavior trajectory generation method according to any one of claims 1 to 6.

9. A storage medium, characterized in that: The storage medium stores a user behavior trajectory generation program, and when the user behavior trajectory generation program is executed by the processor, the steps of the user behavior trajectory generation method according to any one of claims 1 to 6 are implemented.