CN112883316A - Data processing method and device, electronic equipment and storage medium - Google Patents
Data processing method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN112883316A CN112883316A CN202110229775.6A CN202110229775A CN112883316A CN 112883316 A CN112883316 A CN 112883316A CN 202110229775 A CN202110229775 A CN 202110229775A CN 112883316 A CN112883316 A CN 112883316A
- Authority
- CN
- China
- Prior art keywords
- user
- data
- object information
- information
- writing
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 12
- 238000000034 method Methods 0.000 claims abstract description 74
- 238000012545 processing Methods 0.000 claims abstract description 23
- 230000015654 memory Effects 0.000 claims description 26
- 230000004044 response Effects 0.000 claims description 22
- 230000002688 persistence Effects 0.000 claims description 19
- 230000000694 effects Effects 0.000 claims description 8
- 238000004590 computer program Methods 0.000 claims description 7
- 230000008030 elimination Effects 0.000 claims description 2
- 238000003379 elimination reaction Methods 0.000 claims description 2
- 238000010586 diagram Methods 0.000 description 8
- 230000008569 process Effects 0.000 description 8
- 238000005516 engineering process Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 238000012423 maintenance Methods 0.000 description 2
- 241000283965 Ochotona princeps Species 0.000 description 1
- 238000013475 authorization Methods 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000014509 gene expression Effects 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000002085 persistent effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/958—Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/953—Querying, e.g. by the use of web search engines
- G06F16/9535—Search customisation based on user profiles and personalisation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/953—Querying, e.g. by the use of web search engines
- G06F16/9538—Presentation of query results
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The application discloses a data processing method, a data processing device and electronic equipment, wherein the method comprises the following steps: acquiring object information of a target object to be processed, and acquiring a first user identifier of a first user, wherein the target object is issued by the first user; acquiring a data issuing level of a second user according to the first user identifier, wherein the second user is a user having a first association relation with the first user; and writing the object information into a first object storage sequence corresponding to the second user under the condition that the data issuing level meets a preset issuing condition. The method can reliably and efficiently provide the target object to the second user meeting the preset issuing condition.
Description
Technical Field
The present disclosure relates to the field of data processing technologies, and in particular, to a data processing method, an apparatus, an electronic device, and a computer-readable storage medium.
Background
With the continuous development of the mobile internet technology, a user can conveniently and quickly obtain rich and diverse information through terminal equipment, and a feed stream is used as a data providing mode, so that the user can focus limited energy on information concerned by the user in massive information, and great convenience is brought to the user, wherein the feed stream is an outlet of the information stream, and feed data in the feed stream can be data such as characters, images, audio and video.
At present, a method for providing a feed stream generally includes writing feed data into an inbox, i.e., an Input box, created for each user, for storing the feed data one by a server; and the terminal equipment responds to the query operation of the user, reads the feed data from the inbox of the user and displays the feed data to the user for viewing.
Although the method can provide the feed data to the user, the method still has certain deficiencies in timeliness and reliability because the data volume of the feed data or other similar data is larger and larger, and therefore how to reliably and efficiently provide the data to the user becomes a problem to be solved urgently.
Disclosure of Invention
The embodiment of the disclosure provides a data processing method, a data processing device, an electronic device, a storage medium and a data display method, which can reliably and efficiently provide data for a user.
In a first aspect of the present disclosure, a data processing method is provided, where the method includes:
acquiring object information of a target object to be processed, and acquiring a first user identifier of a first user, wherein the target object is issued by the first user;
acquiring a data issuing level of a second user according to the first user identifier, wherein the second user is a user having a first association relation with the first user;
and writing the object information into a first object storage sequence corresponding to the second user under the condition that the data issuing level meets a preset issuing condition.
In a second aspect of the present disclosure, there is also provided a data display method, including:
acquiring a second user identifier of a second user;
acquiring the data issuing level of the second user according to the second user identification;
acquiring target object information under the condition that the data issuing level does not meet a preset issuing condition, wherein the target object information comprises object information of an object issued by a first user within preset time, and the first user is a user having a second association relationship with a second user;
and displaying the target object information.
In a third aspect of the present disclosure, there is also provided a data processing apparatus, including:
the information acquisition module is used for acquiring object information of a target object to be processed and acquiring a first user identifier of a first user, wherein the target object is issued by the first user;
a data issuing level obtaining module, configured to obtain a data issuing level of a second user according to the first user identifier, where the second user is a user having a first association relationship with the first user;
and the information issuing module is used for writing the object information into a first object storage sequence corresponding to the second user under the condition that the data issuing level meets a preset issuing condition.
According to a fourth aspect of the present disclosure, there is also provided an electronic device, including:
a memory for storing executable instructions;
a processor configured to execute the electronic device to perform the method according to the first or second aspect of the disclosure according to the control of the executable instructions.
According to a fifth aspect of the present disclosure, there is also provided a computer readable storage medium storing a computer program readable and executable by a computer, the computer program being configured to perform the method according to the first or second aspect of the present disclosure when read and executed by the computer.
The method has the advantages that after the object information of the target object to be processed, such as feed data information, is acquired and the first user identifier of the first user of the target object is issued, the data issuing level of the user having the first association relation with the first user can be acquired according to the first user identifier, and then whether the first object storage sequence corresponding to the second user is written into the first object storage sequence corresponding to the second user, such as the object information of the target object in the inbox is determined according to whether the data issuing level meets the preset issuing condition or not; compared with the prior art that when the target object, such as feed data, is sent to the user, the method does not make any distinction but all sends the feed data, the method can reduce the data volume needing to be written at the same time, and further the object information of the target object can be timely, reliably and efficiently provided for a second user.
Other features of the present disclosure and advantages thereof will become apparent from the following detailed description of exemplary embodiments thereof, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a schematic flow chart of a data processing method according to an embodiment of the present disclosure.
Fig. 2 is a schematic flow diagram of a data persistence process provided by an embodiment of the present disclosure.
Fig. 3 is a schematic flowchart of a server providing data to a terminal device according to an embodiment of the present disclosure.
Fig. 4 is a schematic flow chart diagram of a data display method provided in the embodiment of the present disclosure.
Fig. 5 is a functional block diagram of a data processing apparatus provided in an embodiment of the present disclosure.
Fig. 6 is a schematic diagram of a hardware structure of an electronic device provided in an embodiment of the present disclosure.
Detailed Description
Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, the numerical expressions, and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless specifically stated otherwise.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the disclosure, its application, or uses.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
In all examples shown and discussed herein, any particular value should be construed as merely illustrative, and not limiting. Thus, other examples of the exemplary embodiments may have different values.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
< method embodiment I >
In the process of implementing the present application, the inventor finds that, when providing a target object, such as feed data, to a user, data in a user inbox, i.e., an Input box, may be generally stored in a memory, for example, feed data is stored in a Redis database, and since the read-write speed of the memory is much greater than the read-write speed of a disk, the method may solve the problem of providing the target object to the user in time; however, since the cost of the memory is much higher than that of the disk, in practice, the same feed data may be written into the inboxes of thousands of users, which causes a great cost problem if the data in the user inboxes are all stored in the memory, and since the data in the memory is volatile, the method has certain disadvantages in reliability and stability. In this embodiment, the user inbox, i.e. the Input box, may be a sequence for storing user attention content, for example, object information of a target object, where the stored information may be generally sorted by time or may also be sorted based on a user attention factor; correspondingly, in this embodiment, the user outbox, i.e. the Output box, may be a sequence for storing object information of the user-issued content, e.g. the target object, and when a user other than the user wants to view the target object issued by the user, the user outbox can generally obtain the content by viewing the content in the user outbox.
To solve the above problems, an embodiment of the present disclosure provides a data processing method, please refer to fig. 1, which is a schematic flow chart of the data processing method provided by the embodiment of the present disclosure. The method can be implemented by an electronic device, and the electronic device can be a server, for example, a blade server, a rack server, or the like, or can also be a server cluster deployed in a cloud, which is not particularly limited herein; of course, according to actual needs, the electronic device may also be a terminal device, for example, a smart phone, a portable computer, a desktop computer, a tablet computer, a wearable device, and the like, which is not limited herein.
As shown in fig. 1, the method of the present embodiment may include the following steps S1100-S1300, which are described in detail below.
Step S1100, acquiring object information of a target object to be processed, and acquiring a first user identifier of a first user, where the target object is issued by the first user.
The target object is an information unit, and may specifically be data such as characters, images, audio, and video, for example, feed data in a feed scene; it should be noted that, in this embodiment, unless otherwise specified, the target object is taken as feed data for example, but needless to say, in the specific implementation, the target object may be other types of data according to different application scenarios, and the present invention is not limited specifically herein.
The object information may be information describing a target object, and may be, for example, information such as an object identifier, an object profile, and the like, where the object identifier is used to uniquely identify the target object, and may be, for example, a feed id; of course, the object information may also be attribute information of the target object, for example, information such as a data format of the target object, a size of the target object, a publishing user of the target object, a publishing time and an updating time of the target object; in this embodiment, the object information of the target object at least includes an object identifier.
A first user who is a user who issues a target object; it should be noted that, in this embodiment, descriptions such as "first" and "second" are used to distinguish and describe different objects, but not to refer to a certain user specifically, for example, a first user refers to a user who publishes a target object, and a second user may be a user who has a first association relationship with the first user, for example, in a content application, the second user may be a user who focuses on the first user, that is, a fan of the first user; in the social application, the first user and the second user may be in a friend relationship with each other.
The first user identifier is an identifier for uniquely identifying the first user, and may be a user ID, for example.
In a specific implementation, the object information of the target object and the first user identifier of the first user may be obtained from a task data of the target task sequence, in this embodiment, the target task sequence may be a message queue for storing related information of an object to be delivered, for example, the target task sequence may be a message queue based on rocktmq, where rocktmq is a distributed message publishing and subscribing system, and of course, the message queue may also be implemented in other manners, for example, the target task sequence may also be a message queue based on Rabbitmq, which is not limited herein.
That is, the object information and the first user identification of the target object may be obtained from a target task sequence, which in one embodiment is maintained by the method; acquiring object information of an object issued by the first user; and writing the object information of the object and the first user identification into the target task sequence correspondingly.
Here, the maintenance processing of the target task sequence is described by taking the target object as the feed data in the feed scene as an example. In specific implementation, a first user, for example, a user01, may use a terminal device logged with its account to issue feed data, for example, feed 01; in response to the issuing operation of the user01, the terminal device sends a data issuing request to the server; after receiving the data publishing request, the server may record the feed data by using a publishing module for recording user feed data therein, for example, store the feed01 in a feed data table, and send a notification message indicating that the user01 publishes the feed01 to the feed publishing module; after the notification message is acquired by the issuing module of the server, a piece of task data is generated at least according to the first user identifier of the first user, namely the user01, and the data identifier of the feed data, namely the feed01, and the task data is written into a message queue based on the Rocktmq. It should be noted that, here, only the object information includes the object identifier of the target object, and the task data in the target task sequence includes only the object information of the target object and the first user identifier of the first user, which is taken as an example for description.
After the task data in the target task sequence is obtained through maintenance, the server may obtain a piece of task data from the target task sequence according to a preset time interval or according to a sequence in which the task data is added to the target task sequence, and obtain object information of the target object to be processed, that is, to be delivered, and a first user identifier of a first user who issues the target object from the task data, for example, the feed data "feed 01" and the user identifier "user 01" of the user who issues the feed data may be obtained from the target task sequence.
As can be seen from the above description, in this embodiment, after the first user issues the target object, the target object does not need to be issued in real time to avoid increasing the amount of the concurrent data of the server and further causing data congestion, but the server can adaptively process the issued task according to its own performance by generating the issued task for issuing the target object and adding the issued task to the target task sequence, so as to reduce the amount of the concurrent data in unit time and reliably and stably process the issued task. It should be noted that, in the above embodiment, when the embodiment is implemented specifically, it is needless to say that the target object may be issued in other manners as well, and details are not described here again.
Step S1200, obtaining a data distribution level of a second user according to the first user identifier, where the second user is a user having a first association relationship with the first user.
In this embodiment, the first association relationship may be a user having a friend relationship with the first user, or may also be a user setting the first user as a user concerning the user, that is, the second user may be a fan of the first user.
Specifically, after obtaining the object information of the target object to be processed, that is, to be delivered and the first user identifier, in this embodiment, unlike the problem that in the prior art, when the second user to be delivered is not distinguished, but all the second users corresponding to the first user are simply obtained, and the object information is delivered to the second users at the same time, the speed is slow and the efficiency is low, in this embodiment, for the object information to be processed, the second user identifier of the second user having the first association with the first user may be obtained first according to the first user identifier of the first user and a preset user correspondence, and the data delivery level of the second user may be obtained according to the second user identifier.
The data delivery level represents the timeliness of the data delivery processing for the second user, and in this embodiment, the data delivery level may be a user activity level, that is, a numerical value representing the activity degree of the user using the application program.
In specific implementation, after obtaining the user authorization, the terminal device or the server may obtain the activity of the user at different times according to the user behavior log of the application used by the user, and the specific method is not described herein again.
After the data issuing level of the second user, such as the user activity, is obtained through the above processing, the object information can be specifically issued.
Step S1300, writing the object information into the first object storage sequence corresponding to the second user when the data delivery level meets a preset delivery condition.
In an embodiment, the writing the object information into the object issuing sequence corresponding to the second user when the data issuing level meets a preset issuing condition includes: and writing the object information into the first object storage sequence under the condition that the user activity is not less than a preset threshold value.
In this embodiment, the first object storage sequence may be a sequence stored in the memory and used for storing object information of the latest target object, for example, an inbox used for storing related information of feed data, that is, an Input box; in specific implementation, in order to facilitate rapid completion of data distribution processing and rapid reading of the latest data by the terminal device, the first object storage sequence may be stored in a Redis database.
Specifically, in this embodiment, after obtaining a target object to be delivered, that is, a second user, it may be determined whether the second user is active by obtaining user activity of the second user at the current time, and if the second user is active, it represents that the second user may be currently browsing information using a terminal device.
That is, in this embodiment, when the method is applied to a server, after the step of writing the object information to the first object storage sequence corresponding to the second user, the method further includes: and pushing the data in the first object storage sequence to terminal equipment, wherein the terminal equipment comprises equipment logged in with the account of the second user.
In one embodiment, after step S1100, that is, after the object information of the target object and the first user identifier of the first user are acquired, in order to increase the speed of the terminal device when pulling data from the server, the method further includes: obtaining the user type of the first user according to the first user identification; and writing the object information into a second object storage sequence corresponding to the first user under the condition that the user type is a first preset type.
In this embodiment, the user type represents a degree to which information issued by the user is concerned by other users, for example, the user type may be divided into a core user and a non-core user, where the core user may be determined according to the number of other users who are concerned about the user, for example.
Specifically, in this embodiment, after obtaining the first user identifier, the number of second users having the first association relationship with the first user may be obtained according to the first user identifier, and whether the user type of the first user is a first preset type, for example, whether the user type is a core user, may be determined according to the number and the user level of the first user; if the core user is the core user, the target object which is characterized by being issued by the first user can be viewed by the second user in real time or viewed by other users except the second user in real time; at this time, in order to facilitate that the terminal device used by the second user or another user can quickly pull the target object, in this embodiment, the object information of the target object issued by the first user may be written into a second object storage sequence corresponding to the first user, for example, an outbox, that is, an Output box, where the second object storage sequence may also be stored in a memory, for example, a Redis database.
Specifically, after the foregoing steps S1100 to S1300, after writing the object information of the target object to be delivered to the first object storage sequence of the second user, since the first object storage sequence is usually stored in a memory, i.e. a volatile memory, in order to increase the data reading and writing speed, in order to reduce the high cost problem caused by memory consumption, in this embodiment, when writing the object information of the target object into the first object storage sequence of the second user, the method specifically includes: setting the expiration time of the object information according to a preset expiration time; setting a persistence identifier for representing whether the object information is subjected to the persistence processing to be in a first state, wherein the first state represents that the object information is not subjected to the persistence processing; writing the object information, the expiration time and the persistence identification into the first object storage sequence correspondingly.
Correspondingly, please refer to fig. 2, which is a flow chart illustrating a data persistence process provided by the present disclosure. As shown in fig. 2, in this embodiment, the method further includes: step S2100, obtaining first object information with a persistent identifier in the first state from the first object storage sequence according to a first preset time period, where the first preset time period is less than the preset expiration time; step S2200, merging the first object information to obtain the data to be persisted; step S2300, writing the data to be persisted into a third object storage sequence corresponding to the second user, wherein the third object storage sequence is stored in a non-volatile memory; step S2400, setting a persistence flag of the first object information in the first object storage sequence to a second state, where the first state indicates that persistence processing has been performed on the object information.
In a specific implementation, in order to balance the problem that the data reading and writing speeds between the volatile memory and the nonvolatile memory are different, in this embodiment, when step S2300 is executed, the writing the data to be persisted into the third object storage sequence corresponding to the second user includes: step S2301, writing the data to be persisted and the second user identification of the second user into a target persistency task sequence; step S2302 writes the data to be persisted into the third object storage sequence according to the target persistency task sequence.
Here, the description will be made by taking feed data in a feed scene as an example. Specifically, when the server writes the feed data into the inbox of the second user, in order to reduce the cost, the server may set the expiration time of the feed data while writing the feed data, for example, set the expiration time to be 7 days later, and then the server may calculate the expiration time of the feed data according to the expiration time and the current time when writing the feed data, and write the expiration time at the same time; also, to facilitate the user to view his historical attention data, after the stale data is purged from the second user's inbox, it may be persisted, i.e., written to non-volatile memory, e.g., a disk storage based pika database.
In addition, in this embodiment, in order to balance the data read/write speed difference between the volatile memory and the nonvolatile memory, that is, between the internal memory and the disk storage, in a specific implementation, the expired data may not be persisted one by one, but all the expired data may be merged at a time according to a first preset time period, for example, 1 hour, and a task data to be persisted is generated according to the merged expired data, and the task data with persistency is added to the target persistency task sequence, so that the server may adaptively perform the data persistence according to the target persistency task sequence, thereby balancing the data read/write speed difference between the volatile memory and the nonvolatile memory.
Further, in this embodiment, the method further comprises: and deleting the object information with the expiration time later than the current time from the first object storage sequence according to a second preset time period, wherein the second preset time period is not less than the first preset time period. In the concrete implementation, the execution timing of this step is not particularly limited, and for example, this step may be executed before, after, or at the same time as any of the above steps S2100 to S2400.
As can be seen from the above description, in this embodiment, when writing the object information of the target object into the first object storage sequence of the second user, by setting the expiration time and the persistence identifier of the object information, and by adopting the target persistence task sequence to merge the expired data as the data to be persisted first, and performing data persistence processing, the contradiction between the fast and slow memories can be solved ingeniously, and not only can the storage cost be reduced, but also the server can provide a highly available and highly reliable service.
In one embodiment, when a second user browses information by using a terminal device logged with an account, the terminal device may obtain a second user identifier of the second user, determine a data transmission level of the second user according to the second user identifier, and if the data transmission level meets a preset condition, according to the above description, a server may automatically push latest information to the terminal device so that the terminal device can display the information; however, when the data delivery level of the user does not satisfy the preset condition, the terminal device is required to actively acquire the latest information, so that the embodiment further provides a data display method applied to the terminal device, where the method includes: acquiring a second user identifier of a second user; acquiring the data issuing level of the second user according to the second user identification; acquiring target object information under the condition that the data issuing level does not meet a preset issuing condition, wherein the target object information comprises object information of an object issued by a first user within preset time, and the first user is a user having a second association relationship with a second user; and displaying the target object information.
In this embodiment, the acquiring target object information includes: sending a data acquisition request to a server according to the second user identifier, wherein the data acquisition request is used for acquiring the target object information; receiving a data response message which is returned by the server and corresponds to the data acquisition request; and obtaining the target object information according to the data response message.
Please refer to fig. 3, which is a schematic flowchart illustrating a process of providing data to a terminal device by a server according to an embodiment of the present disclosure. As shown in fig. 3, in this embodiment, after acquiring the data acquisition request sent by the terminal device, the data processing method applied to the server further includes: step S3100, receiving a data acquisition request sent by a terminal device, where the terminal device includes a device logged with an account of the second user, and the data acquisition request is used to acquire second object information of an object issued by the first user within a preset time; s3200, in response to the data obtaining request, writing the second object information into the first object storage sequence; and S3300, generating a data response message according to the second object information; and S3400, returning the data response message to the terminal equipment.
In a specific implementation, the generating a data response message according to the second object information includes: s3301, when the user type of the first user is a first preset type, obtaining third object information of an object stored in a second storage sequence of the first user; and S3302, generating the data response message according to the second object information and the third object information.
Wherein the generating the data response message according to the second object information and the third object information includes: carrying out duplication elimination processing on the second object information and the third object information to obtain first information to be returned; arranging the data in the first information to be returned according to a time sequence reverse order to obtain second information to be returned; and obtaining the data response message according to the second information to be returned.
Specifically, when the second user uses the terminal device to query information, the terminal device may respond to an operation of the second user, or the terminal device may determine whether the data delivery level of the second user at that time meets a preset data delivery condition according to a preset time period, and if not, the terminal device may send a data acquisition request for acquiring object information of a latest target object to the server to display the target object for the user to view; in response to the data acquisition request sent by the terminal device, the server may write the first object information of the target object newly issued by the first user concerned by the second user into the first object storage sequence, i.e. the inbox, one by one, and since the data may consume time in the process of writing one by one, especially when the data amount is large, the processing may even consume tens of minutes or even longer, in order to quickly provide the object information of the target object newly issued by the first user to the terminal device, in this embodiment, since the user type is the first preset type, i.e. the object information of the target object issued by the first user of the core user is also written into the second object storage sequence, i.e. the outbox, simultaneously in the process of executing the data writing processing according to the user type of the first user, therefore, at this time, the server can also directly obtain the second object information of the target object newly issued by the first user from the second object storage sequence of the first user, and quickly return the object information of the target object to the terminal device in a time reverse order after carrying out the deduplication processing on the first object information and the second object information.
To sum up, after acquiring object information of a target object to be processed, for example, feed data information, and issuing a first user identifier of a first user of the target object, the data processing method provided in this embodiment may first acquire a data distribution level of a user having a first association relationship with the first user according to the first user identifier, and further determine whether to write the object information of the target object into a first object storage sequence corresponding to a second user, for example, an inbox, according to whether the data distribution level meets a preset distribution condition; compared with the prior art that when the target object, such as feed data, is sent to the user, the method does not make any distinction but all sends the feed data, the method can reduce the data volume needing to be written at the same time, and further the object information of the target object can be timely, reliably and efficiently provided for a second user.
< method example two >
Corresponding to the first method embodiment, the present embodiment further provides a data display method, where the method may be applied to a terminal device, and the terminal device may be, for example, a smart phone, a portable computer, a desktop computer, a tablet computer, a wearable device, and the like, and is not limited herein.
Please refer to fig. 4, which is a flowchart illustrating a data displaying method according to an embodiment of the disclosure. As shown in FIG. 4, the method includes the following steps S4100-S4400, which are described in detail below.
Step S4100 acquires a second user identifier of the second user.
And step S4200, obtaining the data issuing level of the second user according to the second user identifier.
Step S4300, when the data issuing level does not meet a preset issuing condition, obtaining target object information, where the target object information includes object information of an object issued by a first user within a preset time, and the first user is a user having a second association relationship with a second user.
In one embodiment, the obtaining target object information includes: sending a data acquisition request to a server according to the second user identifier, wherein the data acquisition request is used for acquiring the target object information; receiving a data response message which is returned by the server and corresponds to the data acquisition request; and obtaining the target object information according to the data response message.
Step S4400, displaying the target object information.
< apparatus embodiment >
Corresponding to the above embodiments, in this embodiment, a data processing apparatus is further provided, and as shown in fig. 5, the apparatus 5000 may include an information obtaining module 5100, a data issuing level obtaining module 5200 and an information issuing module 5300.
The information obtaining module 5100 is configured to obtain object information of a target object to be processed, and obtain a first user identifier of a first user, where the target object is issued by the first user; the data issuing level obtaining module 5200 is configured to obtain a data issuing level of a second user according to the first user identifier, where the second user is a user having a first association relationship with the first user; the information issuing module 5300 is configured to, when the data issuing level meets a preset issuing condition, write the object information into a first object storage sequence corresponding to the second user.
< apparatus embodiment >
In this embodiment, an electronic device is also provided, as shown in fig. 6, the electronic device 6000 may further include a processor 6200 and a memory 6100, where the memory 6100 is configured to store executable instructions; the processor 6200 is configured to operate the electronic device according to control of the instruction to perform an index management method according to any embodiment of the present disclosure.
The electronic device 6000 may be a server, or may be other types of devices, such as a terminal device, and is not limited herein.
< media examples >
Corresponding to the above method embodiments, in this embodiment, a computer-readable storage medium is further provided, where a computer program that can be read and executed by a computer is stored, and when the computer program is read and executed by the computer, the computer program is configured to perform the method according to any of the above embodiments of the present disclosure.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. It is well known to those skilled in the art that implementation by hardware, by software, and by a combination of software and hardware are equivalent.
Having described embodiments of the present disclosure, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the present disclosure is defined by the appended claims.
Claims (18)
1. A data processing method, comprising:
acquiring object information of a target object to be processed, and acquiring a first user identifier of a first user, wherein the target object is issued by the first user;
acquiring a data issuing level of a second user according to the first user identifier, wherein the second user is a user having a first association relation with the first user;
and writing the object information into a first object storage sequence corresponding to the second user under the condition that the data issuing level meets a preset issuing condition.
2. The method of claim 1, wherein the object information and the first user identification are obtained from a target task sequence, the method maintaining the target task sequence by;
acquiring object information of an object issued by the first user;
and writing the object information of the object and the first user identification into the target task sequence correspondingly.
3. The method of claim 1, wherein the data delivery level comprises user activity;
under the condition that the data issuing level meets a preset issuing condition, writing the object information into an object issuing sequence corresponding to the second user, wherein the object issuing sequence comprises the following steps:
and writing the object information into the first object storage sequence under the condition that the user activity is not less than a preset threshold value.
4. The method according to claim 1, wherein the method is applied to a server, and after the step of writing the object information to the first object storage sequence corresponding to the second user, the method further comprises:
and pushing the data in the first object storage sequence to terminal equipment, wherein the terminal equipment comprises equipment logged in with the account of the second user.
5. The method of claim 1, wherein after obtaining the object information and the first subscriber identity, the method further comprises:
obtaining the user type of the first user according to the first user identification;
and writing the object information into a second object storage sequence corresponding to the first user under the condition that the user type is a first preset type.
6. The method of claim 1, wherein writing the object information to the first object storage sequence corresponding to the second user comprises:
setting the expiration time of the object information according to a preset expiration time; and the number of the first and second groups,
setting a persistence flag representing whether the object information is subjected to persistence processing to a first state, wherein the first state represents that the object information is not subjected to persistence processing;
writing the object information, the expiration time and the persistence identification into the first object storage sequence correspondingly.
7. The method of claim 6, wherein the first object storage sequence is stored in a volatile memory;
the method further comprises the following steps:
acquiring first object information with a persistence identifier in the first state from the first object storage sequence according to a first preset time period, wherein the first preset time period is less than the preset expiration time;
merging the first object information to obtain data to be persisted;
writing the data to be persisted into a third object storage sequence corresponding to the second user, wherein the third object storage sequence is stored in a nonvolatile memory;
and setting the persistence identification of the first object information in the first object storage sequence to be in a second state, wherein the first state represents that the object information is subjected to persistence processing.
8. The method according to claim 7, wherein the writing the data to be persisted into a third object storage sequence corresponding to the second user comprises:
writing the data to be persisted and a second user identifier of the second user into a target persistency task sequence correspondingly;
and writing the data to be persisted into the third object storage sequence according to the target persisted task sequence.
9. The method of claim 6, further comprising:
and deleting the object information with the expiration time later than the current time from the first object storage sequence according to a second preset time period, wherein the second preset time period is not less than the first preset time period.
10. The method according to claim 1, wherein the method is applied to a server, and in case that the data delivery level does not satisfy the preset delivery condition, the method further comprises:
receiving a data acquisition request sent by terminal equipment, wherein the terminal equipment comprises equipment logged with an account of the second user, and the data acquisition request is used for acquiring second object information of an object issued by the first user within preset time;
writing the second object information to the first object storage sequence in response to the data acquisition request; and the number of the first and second groups,
generating a data response message according to the second object information;
and returning the data response message to the terminal equipment.
11. The method of claim 10, wherein generating a data response message according to the second object information comprises:
acquiring third object information of objects stored in a second storage sequence of the first user under the condition that the user type of the first user is a first preset type;
and generating the data response message according to the second object information and the third object information.
12. The method of claim 11, wherein generating the data response message based on the second object information and the third object information comprises:
carrying out duplication elimination processing on the second object information and the third object information to obtain first information to be returned;
arranging the data in the first information to be returned according to a time sequence reverse order to obtain second information to be returned;
and obtaining the data response message according to the second information to be returned.
13. The method of claim 1, wherein the target object comprises feed data and the object information comprises an identification of the feed data.
14. A data display method is applied to terminal equipment and comprises the following steps:
acquiring a second user identifier of a second user;
acquiring the data issuing level of the second user according to the second user identification;
acquiring target object information under the condition that the data issuing level does not meet a preset issuing condition, wherein the target object information comprises object information of an object issued by a first user within preset time, and the first user is a user having a second association relationship with a second user;
and displaying the target object information.
15. The method of claim 14, wherein the obtaining target object information comprises:
sending a data acquisition request to a server according to the second user identifier, wherein the data acquisition request is used for acquiring the target object information;
receiving a data response message which is returned by the server and corresponds to the data acquisition request;
and obtaining the target object information according to the data response message.
16. A data processing apparatus, comprising:
the information acquisition module is used for acquiring object information of a target object to be processed and acquiring a first user identifier of a first user, wherein the target object is issued by the first user;
a data issuing level obtaining module, configured to obtain a data issuing level of a second user according to the first user identifier, where the second user is a user having a first association relationship with the first user;
and the information issuing module is used for writing the object information into a first object storage sequence corresponding to the second user under the condition that the data issuing level meets a preset issuing condition.
17. An electronic device, comprising:
a memory for storing executable instructions;
a processor configured to execute the electronic device to perform the method according to the control of the instruction, wherein the method is as claimed in any one of claims 1 to 15.
18. A computer-readable storage medium, in which a computer program is stored which is readable and executable by a computer, and which, when read and executed by the computer, is adapted to perform the method according to any one of claims 1 to 15.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110229775.6A CN112883316A (en) | 2021-03-02 | 2021-03-02 | Data processing method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110229775.6A CN112883316A (en) | 2021-03-02 | 2021-03-02 | Data processing method and device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112883316A true CN112883316A (en) | 2021-06-01 |
Family
ID=76055210
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110229775.6A Pending CN112883316A (en) | 2021-03-02 | 2021-03-02 | Data processing method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112883316A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113961829A (en) * | 2021-10-15 | 2022-01-21 | 上海一谈网络科技有限公司 | Improved friend list generation method, device and equipment based on push-pull model |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105827706A (en) * | 2016-03-24 | 2016-08-03 | 努比亚技术有限公司 | Information push device and method |
CN108737535A (en) * | 2018-05-14 | 2018-11-02 | 平安科技(深圳)有限公司 | A kind of information push method, storage medium and server |
CN111083217A (en) * | 2019-12-11 | 2020-04-28 | 北京达佳互联信息技术有限公司 | Method and device for pushing Feed stream and electronic equipment |
CN112153426A (en) * | 2020-09-21 | 2020-12-29 | 腾讯科技(深圳)有限公司 | Content account management method and device, computer equipment and storage medium |
CN112380266A (en) * | 2020-10-16 | 2021-02-19 | 广州市百果园网络科技有限公司 | Message data processing method, device, equipment and storage medium |
-
2021
- 2021-03-02 CN CN202110229775.6A patent/CN112883316A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105827706A (en) * | 2016-03-24 | 2016-08-03 | 努比亚技术有限公司 | Information push device and method |
CN108737535A (en) * | 2018-05-14 | 2018-11-02 | 平安科技(深圳)有限公司 | A kind of information push method, storage medium and server |
CN111083217A (en) * | 2019-12-11 | 2020-04-28 | 北京达佳互联信息技术有限公司 | Method and device for pushing Feed stream and electronic equipment |
CN112153426A (en) * | 2020-09-21 | 2020-12-29 | 腾讯科技(深圳)有限公司 | Content account management method and device, computer equipment and storage medium |
CN112380266A (en) * | 2020-10-16 | 2021-02-19 | 广州市百果园网络科技有限公司 | Message data processing method, device, equipment and storage medium |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113961829A (en) * | 2021-10-15 | 2022-01-21 | 上海一谈网络科技有限公司 | Improved friend list generation method, device and equipment based on push-pull model |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105827706B (en) | Message pushing device and method | |
CN110458524B (en) | Automatic calendaring method and system | |
US20140081974A1 (en) | Aggregating Electronic Content Items from Different Sources | |
CN109299164B (en) | Data query method, computer readable storage medium and terminal equipment | |
CN112860750B (en) | Data processing method, device, electronic equipment and storage medium | |
CN106708912B (en) | Junk file identification and management method, identification device, management device and terminal | |
US20130006996A1 (en) | Clustering E-Mails Using Collaborative Information | |
CN108596690B (en) | Advertisement processing method and device | |
CN108255915B (en) | File management method and device and machine-readable storage medium | |
US11470030B2 (en) | Temporary suspension of electronic communications | |
CN111400056B (en) | Message transmission method, device and equipment based on message queue | |
CN110347674A (en) | A kind of index creation method, device and equipment based on service identification | |
CN110019367B (en) | Method and device for counting data characteristics | |
US20170329871A1 (en) | Using a b-tree to store graph information in a database | |
CN109213733A (en) | File classifying method, equipment and system | |
CN112883316A (en) | Data processing method and device, electronic equipment and storage medium | |
CN111552575B (en) | Message consumption method, device and equipment based on message queue | |
US20170220999A1 (en) | Techniques for document management workflows | |
CN109542680A (en) | A kind of method of file backup, equipment and computer storage medium | |
US9176645B1 (en) | Manipulating collections of items in a user interface | |
CN107301212B (en) | Method and device for aggregating character dynamics | |
US10482105B1 (en) | External verification of content popularity | |
CN112015982B (en) | Customized news generation method, device, equipment and storage medium | |
CN112632266B (en) | Data writing method and device, computer equipment and readable storage medium | |
CN114489770A (en) | Gray scale distribution method and device, computer equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |