In-application activity data management method and apparatus, device, medium, and product

By obtaining and storing user activity data within the application in the microservice architecture, and managing it according to the storage duration and user operations, it solves the problem of decentralized data management between microservices, achieves unified and consistent storage of data, and improves improve management efficiency and user experience.

WO2024179387A1PCT designated stage expired Publication Date: 2024-09-06LEMON INC(GB) +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/078399
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-02-28
Filing Date
2024-02-23
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

Under the microservice architecture, user activity data management for different application functions within the application is scattered and inconsistent, making it impossible to achieve unified response and storage management.

Method used

By obtaining the queue messages in the preset activity data reporting event message queue, the activity data is stored in the key-value database of the data storage space associated with the business, and is managed according to the storage duration and user operations, and unified rules are used to manage the data. manage.

Benefits of technology

It achieves the unity and consistency of user activity data storage management for different application functions within the application, reduces data storage costs, and improves user data privacy protection and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024078399_06092024_PF_FP
    Figure CN2024078399_06092024_PF_FP
Patent Text Reader

Abstract

The embodiments of the present disclosure disclose an in-application activity data management method and apparatus, a device, a medium, and a product, wherein the method comprises: obtaining a queue message in a preset activity data reporting event message queue, and storing activity data corresponding to the queue message in a first preset database of at least one data storage space having a service association with the activity data; managing the activity data in accordance with the duration which the activity data is stored in the first preset database and / or in accordance with a user management operation with regard to the activity data; wherein the first preset database is a key value database satisfying a first preset storage performance standard. The technical solutions of the embodiments of the present disclosure solve the problems of decentralized and non-uniform management of activity data between micro-services of different application functions within an application program, allowing for each unit of user activity data to be managed according to unified rules by means of a single micro-service architecture, so that the storage management of the activity data is consistent and uniform.
Need to check novelty before this filing date? Find Prior Art

Description

Method, device, equipment, medium and product for managing activity data within an application

[0001] This application claims priority to the Chinese invention patent application entitled “Methods, devices, equipment, media and products for managing activity data within an application” and application number 2023101839592, filed on February 28, 2023. The entire contents of that application are incorporated by reference into this application. Technical Field

[0002] The embodiments of the present disclosure relate to the field of microservice technology, and more particularly to a method, apparatus, device, medium, and product for managing activity data within an application. Background Art

[0003] In a microservices architecture, different application functions within the same application can be implemented through separate microservice systems, each of which manages user activity data within its own microservice system. When a user manages a specific user activity data item, they can only manage that user activity data in the microservice system for the corresponding application function and cannot synchronize that user activity data with other microservice systems that store the same user activity data. This results in fragmented user activity data management, and each microsystem cannot uniformly respond to user activity data management operations.

[0004] Summary of the Invention

[0005] The present disclosure provides a method, apparatus, device, medium and product for managing activity data within an application, which can uniformly manage user activity data across different services within an application, making the storage and management of activity data consistent and unified.

[0006] In a first aspect, an embodiment of the present disclosure provides a method for managing activity data within an application, the method comprising: obtaining a queue message in a preset activity data reporting event message queue, and storing the activity data corresponding to the queue message in a first preset database of at least one data storage space that is business-associated with the activity data; managing the activity data based on the length of time the activity data is stored in the first preset database and / or the user's management operations on the activity data; wherein the first preset database is a key-value database that meets a first preset storage performance standard.

[0007] In the second aspect, the embodiment of the present disclosure also provides an activity data management device within an application, which includes: an activity data storage module, used to obtain queue messages in a preset activity data reporting event message queue, and store the activity data corresponding to the queue message in a first preset database of at least one data storage space that is business-associated with the activity data; an activity data management module, used to manage the activity data based on the length of time the activity data is stored in the first preset database and / or the user's management operations on the activity data; wherein, the first preset database is a key-value database that meets the first preset storage performance standard.

[0008] In a third aspect, an embodiment of the present disclosure further provides 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 in-application activity data management method as described in any one of the embodiments of the present disclosure.

[0009] In a fourth aspect, an embodiment of the present disclosure further provides a storage medium comprising computer-executable instructions, which, when executed by a computer processor, are used to execute the method for managing active data within an application as described in any one of the embodiments of the present disclosure.

[0010] In a fifth aspect, an embodiment of the present disclosure further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the method for managing active data within an application as described in any one of the embodiments of the present invention.

[0011] In the embodiment of the present disclosure, queue messages in a preset activity data reporting event message queue are obtained, and the activity data corresponding to the queue messages are stored in a first preset database of at least one data storage space that is business-related to the activity data; the activity data is managed according to the length of time the activity data is stored in the first preset database and / or the user's management operations on the activity data; the first preset database is a key-value database that meets the first preset storage performance standard. That is, unified activity data management rules are used to uniformly manage the activity data queue messages of various business functions in the preset activity data reporting event message queue. The technical solution of the embodiment of the present disclosure solves the problem of decentralized and non-uniform activity data management between microservices of different application functions within an application. Various user activity data generated by microservice systems of different businesses can be managed according to unified rules through a microservice architecture, so that the storage management of activity data is consistent and unified. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The above and other features, advantages, and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale.

[0013] FIG1 is a flow chart of a method for managing activity data within an application program provided by an embodiment of the present disclosure;

[0014] FIG2 is a flow chart of a method for managing activity data within an application program provided by an embodiment of the present disclosure;

[0015] FIG3 is a flow chart of a method for managing activity data within an application program provided by an embodiment of the present disclosure;

[0016] FIG4 is a schematic structural diagram of an apparatus for managing activity data within an application program provided by an embodiment of the present disclosure;

[0017] FIG5 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0018] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.

[0019] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0020] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.

[0021] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0022] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".

[0023] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0024] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.

[0025] As an optional but non-limiting implementation, in response to receiving a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.

[0026] It is understandable that the above notification and user authorization process are merely illustrative and do not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0027] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) must comply with the requirements of relevant laws, regulations and relevant provisions.

[0028] Figure 1 is a flow chart of an in-application activity data management method provided by an embodiment of the present disclosure. The embodiment of the present disclosure is applicable to scenarios where user activity data in an application is managed, especially where different business functions in an application are implemented through different microservice architectures. The method can be executed by an in-application activity data management device, which can be implemented in the form of software and / or hardware. Optionally, it can be implemented by an electronic device, which can be a mobile terminal, a PC, a server, etc.

[0029] As shown in FIG1 , the method for managing activity data within an application includes:

[0030] S110: Obtain a queue message in a preset activity data reporting event message queue, and store activity data corresponding to the queue message in a first preset database having at least one data storage space business-associated with the activity data.

[0031] Among them, the preset activity data reporting event message queue is a message queue used to receive user activity data of various business functions within the application reported by the application client. This message queue is the same for the microservices of various application functions.

[0032] Specifically, when a user is active in any application, that is, interacts with any business function in the application, such as watching videos, posting information, or collecting files, the application client will generate activity data related to the user activity and report it to the preset activity data reporting event message queue on the server, so that the application activity data management microservice can perform subsequent management operations on the user activity data.

[0033] In one feasible implementation, the application client can report each user activity through the application server's preset application program interface (API). After receiving the user activity data reported by the application client through the preset API, the application server converts the API request event into a Kafka event (i.e., an activity data reporting event) and stores it in the preset activity data reporting event message queue for subsequent consumption by the activity data management microservice.

[0034] Furthermore, the activity data management microservice is provided with a corresponding queue message processing component for the preset activity data reporting event message queue, i.e., a consumer of queue messages. The consumer can process the messages in the preset activity data reporting event message queue in sequence, and store the activity data corresponding to each queue message in at least one first preset database of a data storage space that is business-associated with the activity data. In a preferred embodiment, in order to reduce the number of network requests and reduce the overhead of processing multiple requests, the activity data management microservice can process queue messages in batches, and then initiate a data write request to the database. For example, if each batch processes 20 queue events, the query per second (QPS) of the corresponding activity data management microservice will be reduced by 20 times.

[0035] When storing activity data, the activity data is stored in a first preset database of at least one data storage space that has a business association with the corresponding activity data. In some embodiments, the existence of a business association can be understood as an association relationship between a certain business function and the activity data, or an association relationship between the activity data and the use of the activity data in the process of implementing the business function. For example, the video browsing activity data generated by a user watching a video is activity data generated in the business function of providing video data, or it can be activity data used for reference in the process of implementing the content recommendation function in the content recommendation business function. Usually, a data storage space is set up for each business function (an independent microservice system) to store user activity data generated in the process of implementing the business function microservice. Therefore, when storing activity data, the activity data can be stored in the first preset database of the corresponding data storage space. In some embodiments, the first preset database can be a key-value database that meets the first preset storage performance standard, for example, it can be a distributed key-value storage system that can support millions of QPS and supports the Redis protocol. It is a highly available, low-latency, and highly scalable storage database.

[0036] S120: Manage the activity data according to the duration of storage of the activity data in the first preset database and / or the user's management operation on the activity data.

[0037] In the process of managing activity data, data management is performed based on the length of time the activity data is stored in the corresponding first preset database and the user's management operations on the activity data. On the one hand, the user activity data generated in various business functions is managed in accordance with unified data management rules. On the other hand, the user is provided with functional options for activity data management to independently process activity data during the use of the application.

[0038] In some embodiments, considering the length of time that active data is stored in the corresponding first preset database, in order to save data storage costs, hot and cold data are distinguished based on the length of time the active data has been stored. That is, hot data is stored in the database for a short time and has a high read access volume, while cold data is stored in the database for a long time and has a low read access volume. This allows for storage management based on the characteristics of hot and cold data.

[0039] In some embodiments, user management operations can include querying, deleting, transferring, adding to favorites, or sharing data. Users can trigger corresponding data management operations based on their activity data management needs, thereby managing their activity data. Specifically, functional controls for various activity data management operations can be provided in the application's interactive interface, providing users with access to these operations.

[0040] In an optional embodiment, to ensure the integrity of the activity data storage, if the activity data fails to be stored in the corresponding first preset database, or after a preset amount of activity data has been stored, offline data storage management is initiated, and the activity data is stored as new data in the offline data storage table. The data in the offline data storage table is then stored in the first preset database according to a preset data storage period. This is to supplement the activity data storage to prevent some data from failing to be stored in the corresponding first preset database.

[0041] In addition, a data verification time period will be set, and the activity data stored in each data storage space will be checked for consistency according to the period, and the activity data associated with all queue messages in the preset activity data reporting event message queue and the activity data stored in each of the data storage spaces will be checked for consistency, so as to further ensure the accuracy and consistency of data storage. In some embodiments, the purpose of the consistency verification of the activity data stored in each data storage space is to determine whether the activity data stored in the databases of multiple data storage spaces at the same time is the same. The purpose of the consistency verification of the activity data associated with all queue messages in the preset activity data reporting event message queue and the activity data stored in each of the data storage spaces is to determine whether the user activity data reported by the client is all stored in the database of the corresponding data storage space to avoid omissions.

[0042] To support the management of diverse user activity data within a microservices architecture, the activity data management microservice in this embodiment is configured with multiple database storage types, corresponding to user activity scenarios. These include relational databases like Redis and MySQL, key-value databases, and distributed storage databases. Furthermore, if some user activity data cannot be directly stored within the activity data management microservice system, the system can interact directly with a system with corresponding activity data storage capabilities via Remote Procedure Calls (RPCs) to store the corresponding activity data.

[0043] The technical solution of the embodiment of the present disclosure obtains the queue message in the preset activity data reporting event message queue, and stores the activity data corresponding to the queue message in a first preset database of at least one data storage space that is business-related to the activity data; the activity data is managed according to the length of time the activity data is stored in the first preset database and / or the user's management operations on the activity data; the first preset database is a key-value database that meets the first preset storage performance standard. That is, the activity data queue messages of each business function in the preset activity data reporting event message queue are uniformly managed using unified activity data management rules. The technical solution of the embodiment of the present disclosure solves the problem of decentralized and non-uniform activity data management between microservices of different application functions within an application. Various user activity data generated by microservice systems of different businesses can be managed according to unified rules through a microservice architecture, so that the storage management of activity data is consistent and unified.

[0044] Figure 2 is a flow chart of an in-application activity data management method provided in an embodiment of the present disclosure, which belongs to the same inventive concept as the in-application activity data management method provided in the above embodiment, and further describes the process of performing data management operations based on the storage duration of activity data. The method can be executed by an in-application activity data management device, which can be implemented in the form of software and / or hardware, and optionally, by an electronic device, which can be a mobile terminal, PC or server, etc.

[0045] As shown in FIG2 , the method for managing activity data within an application includes:

[0046] S210: Obtain a queue message in a preset activity data reporting event message queue, and store activity data corresponding to the queue message in a first preset database having at least one data storage space business-associated with the activity data.

[0047] In some embodiments, the first preset database is a key-value database that meets a first preset storage performance standard. In some embodiments, the first preset storage performance can be able to withstand a high QPS to ensure high concurrent active data access and query operations of users.

[0048] It can be understood that, in this step, the latest generated activity data are all stored in the first preset database corresponding to the data storage space.

[0049] S220: When the storage time of the activity data in the first preset database exceeds a preset hot data storage time threshold, transfer the activity data from the first preset database to a corresponding second preset database.

[0050] Typically, activity data is stored in a database after it's generated. The longer it's stored, the less likely it is to be accessed or queried. Storing all activity data in a key-value database creates significant storage pressure and incurs high data storage costs, potentially supporting only a short period of activity data storage.

[0051] In this embodiment, data is divided into hot data and cold data based on the length of time the activity data is stored in the first preset database. For example, data from the last 7 days compared to the current time is regarded as hot data, and data from 7 to 180 days after the activity data is generated is regarded as cold data. In this step, the activity data that has changed from hot data to cold data can be stored in the second preset database to reduce the cost of data storage. In some embodiments, the second preset database is a distributed table storage database that meets the second preset storage performance standard and can meet the needs of large amounts of data storage. Compared with previous activity data storage solutions, the activity data management solution of this embodiment can store more and longer user historical activity data.

[0052] Specifically, in the process of realizing data migration between cold and hot storage, first, the conditions for triggering data migration are monitored. For example, the storage time of active data in each first preset database is monitored every day. When the corresponding storage time exceeds the preset hot data storage time threshold, the data storage service function module may generate a Kafka queue event (kafka event) for data migration. Alternatively, when a certain amount of newly generated user activity data is stored in the first preset database every day, the monitoring of the storage time of active data in each first preset database is started. The target activity data that needs to be migrated can then be determined through the kafka event. A corresponding data migration script is provided in each data storage space. After obtaining the kafka event, the kafka event will be consumed, and the target activity data that needs to be migrated from the first preset database will be read out according to the key value and written into the second preset database.

[0053] S230 . Sample the activity data in the first preset database and the second preset database respectively according to a first preset data verification time period to obtain verification sampling data, and perform consistency verification on the verification sampling data.

[0054] In particular, in this embodiment, after each data migration, data verification is performed on the hot and cold data sources to determine the consistency of the hot and cold data sources. If they are inconsistent, the data migration will be performed again.

[0055] It is understood that after hot data is migrated from the first preset database to the second preset database, the migrated data will expire in the first preset database and will not be retained long-term. Data consistency verification is performed before the migrated hot data expires in the first preset database. This can be done by sampling the data source, based on user identification information (user ID), reading the data content in the first preset database and the second preset database respectively for data sources such as the application's daily activity table and user click records to determine whether the read results are consistent.

[0056] The technical solution of the embodiment of the present disclosure obtains the queue message in the preset activity data reporting event message queue, and stores the activity data corresponding to the queue message in at least one first preset database of the data storage space that is business-related to the activity data; the activity data is divided into cold data and hot data according to the length of time the activity data is stored in the first preset database, and the cold data is migrated to the corresponding second preset database, so that a larger amount of user activity data can be stored and the cost of data storage can be reduced. That is, the activity data queue messages of each business function in the preset activity data reporting event message queue are uniformly managed using unified activity data management rules. The technical solution of the embodiment of the present disclosure solves the problem of decentralized and non-uniform activity data management between microservices of different application functions within an application. Various user activity data generated by microservice systems of different businesses can be managed according to unified rules through a microservice architecture, so that the storage management of activity data is consistent and unified.

[0057] Figure 3 is a flow chart of an in-application activity data management method provided in an embodiment of the present disclosure, which belongs to the same inventive concept as the in-application activity data management method provided in the above embodiment, and further describes the process of performing data management operations based on the user's activity data management operation instructions. The method can be executed by an in-application activity data management device, which can be implemented in the form of software and / or hardware, and optionally, by an electronic device, which can be a mobile terminal, PC or server, etc.

[0058] As shown in FIG3 , the method for managing activity data within an application includes:

[0059] S310: Obtain a queue message in a preset activity data reporting event message queue, and store activity data corresponding to the queue message in a first preset database having at least one data storage space business-associated with the activity data.

[0060] S320: When the storage time of the activity data in the first preset database exceeds a preset hot data storage time threshold, transfer the activity data from the first preset database to a corresponding second preset database.

[0061] S330: In response to the activity data deletion operation instruction, delete the activity data to be deleted in the data storage space of the first microservice business system that generates the activity data to be deleted associated with the activity data deletion operation.

[0062] Specifically, user access to activity data management operations can be provided by setting functional controls for various activity data management operations within the application's interactive interface. For example, user management operations could include querying, deleting, transferring, saving, or sharing data. Users can trigger corresponding data management operations based on their activity data management needs, thereby achieving complete management of their activity data.

[0063] When the user triggers the activity data deletion function control in the application client, the activity data management microservice will obtain the corresponding activity data deletion operation instruction. In some embodiments, the activity data deletion operation instruction includes information about the activity data to be deleted, and the activity data to be deleted is the target deletion data object.

[0064] In existing technologies, different business functions within an application are implemented through independent microservice architectures, and user activity data is managed independently across these microservice architectures. When a user deletes a piece of activity data, they typically only delete the data stored in the data storage space of the microservice architecture that generated the activity data, and not the data stored in the data storage space of other business functions' microservice architectures. This impacts the user experience and is detrimental to user privacy.

[0065] In this embodiment, in order to protect the user's data privacy, ensure that all target deletion data objects in the database storing the target deletion data objects can be deleted, and considering the huge amount of stored user activity data, support users to delete all activity data with one click (such as the maximum storage time is within half a year, which may correspond to the order of 100k), so the activity data deletion operation is designed as an asynchronous operation. First, the activity data to be deleted stored in the data storage space of the first microservice business system that generates the activity data to be deleted is deleted. It should be noted that the activity data to be deleted stored in the data storage space of the first microservice business system may be stored only in the first preset database or the second preset database, or may be stored in the first preset database and the second preset database at the same time. Therefore, there is no strict order limit for step S330 and step S320.

[0066] Furthermore, step S340 is executed asynchronously with step 330 .

