A method and device for data processing
By determining the response strategy based on user behavior instructions, realizing behavior details recording and real-time statistics of multi-dimensional behavior data, the problems of poor reusability and high cost of data storage and statistics in the prior art are solved, and data processing efficiency and universality are improved.
Patent Information
- Application Number
- CN202311293800.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-08
- Publication Date
- 2025-04-08
AI Technical Summary
Existing content systems use different persistence layer technologies for data storage and statistics, which makes the technology difficult to reuse, high transformation costs, poor versatility, and high development and maintenance costs.
By determining the response strategy based on user behavior instructions, we can realize the recording of behavior details and real-time statistics of multi-dimensional behavior data, improve data processing efficiency and reduce development and maintenance costs.
It improves the efficiency of data processing, enhances the universality of the method, reduces development and maintenance costs, and realizes persistent storage of behavior details and real-time statistics of behavior data.
Smart Images

Figure CN119782381A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method and device for data processing. Background Art
[0002] With the development of Internet technology, users can watch videos or browse articles through various content systems, such as learning centers, news information, etc. When users watch videos or browse articles on various content systems, each content system can count data on dimensions such as users, videos or articles, and authors for data analysis or display.
[0003] In the related technologies, each content system uses different persistence layer technologies when storing data, and the dimensions of data statistics are also different. The persistence layer technologies between content systems are difficult to reuse and the modification cost is high when reused. The versatility is poor, and the development cost and maintenance cost are high. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides a method and device for data processing, which determines a corresponding response strategy according to the behavior type indicated by the user behavior instruction, so as to realize the recording of behavior details corresponding to the behavior instruction and real-time statistics of behavior data in multiple dimensions according to the response strategy, thereby improving the efficiency of data processing. The method is also highly versatile and reduces development and maintenance costs.
[0005] To achieve the above object, according to one aspect of an embodiment of the present invention, a data processing method is provided, comprising:
[0006] In response to receiving a behavior instruction from a user, the behavior instruction indicating a behavior type, determining a response strategy corresponding to the behavior type;
[0007] Determine, according to the response strategy, a behavior record result corresponding to the behavior instruction;
[0008] Behavior statistics results of multiple dimensions corresponding to the behavior instructions are determined according to the behavior recording results.
[0009] Optionally, the behavior instruction indicates a target user corresponding to the user, and after determining the behavior statistics results of multiple dimensions corresponding to the behavior instruction according to the behavior record result, the method further includes:
[0010] Determining a reach strategy corresponding to the behavior type, wherein the reach strategy indicates a reach channel;
[0011] Send a contact message corresponding to the behavior type to the target user through the contact channel.
[0012] Optionally, determining a response strategy corresponding to the behavior type includes:
[0013] determining a behavior model corresponding to the behavior type;
[0014] A response strategy corresponding to the behavior model is determined.
[0015] Optionally, determining a behavior record result corresponding to the behavior instruction according to the response strategy includes:
[0016] Acquire the behavior details corresponding to the behavior instruction; the behavior details include user identification, content identification, author identification and behavior type;
[0017] If the behavior type is the first type whose number of times can be accumulated, directly record the behavior details as the behavior record result;
[0018] If the behavior type is the second type whose number of times cannot be accumulated, the behavior record result is determined according to the behavior details and the stored behavior record results.
[0019] Optionally, determining the behavior record result according to the behavior details and stored behavior record results includes:
[0020] Determine whether there is a target behavior record result in the stored behavior record results that has the same user ID, content ID, author ID, and behavior type as those in the behavior details;
[0021] If not, directly use the behavior details as the behavior record result;
[0022] If so, determine whether the behavior state indicated by the behavior type in the behavior details is the same as the behavior state indicated in the target behavior record result. If they are not the same, record the behavior details as the behavior record result.
[0023] Optionally, the multiple dimensions include a user dimension, a content dimension, and an author dimension, the behavior statistics result is stored in a cache, and the behavior statistics results of multiple dimensions corresponding to the behavior instruction are determined according to the behavior record result, including:
[0024] In response to monitoring a newly added behavior record result, obtaining a user identifier, a content identifier, an author identifier, and a behavior type from the behavior record result;
[0025] The behavior statistics results of the user dimension, the content dimension and the author dimension are updated according to the user identifier, the content identifier, the author identifier and the behavior type.
[0026] Optionally, updating the behavior statistics results of the user dimension, content dimension and author dimension includes:
[0027] For the user dimension, the total number of behavior types corresponding to the user identifier is updated according to the behavior type, and the content list corresponding to the user identifier is updated according to the content identifier and the behavior type, so as to obtain a behavior statistical result of the user dimension;
[0028] For the content dimension, the total number of behavior types corresponding to the content identifier is updated according to the behavior type, and the user list corresponding to the content identifier is updated according to the behavior type and the user identifier, so as to obtain a behavior statistical result of the content dimension;
[0029] For the author dimension, the total number of behavior types corresponding to the author ID is updated according to the behavior type, and the user list corresponding to the author ID is updated according to the behavior type and the user ID, so as to obtain the behavior statistics result of the author dimension.
[0030] According to another aspect of an embodiment of the present invention, there is provided a data processing device, including:
[0031] A first determination module, in response to receiving a user's behavior instruction, the behavior instruction indicating a behavior type, determines a response strategy corresponding to the behavior type;
[0032] A second determination module determines a behavior record result corresponding to the behavior instruction according to the response strategy;
[0033] The third determination module determines the behavior statistical results of multiple dimensions corresponding to the behavior instruction according to the behavior recording result.
[0034] According to another aspect of an embodiment of the present invention, there is provided an electronic device, including:
[0035] one or more processors;
[0036] a storage device for storing one or more programs,
[0037] When the one or more programs are executed by the one or more processors, the one or more processors implement the data processing method provided by the present invention.
[0038] According to another aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, the data processing method provided by the present invention is implemented.
[0039] An embodiment of the above invention has the following advantages or beneficial effects: after receiving the user's behavior instruction, the data processing method determines the corresponding response strategy according to the behavior type indicated by the behavior instruction; then determines the behavior record result corresponding to the behavior instruction according to the response strategy; and determines the behavior statistics results of multiple dimensions corresponding to the behavior instruction according to the behavior record result. This method provides a universal method for user behavior recording and user behavior data statistics. The persistence layer technology is implemented based on the storage method of database and cache, thereby realizing the persistent storage of behavior details and real-time statistics of behavior data, and improving the efficiency of data processing; this method has strong versatility and can be applied to various content systems, reducing development costs and maintenance costs.
[0040] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0042] Figure 1 is a schematic diagram of the main flow of a data processing method according to an embodiment of the present invention;
[0043] Figure 2 is a schematic diagram of the main flow of another data processing method according to an embodiment of the present invention;
[0044] Figure 3 It is a schematic diagram of the main flow of a data processing method according to an embodiment of the present invention;
[0045] Figure 4 is a schematic diagram of main modules of a data processing device according to an embodiment of the present invention;
[0046] Figure 5 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;
[0047] Figure 6 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0048] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0049] It should be noted that the collection, collection, updating, analysis, processing, use, transmission, storage and other aspects of user personal information involved in the technical solution of this disclosure are in compliance with the provisions of relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Necessary measures are taken for user personal information to prevent illegal access to user personal information data and maintain the security of user personal information, network security and national security.
[0050] Figure 1 is a schematic diagram of the main flow of a data processing method according to an embodiment of the present invention, such as Figure 1 As shown, the method comprises the following steps:
[0051] Step S101: in response to receiving a behavior instruction from a user, the behavior instruction indicates a behavior type, determining a response strategy corresponding to the behavior type;
[0052] Step S102: determining the behavior record result corresponding to the behavior instruction according to the response strategy;
[0053] Step S103: Determine the behavior statistics results of multiple dimensions corresponding to the behavior instructions according to the behavior recording results.
[0054] In the embodiment of the present invention, the user's behavior instruction may be an instruction for the user to operate a video, article or author in the content system, and the operation behavior may be a click behavior, wherein the content system may be a system that provides videos or articles, such as a learning center system, a news information system, etc. The behavior instruction indicates the behavior type, and the behavior type may include behavior types such as liking, collecting, and commenting on an article or video, and may also include behavior types such as subscribing to a service account or following an author.
[0055] In the embodiment of the present invention, a response strategy corresponding to the behavior type can be determined according to the behavior type indicated by the behavior instruction, that is, different behavior types may correspond to different response strategies, and different data recording and data statistics processes can be executed according to different response strategies. Specifically, determining the response strategy corresponding to the behavior type includes: determining a behavior model corresponding to the behavior type; and determining a response strategy corresponding to the behavior model.
[0056] In an embodiment of the present invention, before determining the behavior model corresponding to the behavior type, the behavior model is pre-constructed, and a correspondence between the behavior type and the behavior model is constructed. The behavior model may include at least one behavior model of following, liking, collecting, browsing, commenting, asking questions, subscribing, answering, etc., and a correspondence between the behavior model and the response strategy is pre-constructed, so that the corresponding behavior model can be matched according to the behavior type indicated by the user behavior instruction, and then the response strategy corresponding to the matched behavior model can be determined according to the correspondence between the behavior model and the response strategy.
[0057] In an embodiment of the present invention, determining a behavior record result corresponding to a behavior instruction according to a response strategy includes:
[0058] Obtaining behavior details corresponding to the behavior instruction; the behavior details include user ID, content ID, author ID and behavior type;
[0059] If the behavior type is the first type with cumulative times, the behavior details are directly recorded as the behavior record result;
[0060] If the behavior type is the second type whose times cannot be accumulated, the behavior record result is determined according to the behavior details and the stored behavior record results.
[0061] In an embodiment of the present invention, after receiving a user's behavior instruction, the behavior details corresponding to the behavior instruction are obtained, and the behavior details include a user identifier, a content identifier, an author identifier, and a behavior type. The user identifier is the user's identity identifier, such as a user ID, and the content identifier is the identifier of a video or article. The author identifier can be the identity identifier of a target user. The target user can be the author of the video or article, such as a service account, or other users associated with the video or article, such as a commentator. The behavior type can be one of collection, comment, subscription, like, browse, follow, question, answer, etc. The behavior details can also include the time when the behavior occurs.
[0062] In the embodiment of the present invention, if the behavior type is the first type whose number of times can be accumulated, such as browsing, commenting, asking questions, answering, liking, etc., the behavior details can be directly used as the behavior record result, and then the behavior record result is stored in a database or memory. The database can be a relational database, such as a MySQL database, which is used to persistently store the behavior record result. If the behavior type is the second type whose number of times cannot be accumulated, such as collecting, following, subscribing, etc., the behavior record result corresponding to the behavior instruction is determined based on the behavior details and the behavior record results stored in the database.
[0063] In the embodiment of the present invention, Figure 2 As shown, the behavior record result is determined based on the behavior details and the stored behavior record results, including:
[0064] Step S201: Determine whether there is a target behavior record result in the stored behavior record results that has the same user ID, content ID, author ID and behavior type as the behavior details; if not, execute step S202; if yes, execute step S203;
[0065] Step S202: directly taking the behavior details as the behavior record result;
[0066] Step S203: Determine whether the behavior state indicated by the behavior type in the behavior details is the same as the behavior state indicated in the target behavior record result; if so, execute step S204; if not, execute step S205;
[0067] Step S204: not storing the behavior details as the behavior record result;
[0068] Step S205: storing the behavior detail record as the behavior record result.
[0069] In an embodiment of the present invention, it is first determined whether there is a target behavior record result in the database that is the same as the user identifier, content identifier, author identifier and behavior type in the behavior details, that is, whether the user has performed an operation behavior of the behavior type for the video or article. For example, the behavior instruction indicates that user A clicks the favorite button for article C of author B, and the behavior details include user A, favorites, author B and article C. It is determined whether there is a target behavior record result including user A, favorites, author B and article C in the behavior record results stored in the database. If not, it means that user A has not clicked the favorite button for article C of author B, and the behavior details can be directly stored in the database as the behavior record result. If it exists, it means that user A has clicked the favorite button for article C of author B. Since the number of times cannot be accumulated, if the user clicks the favorite button again, it is determined whether the behavior state indicated by the behavior type in the behavior details is the same as the behavior state indicated in the target behavior record result, that is, whether the behavior state indicated by the favorite behavior type in the behavior details is the same as the behavior state indicated by the favorite behavior type in the target behavior record result. If they are not the same, the behavior details are stored in the database as the behavior record result. If they are the same, the behavior details will not be stored in the database as the behavior record result. For example, if the behavior status indicated by the favorite behavior type in the behavior details is favorite, and the behavior status indicated by the favorite behavior type in the target behavior result is favorite, since the behavior status is the same, the behavior details will no longer be stored, and prompt information corresponding to the behavior type can be generated, such as generating prompt information containing "already collected"; if the behavior status indicated by the favorite behavior type in the behavior details is canceled collection, and the behavior status indicated by the favorite behavior type in the target behavior result is favorite, the behavior status is different, then the behavior details can be stored in the database as the behavior record result.
[0070] In the embodiment of the present invention, the multiple dimensions include user dimension, content dimension and author dimension, the behavior statistics result is stored in the cache, and the behavior statistics results of the multiple dimensions corresponding to the behavior instruction are determined according to the behavior record result, including:
[0071] In response to monitoring the newly added behavior record result, obtaining the user identifier, content identifier, author identifier and behavior type from the behavior record result;
[0072] Based on the user ID, content ID, author ID and behavior type, the behavior statistics results in the user dimension, content dimension and author dimension are updated.
[0073] In an embodiment of the present invention, after determining the behavior record results corresponding to the behavior instructions according to the response strategy, the behavior statistics results of multiple dimensions corresponding to the behavior instructions can be determined according to the behavior record results. The behavior statistics results include multiple dimensions, including user dimensions, content dimensions, and author dimensions, etc. The dimensions can also be expanded according to business needs. Among them, the behavior statistics results are stored in a cache, such as a Redis cache or other distributed cache. The behavior record results are obtained from the database in real time or at a fixed time, and then the behavior statistics results are updated in real time according to the behavior record results to achieve real-time statistics of data. The embodiment of the present invention uses a database to store behavior record results, and uses a cache to update behavior statistics results in real time. The persistence layer technology is implemented by combining the database and the cache, thereby improving the efficiency of data processing.
[0074] In an embodiment of the present invention, the behavior record results in the database are monitored. When it is detected that there are new behavior record results in the database, the user ID, content ID, author ID and behavior type are obtained from the behavior record results, and then the behavior statistics results in the user dimension, content dimension and author dimension are updated to achieve real-time update of the behavior statistics results.
[0075] Among them, the behavioral statistics results in the user dimension include the number of each behavior type corresponding to the user and the number of content identifiers or author identifiers corresponding to each behavior type. For example, the behavioral statistics results in the user dimension may include: the total number of follows and the follow-up list corresponding to follow; the total number of likes and the list of liked content (videos or articles) corresponding to like; the total number of subscriptions and the subscription list corresponding to subscription; the total number of questions and the question list corresponding to question; the total number of answers and the answer list corresponding to answer; the total number of comments and the comment content list corresponding to comment; the total number of views and the browse content list corresponding to browse; the total number of collections and the collection content list corresponding to collection.
[0076] The behavioral statistics results of the content dimension include the number of each behavior type corresponding to the content identifier and the user list corresponding to each behavior type. For example, the behavioral statistics results of the content dimension include: the total number of collections and the list of collection users corresponding to collections; the total number of likes and the list of like users corresponding to likes; the total number of comments and the list of comment users corresponding to comments; the total number of views and the list of browsing users corresponding to views.
[0077] The behavioral statistics results of the author dimension include the total number of each behavior type corresponding to the author identification and the user list corresponding to each behavior type. For example, the behavioral statistics results of the author dimension include: the total number of likes and the list of like users corresponding to likes; the total number of collections and the list of collection users corresponding to favorites; the total number of views and the list of browsing users corresponding to browses; and the total number of comments and the list of commenting users corresponding to comments.
[0078] In the embodiment of the present invention, updating the behavior statistics results of the user dimension, content dimension and author dimension includes:
[0079] For the user dimension, the total number of behavior types corresponding to the user identifier is updated according to the behavior type, and the content list corresponding to the user identifier is updated according to the content identifier and the behavior type, so as to obtain the behavior statistics result of the user dimension;
[0080] For the content dimension, the total number of behavior types corresponding to the content identifier is updated according to the behavior type, and the user list corresponding to the content identifier is updated according to the behavior type and the user identifier, so as to obtain the behavior statistics result of the content dimension;
[0081] For the author dimension, the total number of behavior types corresponding to the author ID is updated according to the behavior type, and the user list corresponding to the author ID is updated according to the behavior type and the user ID, so as to obtain the behavior statistics result of the author dimension.
[0082] In an embodiment of the present invention, for the user dimension, the total number of behavior types corresponding to the user identifier is updated according to the behavior type, and then the content list corresponding to the content identifier is updated according to the content identifier and the behavior type. Taking the behavior type in the behavior record result as collection as an example, the total number of collections is updated, and the collection content list is updated, that is, the content corresponding to the content identifier is added to the collection content list, so as to obtain the behavior statistics result of the user dimension. For the content dimension, the total number of behavior types corresponding to the content identifier is updated according to the behavior type, and the user list corresponding to the content identifier is updated according to the behavior type and the user identifier. For example, the behavior record result includes user A, collection, author B, and article C. The content indicated by the content identifier can be a video or an article. In the content dimension, the total number of the article collected and the list of users who collected the article are updated. For the author dimension, the total number of behavior types corresponding to the author identifier is updated according to the behavior type, and the list of users corresponding to the author identifier is updated according to the behavior type and the user identifier, that is, the total number of the author's articles or videos collected and the list of users who collected the author's articles or videos are updated.
[0083] In an embodiment of the present invention, the behavior instruction indicates a target user corresponding to the user. After determining the behavior statistical results of multiple dimensions corresponding to the behavior instruction based on the behavior record results, it also includes: determining a contact strategy corresponding to the behavior type, the contact strategy indicates a contact channel; and sending a contact message corresponding to the behavior type to the target user through the contact channel.
[0084] In an embodiment of the present invention, after receiving the user's behavior instruction, the target user corresponding to the user's behavior instruction can be determined. The target user can be the author of the video or article, or the author corresponding to the user's comment, answer, or question in the video or article. After determining the statistical results of multiple dimensions corresponding to the behavior instruction, the contact strategy corresponding to the behavior type can be determined through the correspondence between the pre-constructed behavior type and the contact strategy. The contact strategy indicates the contact channel, and then the contact message corresponding to the behavior type is sent to the target user through the contact channel. The contact message may include a user identifier and a behavior type, and may also include a content identifier. Among them, the contact channel can be one or more of push messages, text messages, in-station letters, emails, etc. Different behavior types can correspond to contact strategies of different channels. In addition, before determining the contact strategy corresponding to the behavior type, it is necessary to configure the contact strategy corresponding to the behavior type. If the contact strategy corresponding to the behavior type is not configured, the contact message is not sent to the target user.
[0085] Figure 3 The flowchart of a method for data processing of an embodiment of the present invention includes: receiving a user's behavior instruction, the behavior instruction indicates a behavior type; matching a behavior model corresponding to the behavior type, the behavior model includes following, liking, collecting, browsing, commenting, asking questions, subscribing, and answering, and if the matching behavior model fails, the process ends; matching a response strategy corresponding to the behavior model, if the matched behavior model is commenting, asking questions, answering, liking, and browsing, the response strategy is the first strategy, if the matched behavior model is following, collecting, and subscribing, the response strategy is the second strategy; according to the first strategy, the behavior details corresponding to the behavior instruction are stored in the database as the behavior record result; according to the second strategy, it is determined whether there is a corresponding user identifier, content in the behavior details in the database. The target behavior record result corresponding to the content ID, author ID and behavior type, if not, stores the behavior details as the behavior record result in the database, if exists, determines whether the behavior states indicated by the behavior types in the behavior details and the target behavior record result are the same, if they are the same, ends the process, if they are different, stores the behavior details as the behavior record result in the database; updates the behavior statistics results of the user dimension, content dimension and author dimension according to the behavior record results in the database; determines whether the behavior type matches the reach strategy, if so, sends a reach message to the author according to the reach channel indicated by the reach strategy, which can be push messages, SMS and emails, etc.; if not, ends the process.
[0086] The data processing method of the embodiment of the present invention, after receiving the user's behavior instruction, determines the corresponding response strategy according to the behavior type indicated by the behavior instruction; then determines the behavior record result corresponding to the behavior instruction according to the response strategy; and determines the behavior statistics results of multiple dimensions corresponding to the behavior instruction according to the behavior record result. This method provides a general method for user behavior recording and user behavior statistics. The persistence layer is implemented based on the storage method of database and cache, which realizes the persistent storage of behavior details and real-time statistics of behavior data, and improves the efficiency of data processing; at the same time, the corresponding contact strategy can be matched according to the behavior type, and the contact message can be sent through one or more contact channels to enhance the interactivity between users and authors; this method has strong versatility and can be applied to various content systems, reducing development costs and maintenance costs.
[0087] According to another aspect of the embodiment of the present invention, Figure 4 As shown, a data processing device 400 is provided, comprising:
[0088] A first determination module 401, in response to receiving a user's behavior instruction, the behavior instruction indicating a behavior type, determines a response strategy corresponding to the behavior type;
[0089] The second determination module 402 determines the behavior record result corresponding to the behavior instruction according to the response strategy;
[0090] The third determination module 403 determines the behavior statistics results of multiple dimensions corresponding to the behavior instruction according to the behavior recording result.
[0091] In an embodiment of the present invention, the behavior instruction indicates a target user corresponding to the user, and the third determination module 403 is also used to: determine the behavior statistical results of multiple dimensions corresponding to the behavior instruction based on the behavior record results, and then determine the contact strategy corresponding to the behavior type, where the contact strategy indicates the contact channel; and send a contact message corresponding to the behavior type to the target user through the contact channel.
[0092] In the embodiment of the present invention, the first determination module 401 is further used to: determine a behavior model corresponding to the behavior type; and determine a response strategy corresponding to the behavior model.
[0093] In an embodiment of the present invention, the second determination module 402 is further used to: obtain behavior details corresponding to the behavior instruction; the behavior details include user identification, content identification, author identification and behavior type; if the behavior type is the first type whose number can be accumulated, directly record the behavior details as the behavior record result; if the behavior type is the second type whose number cannot be accumulated, determine the behavior record result based on the behavior details and the stored behavior record results.
[0094] In the embodiment of the present invention, the second determination module 402 is further used to: determine whether there is a target behavior record result in the stored behavior record results that is identical to the user identifier, content identifier, author identifier and behavior type in the behavior details; if not, directly use the behavior details as the behavior record result; if so, determine whether the behavior state indicated by the behavior type in the behavior details is the same as the behavior state indicated in the target behavior record result. If they are not the same, record the behavior details as the behavior record result.
[0095] In an embodiment of the present invention, multiple dimensions include user dimension, content dimension and author dimension, and the behavior statistics results are stored in a cache. The third determination module 403 is further used to: in response to monitoring a newly added behavior record result, obtain the user ID, content ID, author ID and behavior type from the behavior record result; and update the behavior statistics results of the user dimension, content dimension and author dimension according to the user ID, content ID, author ID and behavior type.
[0096] In the embodiment of the present invention, the third determining module 403 is further configured to:
[0097] For the user dimension, the total number of behavior types corresponding to the user identifier is updated according to the behavior type, and the content list corresponding to the user identifier is updated according to the content identifier and the behavior type, so as to obtain the behavior statistics result of the user dimension;
[0098] For the content dimension, the total number of behavior types corresponding to the content identifier is updated according to the behavior type, and the user list corresponding to the content identifier is updated according to the behavior type and the user identifier, so as to obtain the behavior statistics result of the content dimension;
[0099] For the author dimension, the total number of behavior types corresponding to the author ID is updated according to the behavior type, and the user list corresponding to the author ID is updated according to the behavior type and the user ID, so as to obtain the behavior statistics result of the author dimension.
[0100] According to another aspect of an embodiment of the present invention, there is provided an electronic device, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the data processing method provided by the present invention.
[0101] According to another aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, the data processing method provided by the present invention is implemented.
[0102] Figure 5 An exemplary system architecture 500 is shown to which the data processing method or data processing apparatus according to the embodiment of the present invention can be applied.
[0103] like Figure 5 As shown, system architecture 500 may include terminal devices 501, 502, 503, a network 504 and a server 505. Network 504 is used to provide a medium for communication links between terminal devices 501, 502, 503 and server 505. Network 504 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0104] Users can use terminal devices 501, 502, 503 to interact with server 505 through network 504 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 501, 502, 503, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).
[0105] The terminal devices 501 , 502 , and 503 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0106] The server 505 may be a server that provides various services, such as a backend management server (only an example) that provides support for shopping websites browsed by users using the terminal devices 501, 502, and 503. The backend management server may analyze and process the received data such as product information query requests, and feed back the processing results (such as target push information, product information - only an example) to the terminal device.
[0107] It should be noted that the data processing method provided in the embodiment of the present invention is generally executed by the server 505 , and accordingly, the data processing device is generally set in the server 505 .
[0108] It should be understood that Figure 5 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0109] Reference below Figure 6 , which shows a schematic diagram of the structure of a computer system 600 of a terminal device suitable for implementing an embodiment of the present invention. Figure 6 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0110] like Figure 6As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the system 600 are also stored. The CPU 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0111] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage section 608 as needed.
[0112] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 609, and / or installed from the removable medium 611. When the computer program is executed by the central processing unit (CPU) 601, the above-mentioned functions defined in the system of the present invention are executed.
[0113] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0114] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0115] The modules involved in the embodiments of the present invention may be implemented in software or hardware. The modules described may also be provided in a processor, for example, may be described as: a processor including a first determination module, a second determination module and a third determination module. The names of these modules do not constitute a limitation on the modules themselves in certain circumstances, for example, the first determination module may also be described as "a module that determines a response strategy corresponding to a behavior type in response to receiving a behavior instruction from a user, the behavior instruction indicating a behavior type".
[0116] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes: in response to receiving a user's behavior instruction, the behavior instruction indicates a behavior type, determining a response strategy corresponding to the behavior type; determining a behavior record result corresponding to the behavior instruction according to the response strategy; and determining behavior statistics results of multiple dimensions corresponding to the behavior instruction according to the behavior record result.
[0117] According to the technical solution of the embodiment of the present invention, after receiving the user's behavior instruction, the data processing method determines the corresponding response strategy according to the behavior type indicated by the behavior instruction; then determines the behavior record result corresponding to the behavior instruction according to the response strategy; and determines the behavior statistics results of multiple dimensions corresponding to the behavior instruction according to the behavior record result. This method provides a general method for user behavior recording and user behavior statistics. The persistence layer is implemented based on the storage method of database and cache, which realizes the persistent storage of behavior details and real-time statistics of behavior data, and improves the efficiency of data processing; at the same time, the corresponding contact strategy can be matched according to the behavior type, and the contact message can be sent through one or more contact channels to increase the interactivity between users and authors; this method has strong versatility and can be applied to various content systems, reducing development costs and maintenance costs.
[0118] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for data processing, characterized in that: include: In response to receiving a behavior instruction from a user, the behavior instruction indicating a behavior type, determining a response strategy corresponding to the behavior type; Determine, according to the response strategy, a behavior record result corresponding to the behavior instruction; Behavior statistics results of multiple dimensions corresponding to the behavior instructions are determined according to the behavior recording results.
2. The method according to claim 1, characterized in that: The behavior instruction indicates a target user corresponding to the user, and after determining the behavior statistics results of multiple dimensions corresponding to the behavior instruction according to the behavior record result, the method further includes: Determining a reach strategy corresponding to the behavior type, wherein the reach strategy indicates a reach channel; Send a contact message corresponding to the behavior type to the target user through the contact channel.
3. The method according to claim 1, characterized in that Determine the response strategy corresponding to the described behavior type, including: determining a behavior model corresponding to the behavior type; A response strategy corresponding to the behavior model is determined.
4. The method according to claim 1, characterized in that: Determining a behavior record result corresponding to the behavior instruction according to the response strategy includes: Acquire the behavior details corresponding to the behavior instruction; the behavior details include user identification, content identification, author identification and behavior type; If the behavior type is the first type whose number of times can be accumulated, directly record the behavior details as the behavior record result; If the behavior type is the second type whose number of times cannot be accumulated, the behavior record result is determined according to the behavior details and the stored behavior record results.
5. The method according to claim 4, characterized in that Determining the behavior record result according to the behavior details and the stored behavior record result includes: Determine whether there is a target behavior record result in the stored behavior record results that has the same user ID, content ID, author ID, and behavior type as those in the behavior details; If not, directly use the behavior details as the behavior record result; If so, determine whether the behavior state indicated by the behavior type in the behavior details is the same as the behavior state indicated in the target behavior record result. If they are not the same, record the behavior details as the behavior record result.
6. The method according to claim 1, characterized in that The multiple dimensions include a user dimension, a content dimension, and an author dimension. The behavior statistics result is stored in a cache. The behavior statistics results of the multiple dimensions corresponding to the behavior instruction are determined according to the behavior record result, including: In response to monitoring a newly added behavior record result, obtaining a user identifier, a content identifier, an author identifier, and a behavior type from the behavior record result; The behavior statistics results of the user dimension, the content dimension and the author dimension are updated according to the user identifier, the content identifier, the author identifier and the behavior type.
7. The method according to claim 6, characterized in that Update the behavior statistics results of the user dimension, content dimension and author dimension, including: For the user dimension, the total number of behavior types corresponding to the user identifier is updated according to the behavior type, and the content list corresponding to the user identifier is updated according to the content identifier and the behavior type, so as to obtain a behavior statistical result of the user dimension; For the content dimension, the total number of behavior types corresponding to the content identifier is updated according to the behavior type, and the user list corresponding to the content identifier is updated according to the behavior type and the user identifier, so as to obtain a behavior statistical result of the content dimension; For the author dimension, the total number of behavior types corresponding to the author ID is updated according to the behavior type, and the user list corresponding to the author ID is updated according to the behavior type and the user ID, so as to obtain the behavior statistics result of the author dimension.
8. A data processing device, characterized in that: include: A first determination module, in response to receiving a user's behavior instruction, the behavior instruction indicating a behavior type, determines a response strategy corresponding to the behavior type; A second determination module determines a behavior record result corresponding to the behavior instruction according to the response strategy; The third determination module determines the behavior statistical results of multiple dimensions corresponding to the behavior instruction according to the behavior recording result.
9. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
10. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.