[0067] S340: Send a data deletion request to a business-related microservice business system other than the first microservice business system that stores the activity data to be deleted, so that the business-related microservice business system deletes the activity data to be deleted stored in the corresponding data storage space according to the data deletion request.

[0068] Through step S340, the activity data to be deleted stored in the data storage space of the business-related microservice business system storing the activity data to be deleted outside the first microservice business system can be deleted.

[0069] Specifically, during the data deletion implementation process in steps S330 and S340, when a user triggers a deletion operation, the client uploads the data deletion instruction through the corresponding API service. The application activity data management microservice receives this data deletion instruction through the API service and generates a deletion event Kafka event. For a delete all request, the data deletion component will read and delete all the user's activity data of a certain business category in batches from the hot and cold databases of each microservice business system while consuming the Kafka event. For batch delete requests, the data deletion component will directly find the data to be deleted in the hot and cold databases of each microservice business system and delete it.

[0070] In addition, a data retention component is implemented to delete other relevant data within the application, such as business data generated based on deleted user activity data. Upon receiving a data deletion request, the data retention component creates a data deletion task, which is executed by a pre-defined data deletion script. It also notifies other previously connected business entities that may have stored relevant data via RPC calls to delete the user activity data.

[0071] S350: Search for the activity data to be deleted in each of the data storage spaces, and verify whether each of the data storage spaces has deleted the activity data to be deleted.

[0072] In this step, the deletion of user activity data can be verified. After the data to be deleted is completely deleted from each microservice business system, RPC calls can be made to each microservice business system at preset intervals to confirm whether the deleted activity data has been deleted, further ensuring that all user activity data that needs to be deleted has been deleted. If it is confirmed that individual microservice business systems still store activity data that should be deleted, the corresponding activity data will be deleted again.

[0073] S360: In response to the activity data query operation instruction, query the target query activity data within a preset historical length associated with the query instruction initiation moment, filter and sort the target query activity data, and feed back the processing results to the user in pages.

[0074] In this embodiment, considering that the characteristic of the activity data management microservice is that the overall data writing (write) volume of the system is much greater than the data reading (read) volume. Since the QPS of the read is not high, a corresponding paging request can be provided, and the user can set the amount of data that can be displayed on each page of the data feedback interface. Whenever a user initiates an activity data read request, the data storage service function component will read out the data of several days adjacent to the time when the read request is initiated (the time when the query instruction is initiated), and perform in-memory filtering and sorting (such as displaying in reverse chronological order), and feedback to the user who issued the activity data query operation instruction in units of the data volume set in the user's paging request.

[0075] It should be noted that there is no order restriction between S360 and S320, S330, S340 and S350, and the execution content is determined according to the data management operation request issued by the user.

[0076] The technical solution of the embodiment of the present disclosure obtains the queue message in the preset activity data reporting event message queue, and stores the activity data corresponding to the queue message in a first preset database of at least one data storage space that is business-related to the activity data; the activity data can be managed according to the length of time the activity data is stored in the first preset database to reduce data costs and store a larger amount of user activity data, and can also respond to the user's data management operations to achieve the management of activity data, especially the deletion of activity data. Through asynchronous operations, it can ensure that the data to be deleted stored simultaneously in multiple microservice business systems is deleted, better protect user data privacy, and when responding to user data query instructions, the query data can be fed back to the user in the form of pages to facilitate user data browsing. Therefore, the technical solution of the embodiment of the present disclosure solves the problem of decentralized and non-uniform activity data management between microservices of different application functions within an application. It can manage the various user activity data generated by microservice systems of different businesses according to unified rules through a microservice architecture, so that the storage management of activity data is consistent and unified.

[0077] Figure 4 is a structural diagram of an in-application activity data management device provided by an embodiment of the present disclosure. The device is suitable for scenarios in which user activity data in an application is managed, especially where different business functions in an application are implemented through different microservice architectures. The in-application activity data management device can be implemented in the form of software and / or hardware and can be configured on an electronic device, which can be a mobile terminal, a PC, a server, etc.

[0078] As shown in FIG. 4 , the apparatus for managing activity data within an application program includes an activity data storage module 410 and an activity data management module 420 .

[0079] Among them, the activity data storage module 410 is used to obtain the queue message in the preset activity data reporting event message queue, and store the activity data corresponding to the queue message in a first preset database of at least one data storage space that is business-related to the activity data; the activity data management module 420 is used to manage the activity data based on the length of time the activity data is stored in the first preset database and / or the user's management operations on the activity data; wherein, the first preset database is a key-value database that meets the first preset storage performance standard.

[0080] The technical solution provided by the embodiment of the present disclosure obtains the queue message in the preset activity data reporting event message queue, and stores the activity data corresponding to the queue message in a first preset database of at least one data storage space that is business-related to the activity data; manages the activity data according to the length of time the activity data is stored in the first preset database and / or the user's management operations on the activity data; the first preset database is a key-value database that meets the first preset storage performance standard. That is, unified activity data management rules are used to uniformly manage the activity data queue messages of various business functions in the preset activity data reporting event message queue. The technical solution of the embodiment of the present disclosure solves the problem of decentralized and non-uniform activity data management between microservices of different application functions within an application. Various user activity data generated by microservice systems of different businesses can be managed according to unified rules through a microservice architecture, so that the storage management of activity data is consistent and unified.

[0081] Based on any optional technical solution in the embodiments of the present disclosure, optionally, the activity data management module 420 is specifically configured to:

[0082] When the storage time of the activity data in the first preset database exceeds a preset hot data storage time threshold, transferring the activity data from the first preset database to a corresponding second preset database;

[0083] The second preset database is a distributed table storage database that meets a second preset storage performance standard.

[0084] Based on any optional technical solution in the embodiments of the present disclosure, optionally, the activity data management module 420 is further configured to:

[0085] When storing the activity data in the first preset database fails, or after storing a preset amount of activity data, storing the activity data as newly added data in an offline data storage table;

[0086] The data in the offline data storage table is stored in the first preset database according to a preset data storage period.

[0087] Based on any optional technical solution in the embodiments of the present disclosure, optionally, the activity data management module 420 is further configured to:

[0088] When the activity data management operation is an activity data deletion operation, deleting the activity data to be deleted from the data storage space of the first microservice business system that generates the activity data to be deleted associated with the activity data deletion operation;

[0089] A data deletion request is sent to a business-related microservice business system other than the first microservice business system that stores the activity data to be deleted, so that the business-related microservice business system deletes the activity data to be deleted stored in the corresponding data storage space according to the data deletion request.

[0090] Based on any optional technical solution in the embodiments of the present disclosure, optionally, the activity data management module 420 is further configured to:

[0091] According to a first preset data verification time period, sampling activity data in the first preset database and the second preset database respectively to obtain verification sampling data;

[0092] A consistency check is performed on the verification sampling data.

[0093] Based on any optional technical solution in the embodiments of the present disclosure, optionally, the activity data management module 420 is further configured to:

[0094] After executing the activity data deletion operation, searching for the activity data to be deleted in each data storage space, and checking whether each data storage space has deleted the activity data to be deleted.

[0095] Based on any optional technical solution in the embodiments of the present disclosure, optionally, the activity data management module 420 is further configured to:

[0096] According to a second preset data verification time period, consistency verification is performed on the activity data stored in each of the data storage spaces, and consistency verification is performed on the activity data associated with all queue messages in the preset activity data reporting event message queue and the activity data stored in each of the data storage spaces.

[0097] The above-mentioned in-application activity data management device provided by the embodiment of the present disclosure can execute the in-application activity data management method provided by any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.

[0098] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present disclosure.

[0099] FIG5 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Referring to FIG5 , a schematic diagram of the structure of an electronic device (such as a terminal device or server in FIG5 ) 500 suitable for implementing an embodiment of the present disclosure is shown below. The terminal device in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. The electronic device shown in FIG5 is merely an example and should not impose any limitations on the functions and scope of use of the embodiments of the present disclosure.

[0100] As shown in FIG5 , the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. Various programs and data required for the operation of the electronic device 500 are also stored in the RAM 503. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An edit / output (I / O) interface 505 is also connected to the bus 504.

[0101] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although FIG5 shows the electronic device 500 with various devices, it should be understood that not all of the devices shown are required to be implemented or present. More or fewer devices may alternatively be implemented or present.

[0102] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes 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 via the communication device 509, or installed from the storage device 508, or installed from the ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.

[0103] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0104] The electronic device provided by the embodiment of the present disclosure and the method for managing activity data within an application provided by the above embodiment belong to the same inventive concept. For technical details not fully described in this embodiment, please refer to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.

[0105] An embodiment of the present disclosure provides a computer storage medium having a computer program stored thereon. When the program is executed by a processor, the method for managing active data within an application program provided by the above embodiment is implemented.

[0106] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, 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 disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a 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. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport 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 suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.

[0107] In some embodiments, the client and server can communicate using any currently known or later developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or later developed network.

[0108] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0109] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device:

[0110] Obtaining a queue message in a preset activity data reporting event message queue, and storing activity data corresponding to the queue message in a first preset database of at least one data storage space that is business-associated with the activity data;

[0111] managing the activity data according to a storage period of the activity data in the first preset database and / or a user's management operation on the activity data;

[0112] The first preset database is a key-value database that meets a first preset storage performance standard.

[0113] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0114] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of 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 than that 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 and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0115] The units described in the embodiments of the present disclosure may be implemented in software or hardware. The name of a unit does not necessarily limit the unit itself. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses."

[0116] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.

[0117] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, 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 foregoing.

[0118] An embodiment of the present disclosure further provides a computer program product, including a computer program, which, when executed by a processor, implements the method for managing activity data within an application as provided in any embodiment of the present disclosure.

[0119] The computer program product, during implementation, may be written in one or more programming languages, or a combination thereof, for performing the operations of the present disclosure and may include computer program code written in object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0120] According to one or more embodiments of the present disclosure, [Example 1] provides a method for managing activity data within an application, the method comprising:

[0121] Obtaining a queue message in a preset activity data reporting event message queue, and storing activity data corresponding to the queue message in a first preset database of at least one data storage space that is business-associated with the activity data;

[0122] managing the activity data according to a storage period of the activity data in the first preset database and / or a user's management operation on the activity data;

[0123] The first preset database is a key-value database that meets a first preset storage performance standard.

[0124] According to one or more embodiments of the present disclosure, [Example 2] provides a method for managing activity data within an application, further comprising:

[0125] In some optional implementations, managing the activity data according to a duration for which the activity data is stored in the first preset database includes:

[0126] When the storage time of the activity data in the first preset database exceeds a preset hot data storage time threshold, transferring the activity data from the first preset database to a corresponding second preset database;

[0127] The second preset database is a distributed table storage database that meets a second preset storage performance standard.

[0128] According to one or more embodiments of the present disclosure, [Example 3] provides a method for managing activity data within an application, including:

[0129] In some optional implementations, when storing the activity data in the first preset database fails, or after storing a preset amount of activity data, the method further includes:

[0130] storing the activity data as newly added data in an offline data storage table;

[0131] The data in the offline data storage table is stored in the first preset database according to a preset data storage period.

[0132] According to one or more embodiments of the present disclosure, [Example 4] provides a method for managing activity data within an application, further comprising:

[0133] In some optional implementations, managing the activity data according to a user's management operation on the activity data includes:

[0134] When the activity data management operation is an activity data deletion operation, deleting the activity data to be deleted from the data storage space of the first microservice business system that generates the activity data to be deleted associated with the activity data deletion operation;

[0135] A data deletion request is sent to a business-related microservice business system other than the first microservice business system that stores the activity data to be deleted, so that the business-related microservice business system deletes the activity data to be deleted stored in the corresponding data storage space according to the data deletion request.

[0136] According to one or more embodiments of the present disclosure, [Example 5] provides a method for managing activity data within an application, further comprising:

[0137] In an optional embodiment, the method further includes:

[0138] According to a first preset data verification time period, sampling activity data in the first preset database and the second preset database respectively to obtain verification sampling data;

[0139] A consistency check is performed on the verification sampling data.

[0140] According to one or more embodiments of the present disclosure, [Example 6] provides a method for managing activity data within an application, further comprising:

[0141] In some optional implementations, after performing the active data deletion operation, the method further includes:

[0142] Search the data storage spaces for the activity data to be deleted, and check whether the data storage spaces have deleted the activity data to be deleted.

[0143] According to one or more embodiments of the present disclosure, [Example 7] provides a method for managing activity data within an application, further comprising:

[0144] In an optional embodiment, the method further includes:

[0145] According to a second preset data verification time period, consistency verification is performed on the activity data stored in each of the data storage spaces, and consistency verification is performed on the activity data associated with all queue messages in the preset activity data reporting event message queue and the activity data stored in each of the data storage spaces.

[0146] According to one or more embodiments of the present disclosure, [Example 8] provides an apparatus for managing activity data within an application, including:

[0147] An activity data storage module is configured to obtain a queue message from a preset activity data reporting event message queue, and store the activity data corresponding to the queue message in a first preset database of at least one data storage space that is business-related to the activity data;

[0148] An activity data management module, configured to manage the activity data according to a duration for which the activity data has been stored in the first preset database and / or a user's management operation on the activity data;

[0149] The first preset database is a key-value database that meets a first preset storage performance standard.

[0150] According to one or more embodiments of the present disclosure, [Example 9] provides an apparatus for managing activity data within an application, further comprising:

[0151] In an optional implementation, the activity data management module is specifically configured to:

[0152] When the storage time of the activity data in the first preset database exceeds a preset hot data storage time threshold, transferring the activity data from the first preset database to a corresponding second preset database;

[0153] The second preset database is a distributed table storage database that meets a second preset storage performance standard.

[0154] According to one or more embodiments of the present disclosure, [Example 10] provides an apparatus for managing activity data within an application, further comprising:

[0155] In an optional implementation, the activity data management module is further configured to:

[0156] When storing the activity data in the first preset database fails, or after storing a preset amount of activity data, storing the activity data as newly added data in an offline data storage table;

[0157] The data in the offline data storage table is stored in the first preset database according to a preset data storage period.

[0158] According to one or more embodiments of the present disclosure, [Example 11] provides an apparatus for managing activity data within an application, further comprising:

[0159] In an optional implementation, the activity data management module is further configured to:

[0160] When the activity data management operation is an activity data deletion operation, deleting the activity data to be deleted from the data storage space of the first microservice business system that generates the activity data to be deleted associated with the activity data deletion operation;

[0161] A data deletion request is sent to a business-related microservice business system other than the first microservice business system that stores the activity data to be deleted, so that the business-related microservice business system deletes the activity data to be deleted stored in the corresponding data storage space according to the data deletion request.

[0162] According to one or more embodiments of the present disclosure, [Example 12] provides an apparatus for managing activity data within an application, further comprising:

[0163] In an optional implementation, the activity data management module is further configured to:

[0164] According to a first preset data verification time period, sampling activity data in the first preset database and the second preset database respectively to obtain verification sampling data;

[0165] A consistency check is performed on the verification sampling data.

[0166] According to one or more embodiments of the present disclosure, [Example 13] provides an apparatus for managing activity data within an application, further comprising:

[0167] In an optional implementation, the activity data management module is further configured to:

[0168] After executing the activity data deletion operation, searching for the activity data to be deleted in each data storage space, and checking whether each data storage space has deleted the activity data to be deleted.

[0169] According to one or more embodiments of the present disclosure, [Example 14] provides an apparatus for managing activity data within an application, further comprising:

[0170] In an optional implementation, the activity data management module is further configured to:

[0171] According to a second preset data verification time period, consistency verification is performed on the activity data stored in each of the data storage spaces, and consistency verification is performed on the activity data associated with all queue messages in the preset activity data reporting event message queue and the activity data stored in each of the data storage spaces.

[0172] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also encompasses other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in the present disclosure.

[0173] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0174] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.

Claims

1. A method for managing activity data within an application, characterized in that: include: Obtaining a queue message in a preset activity data reporting event message queue, and storing the activity data corresponding to the queue message in a first preset database of at least one data storage space that is business-associated with the activity data; managing the activity data according to the length of time the activity data is stored in the first preset database and / or a user's management operation on the activity data; The first preset database is a key-value database that meets a first preset storage performance standard.

2. The method according to claim 1, characterized in that The managing the activity data according to the length of time the activity data is stored in the first preset database includes: When the storage time of the activity data in the first preset database exceeds a preset hot data storage time threshold, transferring the activity data from the first preset database to a corresponding second preset database; The second preset database is a distributed table storage database that meets a second preset storage performance standard.

3. The method according to claim 1, characterized in that When storing the activity data in the first preset database fails, or after storing a preset amount of the activity data, the method further includes: storing the activity data as newly added data in an offline data storage table; The data in the offline data storage table is stored in the first preset database according to a preset data storage period.

4. The method according to claim 1, characterized in that The managing the activity data according to the user's management operation on the activity data includes: When the activity data management operation is an activity data deletion operation, deleting the activity data to be deleted from the data storage space of the first microservice business system that generates the activity data to be deleted associated with the activity data deletion operation; A data deletion request is sent to a business-related microservice business system other than the first microservice business system that stores the activity data to be deleted, so that the business-related microservice business system deletes the activity data to be deleted stored in the corresponding data storage space according to the data deletion request.

5. The method according to claim 2, characterized in that: The method further comprises: According to a first preset data verification time period, respectively sampling the activity data in the first preset database and the second preset database to obtain verification sampling data; A consistency check is performed on the verification sampling data.

6. The method according to claim 4, characterized in that After performing the active data deletion operation, the method further includes: Search the to-be-deleted activity data in each of the data storage spaces, and check whether each of the data storage spaces deletes the to-be-deleted activity data.

7. The method according to claim 1, characterized in that The method further comprises: According to the second preset data verification time period, a consistency check is performed on the activity data stored in each of the data storage spaces, and a consistency check is performed on the activity data associated with all queue messages in the preset activity data reporting event message queue and the activity data stored in each of the data storage spaces.

8. An activity data management device within an application, characterized in that: include: The activity data storage module is used to obtain a queue message in a preset activity data reporting event message queue, and store the activity data corresponding to the queue message in at least one queue message corresponding to the activity data storage event queue. The first preset database of the data storage space associated with the service; An activity data management module, configured to manage the activity data according to the duration of storage of the activity data in the first preset database and / or the management operation of the activity data by the user; The first preset database is a key-value database that meets a first preset storage performance standard.

9. An electronic device, characterized in that: The electronic device comprises: 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 for managing active data within an application as described in any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for managing active data within an application program as described in any one of claims 1 to 7 is implemented.

11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements the method for managing activity data within an application program according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Data calling method and device, electronic equipment and storage medium

    CN113254523A

  • Transaction processing method and related product

    CN113360299A

  • Data storage method and system

    CN113722390A

  • Microservices data aggregation search engine updating

    US20220067108A1