CN108322380B - Method and device for calling data and method and device for pushing information - Google Patents

Method and device for calling data and method and device for pushing information Download PDF

Info

Publication number
CN108322380B
CN108322380B CN201710029106.8A CN201710029106A CN108322380B CN 108322380 B CN108322380 B CN 108322380B CN 201710029106 A CN201710029106 A CN 201710029106A CN 108322380 B CN108322380 B CN 108322380B
Authority
CN
China
Prior art keywords
data
message
container
category
time
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.)
Active
Application number
CN201710029106.8A
Other languages
Chinese (zh)
Other versions
CN108322380A (en
Inventor
王洪磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Zhangmen Science and Technology Co Ltd
Original Assignee
Shanghai Zhangmen Science and Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shanghai Zhangmen Science and Technology Co Ltd filed Critical Shanghai Zhangmen Science and Technology Co Ltd
Priority to CN201710029106.8A priority Critical patent/CN108322380B/en
Publication of CN108322380A publication Critical patent/CN108322380A/en
Application granted granted Critical
Publication of CN108322380B publication Critical patent/CN108322380B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/21Monitoring or handling of messages
    • H04L51/214Monitoring or handling of messages using selective forwarding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/55Push-based network services

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application discloses a method and a device for calling data. One embodiment of the method comprises: acquiring a calling request for data, wherein the calling request comprises a time element and a calling condition; searching a message sub-container of a time element which accords with the calling request from a message time container, wherein the message time container comprises a time message key value pair which takes the time element as a key and takes the message sub-container as a value; and inquiring data meeting the calling condition based on the searched message sub-container. The implementation method realizes that the message sub-container of the time element which accords with the calling request is directly positioned in the message time container, and then the data which accords with the calling condition is searched in the message sub-container, and compared with the method of calling the data which accords with the calling condition by traversing the data set, the efficiency of calling the data is improved.

Description

Method and device for calling data and method and device for pushing information
Technical Field
The application relates to the technical field of computers, in particular to the technical field of the Internet, and particularly relates to a method and a device for calling data and a method and a device for pushing information.
Background
Current time-related data, typically in the dimension of categories (e.g., single entities that can be individually labeled by users, devices, etc.), stores one time-related data for each category. The structure of the time-dependent data may comprise all categories for a set, and each category carries one time-dependent data.
When the current time-related data is called, the whole set needs to be traversed to query the category meeting the time condition. However, when frequently searching for message contents of one or more categories satisfying the time condition, the method for invoking data needs to traverse the entire set each time, and when the number of categories is large, it is inefficient to traverse the entire set to invoke the message contents.
Disclosure of Invention
The present application is directed to an improved method and apparatus for invoking data and a method and apparatus for pushing information, so as to solve the technical problems mentioned in the above background.
In a first aspect, the present application provides a method for invoking data, the method comprising: acquiring a calling request for data, wherein the calling request comprises a time element and a calling condition; searching a message sub-container of a time element which accords with the calling request from a message time container, wherein the message time container comprises a time message key value pair which takes the time element as a key and takes the message sub-container as a value; and inquiring data meeting the calling condition based on the searched message sub-container.
In some embodiments, the obtaining a call request for data comprises: receiving a call request for data; and the method further comprises: and returning the data meeting the calling condition to a sender of the calling request.
In some embodiments, the message sub-container comprises a key-value pair keyed by a unique identification number of a category and valued by message content; and querying data meeting the calling condition based on the searched message sub-container comprises: and querying data which is in line with the calling condition in a key value pair which takes the unique identification number of the category as a key and takes the message content as a value from the searched message sub-container.
In some embodiments, the message time container is populated with data by: acquiring newly added data, wherein the newly added data comprises time elements, categories and message contents; storing the key value pair which takes the unique identification number of the category of the newly added data as a key and takes the message content of the newly added data as a value into a message sub-container which corresponds to the time element of the newly added data in the message time container; storing the key value pair which takes the category of the newly added data as a key and takes the time element of the newly added data as a value into a category information container; wherein the category information container comprises a key-value pair with a category as a key and a time element as a value.
In some embodiments, the message content in the message time container is updated with data by: receiving update data, the update data including a category and new message content; searching a time element of a category corresponding to the update data from the category information container; searching a message sub-container of a time element corresponding to the time element of the updated data in the message time container; and updating the message content of the unique identification number corresponding to the category of the updating data into the new message content in the message sub-container of which the time element corresponds to the time element of the updating data.
In some embodiments, the message content in the message time container is deleted by: receiving deletion data, the deletion data comprising a category; searching a time element of a category corresponding to the deleted data from the category information container; searching a message sub-container of the time element corresponding to the time element of the deleted data in the message time container; deleting the key value pair taking the unique identification number of the category of the deleted data as a key in the message sub-container of the time element corresponding to the time element of the deleted data; and deleting the key value pair taking the category of the deleted data as a key in the category message container.
In some embodiments, the method further comprises: and responding to the data which is in accordance with the calling condition in the key value pair which takes the unique identification number of the category as the key and takes the message content as the value and is not inquired in the searched message sub-container, and returning the prompt information that the calling data does not exist.
In some embodiments, the message sub-container comprises key-value pairs keyed by a unique identification number of a category and valued by a set of message content; and querying data meeting the calling condition based on the searched message sub-container comprises: and determining data meeting the calling condition from the key value pair which takes the unique identification number of the category as a key and takes the message content set as a value in the searched message sub-container.
In some embodiments, the message time container is populated with data by: acquiring newly added data, wherein the newly added data comprises time elements, categories and message contents; inquiring whether the category of the newly added data exists in a message sub-container corresponding to the time element of the newly added data; if the new data exists, storing the message content of the new data into a message content set of the unique identification number corresponding to the category of the new data; and if the new data does not exist, adding a key value pair taking the category of the new data as a key and taking the message content set as a value into the message sub-container, and storing the message content of the new data into the message content set corresponding to the category of the new data.
In some embodiments, the message content in the message time container is updated with data by: receiving updating data, wherein the updating data comprises a time element, a category, a message keyword to be updated and new message content; searching a message sub-container corresponding to the time element of the updating data from the message time container; searching a message content set corresponding to the unique identification number of the category of the updating data from the message sub-container corresponding to the time element of the updating data; and updating the message content conforming to the message keyword to be updated into the new message content in the message content set corresponding to the unique identification number of the category of the updating data.
In some embodiments, the message content in the message time container is deleted by: receiving deletion data, wherein the deletion data comprises a time element, a category and a message keyword to be deleted; searching a message sub-container corresponding to the time element of the deleted data from the message time container; searching a message content set of the unique identification number corresponding to the category of the deleted data from the message sub-container corresponding to the time element of the deleted data; and deleting the message content conforming to the key words of the message to be deleted in the message content set corresponding to the unique identification number of the category of the deleted data.
In some embodiments, the method further comprises: and responding to the key value pair which takes the unique identification number of the category as a key and takes the message content set as a value in the searched message sub-container, and returning the prompt information that the calling data does not exist if the data meeting the calling condition is not inquired.
In a second aspect, the present application provides a method for pushing information, where the method includes: and pushing information to the terminal according to the data which is obtained according to the calling condition by the data calling method.
In a third aspect, the present application provides an apparatus for invoking data, the apparatus comprising: the device comprises a calling request acquisition unit, a data processing unit and a data processing unit, wherein the calling request acquisition unit is used for acquiring a calling request for data, and the calling request comprises a time element and a calling condition; a message sub-container searching unit, configured to search a message sub-container of a time element that meets the invocation request from a message time container, where the message time container includes a time message key-value pair that takes the time element as a key and the message sub-container as a value; and the conforming data determining unit is used for inquiring the data conforming to the calling condition based on the searched message sub-container.
In some embodiments, the call request obtaining unit is further configured to: receiving a call request for data; and the apparatus further comprises: and the call data returning unit is used for returning the data meeting the call condition to a sender of the call request.
In some embodiments, the message sub-container in the message sub-container lookup unit includes a key-value pair keyed by a unique identification number of a category and valued by message content; and the coincidence data determining unit is further configured to: and querying data which is in line with the calling condition in a key value pair which takes the unique identification number of the category as a key and takes the message content as a value from the searched message sub-container.
In some embodiments, the message time container in the message sub-container lookup unit adds data via the following elements: a newly added data acquisition unit, configured to acquire newly added data, where the newly added data includes a time element, a category, and a message content; a message time storage unit, configured to store a key value pair with the unique identifier of the category of the newly added data as a key and the message content of the newly added data as a value into a message sub-container corresponding to the time element of the newly added data in the message time container; a category information storage unit for storing a key value pair having a category of the newly added data as a key and a time element of the newly added data as a value into a category information container; wherein the category information container comprises a key-value pair with a category as a key and a time element as a value.
In some embodiments, the message content in the message time container in the message sub-container lookup unit updates data via: an update data receiving unit for receiving update data, the update data including a category and a new message content; the updating time searching unit is used for searching the time elements of the category corresponding to the updating data from the category information container; an update sub-container searching unit, configured to search, in the message time container, a message sub-container whose time element corresponds to the time element of the update data; and the message content updating unit is used for updating the message content of the unique identification number corresponding to the category of the updating data into the new message content in the message sub-container of which the time element corresponds to the time element of the updating data.
In some embodiments, the message content in the message time container in the message sub-container lookup unit deletes data via: a deletion data receiving unit configured to receive deletion data, the deletion data including a category; the deletion time searching unit is used for searching the time elements of the category corresponding to the deletion data from the category information container; a deletion sub-container searching unit, configured to search, in the message time container, a message sub-container whose time element corresponds to the time element of the deletion data; a data key value pair deleting unit, configured to delete a key value pair with a unique identification number of a category of the deleted data as a key in a message child container of a time element of the deleted data corresponding to the time element; and the index key value pair deleting unit is used for deleting the key value pair taking the category of the deleted data as a key in the category message container.
In some embodiments, the apparatus further comprises: and the prompt information returning unit is used for responding to the data which is matched with the calling condition in the key value pair which takes the unique identification number of the category as the key and takes the message content as the value and is not inquired in the searched message sub-container, and returning the prompt information that the calling data does not exist.
In some embodiments, the message sub-container in the message sub-container lookup unit includes a key-value pair keyed by a unique identification number of a category and valued by a set of message contents; and the coincidence data determining unit is further configured to: and determining data meeting the calling condition from the key value pair which takes the unique identification number of the category as a key and takes the message content set as a value in the searched message sub-container.
In some embodiments, the message time container in the message sub-container lookup unit adds data via the following elements: the new data acquisition unit is used for acquiring new data, and the new data comprises time elements, categories and message contents; a newly added type inquiry unit, configured to inquire whether a type of the newly added data exists in a message sub-container corresponding to a time element of the newly added data; a message content storing unit, configured to store, in a message sub-container corresponding to a time element of the newly added data, if the category of the newly added data exists, the message content of the newly added data in a message content set corresponding to a unique identification number of the category of the newly added data; and the newly added data storage unit is used for adding a key value pair which takes the category of the newly added data as a key and takes the message content set as a value into the message sub-container if the category of the newly added data does not exist in the message sub-container corresponding to the time element of the newly added data, and storing the message content of the newly added data into the message content set corresponding to the category of the newly added data.
In some embodiments, the message content in the message time container in the message sub-container lookup unit updates data via: the device comprises a data receiving and updating unit, a data receiving and updating unit and a data updating unit, wherein the data receiving and updating unit is used for receiving updating data, and the updating data comprises a time element, a category, a message keyword to be updated and new message content; a searching and updating sub-container unit, configured to search, from the message time container, a message sub-container corresponding to a time element of the update data; a search message collection unit, configured to search a message content collection corresponding to the unique identification number of the category of the update data from the message sub-container corresponding to the time element of the update data; and the updating message content unit is used for updating the message content conforming to the message keyword to be updated into the new message content in the message content set corresponding to the unique identification number of the category of the updating data.
In some embodiments, the message content in the message time container in the message sub-container lookup unit deletes data via: the data receiving and deleting unit is used for receiving deleted data, and the deleted data comprises a time element, a category and a message keyword to be deleted; a search deletion sub-container unit, configured to search, from the message time container, a message sub-container corresponding to the time element of the deletion data; a search message collection unit, configured to search a message content collection corresponding to the unique identification number of the category of the deleted data from the message sub-container corresponding to the time element of the deleted data; and the message content deleting unit is used for deleting the message content conforming to the message keyword to be deleted in the message content set corresponding to the unique identification number of the category of the deleted data.
In some embodiments, the apparatus further comprises: and the prompt information returning unit is used for responding to that data meeting the calling condition is not inquired in a key value pair which takes the unique identification number of the category as a key and takes the message content set as a value in the searched message sub-container, and returning prompt information that the calling data does not exist.
In a fourth aspect, the present application provides an apparatus for pushing information, the apparatus comprising: and the information pushing unit is used for pushing information to the terminal according to the data which is obtained by the data calling device and accords with the calling condition.
According to the method and the device for calling data, firstly, a calling request for the data is obtained, the calling request comprises a time element and a calling condition, then, a message sub-container of the time element which accords with the calling request is searched from a message time container, finally, the data which accords with the calling condition is inquired based on the searched message sub-container, so that the message sub-container of the time element which accords with the calling request is directly positioned in the message time container, then, the data which accords with the calling condition is searched in the message sub-container, and compared with the method of calling the data which accords with the calling condition by traversing a data set, the efficiency of calling the data is improved.
According to the method and the device for pushing the information, the information is pushed to the terminal according to the data which is obtained by the method and the device for calling the data and accords with the calling condition.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is a schematic flow chart diagram illustrating one embodiment of a method for invoking data in accordance with the present application;
FIG. 2 is a schematic flow chart diagram illustrating one embodiment of a method for modifying data in a message time container in accordance with the present method of invoking data;
FIG. 3a illustrates an exemplary block diagram of a category information container for locating time elements in a message time container according to the method of invoking data in FIG. 2;
FIG. 3b illustrates an exemplary block diagram of a message time container according to the method of invoking data in FIG. 2;
FIG. 4 is a schematic flow chart diagram illustrating yet another embodiment of a method for modifying data in a message time container in accordance with the method for invoking data of the present application;
FIG. 5 is yet another exemplary block diagram of a message time container according to the method of invoking data in FIG. 4;
FIG. 6 is an exemplary block diagram of one embodiment of an apparatus to invoke data in accordance with the present application;
fig. 7 is a schematic structural diagram of a computer system suitable for implementing the terminal device or the server according to the embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
FIG. 1 illustrates a flow 100 of one embodiment of a method of invoking data according to the present application. The method for calling data comprises the following steps:
step 101, obtaining a call request for data.
In this embodiment, the invocation request may include a time element and an invocation condition. The time element is used to indicate a storage location of the message content, and the invocation condition may be a condition that the message content needs to satisfy, may be null, or may include a specific condition, such as a category (or a unique identification number (ID) of the category) corresponding to the message content and/or a keyword of the message content.
Step 102, searching the message sub-container of the time element which accords with the calling request from the message time container.
In this embodiment, the message time container includes a time message key-value pair keyed by a time element and valued by a message sub-container. After receiving the call request, a message sub-container corresponding to the time element of which the time element conforms to the call request can be searched from a key value pair included in the message time container. The time element here may be a predetermined element representing a certain time interval. For example, an element representing an hour, an element representing a minute, etc.
And 103, inquiring data meeting the calling condition based on the searched message sub-container.
In this embodiment, after finding the message sub-container corresponding to the time element whose time element meets the invocation request, the data meeting the invocation condition may be queried based on one or more pieces of message content included in the message sub-container and corresponding to the unique identification number of the category. The category here refers to a single body that can be independently expressed by a user, a device, or the like.
In some optional implementation manners of this embodiment, if the unique identification numbers of the categories included in the message sub-container correspond to the message contents one to one, that is, each category corresponds to only one piece of message content, a single message sub-container may include one or more key value pairs that take the unique identification numbers of the categories as keys and the message contents as values; the querying, based on the searched message sub-container, the data meeting the call condition may include: and querying data which is in line with the calling condition in a key value pair which takes the unique identification number of the category as a key and takes the message content as a value from the searched message sub-container.
In some optional implementation manners of this embodiment, if the unique identification number of the category included in the message sub-container corresponds to a plurality of pieces of message content, the message sub-container may include a key-value pair that takes the unique identification number of the category as a key and takes the message content set as a value, where the message content set includes the plurality of pieces of message content; the querying, based on the searched message sub-container, the data meeting the invoking condition may include: and determining data meeting the calling condition from the key value pair which takes the unique identification number of the category as a key and takes the message content set as a value in the searched message sub-container. That is, the data meeting the call condition is obtained from the data set meeting the call condition.
In some optional implementations of this embodiment, obtaining the call request for the data includes: receiving a call request for data; and the method for calling data further comprises: and returning the data meeting the calling condition to the sender of the calling request.
In this optional implementation, after the data meeting the call condition is obtained, the data meeting the call condition may be returned to the sender of the call request.
The method for calling data provided by the embodiment of the application includes the steps of firstly obtaining a calling request for data, wherein the calling request comprises a time element and a calling condition, then searching a message sub-container of the time element meeting the calling request from a message time container, then inquiring data meeting the calling condition based on the searched message sub-container, and finally returning the data meeting the calling condition to a sender of the calling request, so that the message sub-container of the time element meeting the calling request is directly located in the message time container, then searching the data meeting the calling condition from the message sub-container, and compared with the method for calling the data meeting the calling condition by traversing a data set, the efficiency of calling the data is improved.
Referring to fig. 2, a method for modifying data in the message time container in the embodiment corresponding to fig. 1 is described below.
FIG. 2 shows a flow 200 of one embodiment of a method for modifying data in a message time container in a method for invoking data of the present application. The unique identification number of the category included in the message sub-container of the message time container corresponds to the message content one to one. The method for modifying the data in the message time container comprises the following steps:
step 201, acquiring new data, wherein the new data comprises time elements, categories and message contents, and then executing step 202;
step 202, storing the key value pair taking the unique identification number of the category of the newly added data as a key and the message content of the newly added data as a value into a message sub-container corresponding to the time element of the newly added data in a message time container, and then executing step 203;
step 203, storing the key value pair taking the category of the newly added data as a key and the time element of the newly added data as a value into a category information container, and then executing optional step 204 and/or optional step 208;
optional step 204 of receiving update data, the update data comprising a category and a new message content, followed by optional step 205;
optional step 205, searching the time element of the category corresponding to the update data from the category information container, and then executing optional step 206;
optional step 206, in the message time container, searching the message sub-container of the time element corresponding to the time element of the update data, and then executing optional step 207;
optional step 207, in the message sub-container whose time element corresponds to the time element of the update data, the message content corresponding to the unique identification number of the category of the update data is updated to new message content.
Optional step 208 of receiving deletion data, the deletion data including a category, followed by optional step 209;
optional step 209, searching the time element of the category corresponding to the deleted data from the category information container, and then executing optional step 210;
optional step 210, in the message time container, searching the message sub-container of the time element corresponding to the time element of the deleted data, and then executing optional step 211;
optional step 211, deleting the key-value pair with the unique identification number of the category of the deleted data as the key in the message sub-container of the time element corresponding to the deleted data, and then executing optional step 212;
optional step 212, in the category message container, delete key-value pairs keyed by the category of the deleted data.
In this embodiment, the category information container includes a key-value pair having a category as a key and a time element as a value. The above steps 201 to 204 describe a process of adding data to the message time container, the above optional steps 204 to 207 describe a process of updating data in the message time container, and the above optional steps 208 to 212 describe a process of deleting data in the message time container. It should be understood by those skilled in the art that the present embodiment may only include a process of adding data, a process of adding data and updating data, a process of adding data and deleting data, and a process of adding data, updating data, and deleting data, which is not limited in the present application.
In the method for modifying data in the message time container provided in the above embodiment of the present application, the unique identification number of the category included in the message sub-container of the message time container corresponds to the message content set, and by performing operations such as adding or adding, updating, and/or deleting on the data in the message time container in the method for calling data, the efficiency of calling data from the message time container by the method for calling data is ensured.
Further, when the data in the message time container is updated or deleted, the category message container is constructed when the data is newly added, and a positioning index is provided for subsequently updating or deleting the data in the message time container, so that the efficiency of updating or deleting the data in the message time container is improved.
An exemplary application scenario of the method for invoking data in the embodiment corresponding to fig. 2 is described below with reference to fig. 3a and 3 b.
Fig. 3a illustrates an exemplary block diagram of a category information container for locating a time element in a message time container according to the method of invoking data in fig. 2.
As shown in fig. 3a, taking the category as the user and the time element as the minute as an example, the user information container 310 may include a key value pair, a key 311 in the key value pair being the user and a value 312 in the key value pair being the time element.
Fig. 3b illustrates an exemplary block diagram of a message time container according to the method of invoking data in fig. 2.
As shown in fig. 3b, taking the category as the user and the time element as the minute as an example, the message time container 320 includes a key value pair, the key 321 in the key value pair is divided into 1440 small sets of 0001, 0002 and 0003 … … 1440 by the latitude of the minute, and all the user data is put into one time interval in the corresponding 1440 small time sets according to the latitude of the time. That is, the value 322 in the key value pair corresponds to each time, there is a user data set, and the user data set includes a key value pair using the unique identification number (ID) of the user as a key and using the message content as a value.
When the message content of the corresponding user is frequently searched for in a time condition, for example, the data of the specific user at 777 minutes a day is searched for, the data of the minute can be directly located and extracted from fig. 3b, and then the users meeting the condition are screened out from the extracted data, so that the message content corresponding to the users meeting the condition is obtained, and all data do not need to be traversed again, so that the efficiency of frequent query is greatly improved. The key value pair with the user as the key and the time element as the value in fig. 3a indicates the corresponding relationship between the user and the time element, and can be used to quickly query which time interval the data of a certain user exists in, for quick positioning when updating or deleting the message content.
The method for calling data based on fig. 3a and 3b may include the following processes of adding data, updating data, deleting data and calling data:
1. and (3) newly adding data: the time-related data is first stored in a message time container. Example (c): for example, user 10000 has a time element of 00:03, and it will be stored in the message sub-container with time element of 0003 under the message time container, and add a key value pair of user ID (10000) -message content (data content) to the message sub-container. And finally, adding a key value pair with user ID10000 and time element 0003 in the category information container to establish the mapping relation between the user and the message sub-container where the user message content is located.
2. Updating data: firstly, the category information container is inquired about which message sub-container the data of the user ID10000 exists (for example, in the 0003 section), the message sub-container of the 0003 section is obtained from the message time container after the 0003 section, and then the data of the user is located according to the user ID to update the data.
3. And (4) deleting data: firstly, the category information container is inquired about which message sub-container the data of the user ID10000 has (for example, in an area 0003), the message sub-container of the area 0003 is obtained from the message time container after the area 0003, then the message content of the user is deleted according to the user ID, and then the mapping relation corresponding to the category information container is deleted.
4. Reading data: assuming that 00:03 minutes of data are used and the calling condition is null, all data with the time element of 0003 section are directly taken out from the message time container; if 00:03 minutes of data are to be used and the calling condition is not null, all data in the message sub-container corresponding to the 0003 segment are directly taken out from the message time container, and data meeting the calling condition is further taken out from all data in the message sub-container.
Referring to fig. 4, a method for modifying data in the message time container in the embodiment corresponding to fig. 1 is described below.
FIG. 4 shows a flow 400 of yet another embodiment of a method of the present application for invoking data to modify data in a message time container. The unique identification number of the category included in the message sub-container of the message time container corresponds to the message content set. The method for modifying the data in the message time container comprises the following steps:
step 401, acquiring new data, wherein the new data comprises time elements, categories and message contents, and then executing step 402;
step 402, inquiring whether the type of the newly added data exists in the message sub-container corresponding to the time element of the newly added data, if so, executing step 403, and if not, executing step 404;
step 403, storing the message content of the newly added data into the message content set corresponding to the unique identification number of the category of the newly added data, and then executing optional step 405 or optional step 409;
step 404, newly adding a key value pair taking the category of the newly added data as a key and taking the message content set as a value in the message sub-container, storing the message content of the newly added data into the message content set corresponding to the category of the newly added data, and then executing optional step 405 or optional step 409;
optional step 405, receiving update data, the update data comprising a time element, a category, a message keyword to be updated, and a new message content, followed by optional step 406;
optional step 406, searching a message sub-container corresponding to the time element of the update data from the message time container, and then executing optional step 407;
optional step 407 of finding a set of message contents corresponding to the unique identification number of the category of the update data from the message sub-container corresponding to the time element of the update data, followed by optional step 408;
optional step 408, in the message content set corresponding to the unique identification number of the category of the update data, the message content conforming to the message keyword to be updated is updated to be new message content.
Optional step 409 of receiving deletion data including time elements, categories, and message keywords to be deleted, and then performing optional step 410;
optional step 410, searching the message sub-container corresponding to the time element of the deleted data from the message time container, and then executing optional step 411;
optional step 411, searching a message content set corresponding to the unique identification number of the category of the deleted data from the message sub-container corresponding to the time element of the deleted data, and then executing optional step 412;
optional step 412, deleting the message content conforming to the keyword of the message to be deleted from the message content set corresponding to the unique identification number of the category of the deleted data.
In this embodiment, the message content set includes more than one message content. When a key value pair taking the unique identification number of the category of the newly added data as a key and the message content of the newly added data as a value is stored into a message sub-container corresponding to a time element of the newly added data in a message time container, if the unique identification number of the category of the newly added data exists in the message sub-container, the message content of the newly added data is directly stored into a message content set corresponding to the unique identification number of the category of the newly added data; if the unique identification number of the category of the newly added data does not exist in the message sub-container, creating a key value pair taking the unique identification number of the category of the newly added data as a key and the message content set as a value in the message sub-container, and storing the message content of the newly added data into the message content set corresponding to the key value pair.
The above steps 401 to 404 describe a process of adding data to the message time container, the above optional steps 405 to 408 describe a process of updating data in the message time container, and the above optional steps 409 to 412 describe a process of deleting data in the message time container. It should be understood by those skilled in the art that the present embodiment may only include a process of adding data, a process of adding data and updating data, a process of adding data and deleting data, and a process of adding data, updating data, and deleting data, which is not limited in the present application.
According to the method for modifying the data in the message time container provided by the embodiment of the application, the efficiency of calling the data from the message time container by the method for calling the data is ensured by performing the addition operation or the addition and the updating and/or deleting operation on the data in the message time container in the method for calling the data.
An exemplary application scenario of the method for invoking data in the embodiment corresponding to fig. 4 is described below with reference to fig. 5.
Fig. 5 is a diagram illustrating still another exemplary structure of a message time container according to the method of calling data of fig. 4.
As shown in fig. 5, taking the category as the user and the time element as the minute as an example, the message time container 500 includes a key-value pair, the key 510 in the key-value pair is the time element, and the value 520 in the key-value pair is the message sub-container. The keys 510 are divided into 1440 small sets of 0001, 0002, and 0003 … … 1440 in minutes, and all the user data are put into one time interval of the corresponding 1440 small time sets according to the time latitude. That is, the value 520 corresponds to each time interval, there is a user data set presented in a message sub-container manner, the user data set includes a key value pair with a unique identification number (ID) of a user as a key and a message content set as a value, wherein the message content set may include more than one message content.
When the message content of the corresponding user is frequently searched for in a time condition, for example, the data of a specific user at 777 minutes a day is searched for, the data of the minute can be directly located and extracted from fig. 5, and then the users meeting the condition are screened out from the extracted data, so that the message content meeting the condition is obtained from the message content set corresponding to the users meeting the condition, and all data do not need to be traversed again, so that the efficiency of frequent query is greatly improved.
The method for calling data based on fig. 5 may include the following processes of adding data, updating data, deleting data, and calling data:
1. newly adding data: the message sub-container is positioned in the message time container according to the time element of the newly added data and the user ID, and then the message content of the newly added data is stored in the message sub-container. Example (c): for example, user 10000 has a data with time element 00:03, and it will be stored in the message sub-container with time element 0003 under the upper message time container, and find out whether there is user ID (10000) in the message sub-container, if there is, add the message content of the new data in the message content set corresponding to user ID (10000); if not, a user ID (10000) -key value pair of the message content set is newly established, and the message content of the data to be newly added is added in the message content set.
2. Updating data: and positioning the message content set of the user according to the time element of the updating data and the user ID, and updating the data to be updated into new message content from the message content set according to the message keyword to be updated.
3. And (4) deleting data: and positioning the message content set of the user according to the time element of the deletion data and the user ID, deleting the message content conforming to the key words of the message to be deleted, and if the value corresponding to the user ID is deleted, further deleting the key value pair where the user ID is located. For example, data may be deleted from the front, data may be inserted from the back, and if data needs to be deleted according to the message keyword to be deleted, it may be determined which message content needs to be deleted according to the message keyword to be deleted after the message content set corresponding to the time segment and the user ID is fetched.
4. Reading data: assuming that 00:03 minutes of data are used and the calling condition is null, all data with the time element of 0003 section are directly taken out from the message time container; if 00:03 minutes of data are to be used and the calling condition is not null, all data in the message sub-container corresponding to the 0003 segment are directly taken out from the message time container, and data meeting the calling condition is further taken out from all data in the message sub-container.
Illustratively, taking a combination of the added data and the deleted data as an example, the message content may be an immutable message content, the message content set corresponding to the user ID in the message sub-container is an ordered set, the data inserted first in the ordered set may be deleted when deleted, and the data inserted last in the ordered set may be inserted when inserted.
In an embodiment of the present application, there is further provided a method for pushing information, where the method includes: and pushing information to the terminal according to the data meeting the calling condition obtained by the data calling method in the embodiment.
The information pushing method provided by the embodiment of the application improves the information pushing efficiency.
Further referring to fig. 6, as an implementation of the method, the present application provides an embodiment of an apparatus for invoking data, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 1, and thus, the operations and features described above for the method are also applicable to the apparatus 600 and the units included therein, and are not described again here. The device can be applied to various electronic equipment.
As shown in fig. 6, the apparatus 600 for calling data of the present embodiment includes: a call request obtaining unit 610, configured to obtain a call request for data, where the call request includes a time element and a call condition; a message sub-container searching unit 620, configured to search a message sub-container of a time element that meets the invocation request from a message time container, where the message time container includes a time message key-value pair that takes the time element as a key and takes the message sub-container as a value; and a matching data determining unit 630, configured to query, based on the searched message sub-container, data matching the invocation condition.
In some optional implementations of this embodiment, the call request obtaining unit is further configured to: receiving a call request for data; and the apparatus further comprises: and the call data returning unit is used for returning the data meeting the call condition to the sender of the call request.
In some optional implementation manners of this embodiment, the message sub-container in the message sub-container searching unit includes a key-value pair that takes the unique identification number of the category as a key and takes the message content as a value; and the coincidence data determining unit is further configured to: and querying data which is in line with the calling condition in a key value pair which takes the unique identification number of the category as a key and takes the message content as a value from the searched message sub-container.
In some optional implementations of this embodiment, the message time container in the message sub-container lookup unit adds new data via the following units: a new data acquiring unit (not shown in the figure) for acquiring new data, wherein the new data includes time elements, categories and message contents; a category information storing unit (not shown in the figure) for storing a key value pair having a category of the newly added data as a key and a time element of the newly added data as a value into a category information container; the category information container comprises a key value pair which takes a category as a key and a time element as a value; and a message time storage unit (not shown in the figure) for storing the key value pair with the unique identification number of the category of the newly added data as a key and the message content of the newly added data as a value into the message sub-container corresponding to the time element of the newly added data in the message time container.
In some optional implementations of this embodiment, the message content in the message time container in the message sub-container lookup unit updates the data via the following units: an update data receiving unit (not shown in the figure) for receiving update data, the update data including a category and a new message content; an update time search unit (not shown in the figure) for searching a time element of a category corresponding to the update data from the category information container; an update sub-container searching unit (not shown in the figure) configured to search, in the message time container, a message sub-container of which the time element corresponds to the time element of the update data; and a message content updating unit (not shown in the figure) for updating the message content corresponding to the unique identification number of the category of the update data to the new message content in the message sub-container whose time element corresponds to the time element of the update data.
In some optional implementations of this embodiment, the message content in the message time container in the message sub-container lookup unit deletes data via the following units: a deletion data receiving unit (not shown in the figure) for receiving deletion data, the deletion data including a category; a deletion time search unit (not shown in the figure) for searching a time element of a category corresponding to the deletion data from the category information container; a delete sub-container search unit (not shown in the figure) for searching, in the message time container, a message sub-container of a time element corresponding to the time element of the delete data; a data key-value pair deleting unit (not shown in the figure) configured to delete a key-value pair keyed by a unique identification number of a category of the deleted data in a message child container of a time element of the deleted data corresponding to the time element; and an index key-value pair deleting unit (not shown) configured to delete, in the category message container, a key-value pair keyed on a category of the deletion data.
In some optional implementations of this embodiment, the apparatus further comprises: and the prompt information returning unit is used for responding to the data which is in accordance with the calling condition in the key value pair which takes the unique identification number of the category as the key and takes the message content as the value and is not inquired in the searched message sub-container, and returning the prompt information that the calling data does not exist.
In some optional implementations of this embodiment, the message sub-container in the message sub-container lookup unit includes a key-value pair that takes the unique identification number of the category as a key and takes the message content set as a value; and the coincidence data determining unit is further configured to: and determining data meeting the calling condition from the key value pair which takes the unique identification number of the category as a key and takes the message content set as a value in the searched message sub-container.
In some optional implementations of this embodiment, the message time container in the message sub-container lookup unit adds new data via the following units: a new data obtaining unit (not shown in the figure) for obtaining new data, where the new data includes time elements, categories, and message contents; a newly added type inquiry unit (not shown in the figure) for inquiring whether the type of the newly added data exists in the message sub-container corresponding to the time element of the newly added data; a message content storing unit (not shown in the figure) for storing the message content of the newly added data into the message content set of the unique identification number corresponding to the category of the newly added data in the message sub-container corresponding to the time element of the newly added data if the category of the newly added data exists; and a new data storage unit (not shown in the figure) for, if the type of the new data does not exist in the message sub-container corresponding to the time element of the new data, newly adding a key value pair with the type of the new data as a key and the message content set as a value in the message sub-container, and storing the message content of the new data in the message content set corresponding to the type of the new data.
In some optional implementations of this embodiment, the message content in the message time container in the message sub-container lookup unit updates the data via the following units: a receive update data unit (not shown in the figure) for receiving update data, the update data including a time element, a category, a message keyword to be updated, and a new message content; a find update sub-container unit (not shown in the figure) for finding a message sub-container corresponding to the time element of the update data from the message time container; a search message aggregation unit (not shown in the figure) for searching a message content aggregation corresponding to the unique identification number of the category of the update data from the message sub-container corresponding to the time element of the update data; and an update message content unit (not shown in the figure) for updating the message content conforming to the message keyword to be updated into new message content in the message content set corresponding to the unique identification number of the category of the update data.
In some optional implementations of this embodiment, the message content in the message time container in the message sub-container lookup unit deletes data via the following units: a data receiving and deleting unit (not shown in the figure) for receiving deletion data, wherein the deletion data comprises a time element, a category and a message keyword to be deleted; a find delete sub-container unit (not shown in the figure) for finding a message sub-container corresponding to the time element of the deleted data from the message time container; a search message aggregation unit (not shown in the figure) for searching a message content aggregation corresponding to the unique identification number of the category of the deleted data from the message sub-container corresponding to the time element of the deleted data; and a delete message content unit (not shown in the figure) for deleting the message content conforming to the key word of the message to be deleted in the message content set corresponding to the unique identification number of the category of the delete data.
It should be understood that, in the embodiment of the apparatus for invoking data described above, each unit in the optional implementation manner corresponds to each step in the method for invoking data in fig. 2 to 5, respectively, and thus, the operations and features described above for the method are also applicable to the apparatus and the units included therein, which are not described again here.
In an embodiment of the present application, there is also provided an apparatus for pushing information, the apparatus including: and the information pushing unit is used for pushing information to the terminal according to the data which is obtained by the data calling device and accords with the calling condition.
The information pushing device provided by the embodiment of the application improves the information pushing efficiency.
Referring now to FIG. 7, shown is a block diagram of a computer system 700 suitable for use in implementing a terminal device or server of an embodiment of the present application.
As shown in fig. 7, the computer system 700 includes a Central Processing Unit (CPU)701, which can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data necessary for the operation of the system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
The following components are connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, and the like; an output section 707 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 708 including a hard disk and the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. A drive 710 is also connected to the I/O interface 707 as necessary. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read out therefrom is mounted into the storage section 708 as necessary.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 709, and/or installed from the removable medium 711. The computer program, when executed by a Central Processing Unit (CPU)701, performs the above-described functions defined in the method of the present application.
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 application. In this regard, each block in the flowchart or block diagrams may represent a unit, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, 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.
The units described in the embodiments of the present application may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes a call request acquisition unit, a message sub-container lookup unit, and a coincidence data determination unit. The names of these units do not in some cases constitute a limitation on the unit itself, and for example, the call request acquisition unit may also be described as a "unit that acquires a call request for data".
As another aspect, the present application also provides a non-volatile computer storage medium, which may be the non-volatile computer storage medium included in the apparatus in the above-described embodiments; or it may be a non-volatile computer storage medium that exists separately and is not incorporated into the terminal. The non-transitory computer storage medium stores one or more programs that, when executed by a device, cause the device to: acquiring a calling request for data, wherein the calling request comprises a time element and a calling condition; searching a message sub-container of a time element which accords with the calling request from a message time container, wherein the message time container comprises a time message key value pair which takes the time element as a key and takes the message sub-container as a value; and inquiring data meeting the calling condition based on the searched message sub-container.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by a person skilled in the art that the scope of the invention as referred to in the present application is not limited to the embodiments with a specific combination of the above-mentioned features, but also covers other embodiments with any combination of the above-mentioned features or their equivalents without departing from the inventive concept. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (26)

1. A method of invoking data, the method comprising:
acquiring a calling request for data, wherein the calling request comprises a time element and a calling condition;
searching a message sub-container of a time element which accords with the calling request from a message time container, wherein the message time container comprises a time message key value pair which takes the time element as a key and takes the message sub-container as a value;
and inquiring data meeting the calling condition based on the searched message sub-container, wherein the message sub-container comprises a key value pair which takes the unique identification number of the category of the message content as a key and takes the message content as a value.
2. The method of claim 1, wherein obtaining the call request for data comprises: receiving a call request for data; and
the method further comprises the following steps: and returning the data meeting the calling condition to a sender of the calling request.
3. The method according to any one of claims 1 or 2, wherein the querying the data meeting the call condition based on the searched message sub-container comprises:
and querying data which is in line with the calling condition in a key value pair which takes the unique identification number of the category as a key and takes the message content as a value from the searched message sub-container.
4. The method of claim 1, wherein the message time container is populated with data by:
acquiring newly added data, wherein the newly added data comprises time elements, categories and message contents;
storing the key value pair which takes the unique identification number of the category of the newly added data as a key and takes the message content of the newly added data as a value into a message sub-container which corresponds to the time element of the newly added data in the message time container;
storing the key value pair which takes the category of the newly added data as a key and takes the time element of the newly added data as a value into a category information container; wherein the category information container comprises a key-value pair with a category as a key and a time element as a value.
5. The method of claim 4, wherein the message content in the message time container is updated by:
receiving update data, the update data including a category and new message content;
searching a time element of a category corresponding to the update data from the category information container;
searching a message sub-container of a time element corresponding to the time element of the updated data in the message time container;
and updating the message content of the unique identification number corresponding to the category of the updating data into the new message content in the message sub-container of which the time element corresponds to the time element of the updating data.
6. The method according to any of claims 4 or 5, wherein the message content in the message time container is deleted by:
receiving deletion data, the deletion data comprising a category;
searching a time element of a category corresponding to the deleted data from the category information container;
searching a message sub-container of the time element corresponding to the time element of the deleted data in the message time container;
deleting the key value pair taking the unique identification number of the category of the deleted data as a key in the message sub-container of the time element corresponding to the time element of the deleted data;
and deleting the key value pair taking the category of the deleted data as a key in the category information container.
7. The method of claim 3, further comprising: and responding to the data which is in accordance with the calling condition in the key value pair which takes the unique identification number of the category as the key and takes the message content as the value and is not inquired in the searched message sub-container, and returning the prompt information that the calling data does not exist.
8. The method of claim 1, wherein the message sub-container comprises key-value pairs keyed by a unique identification number of a category and valued by a set of message contents; and
the querying, based on the searched message sub-container, the data meeting the calling condition includes:
and querying data meeting the calling condition from the key value pair which takes the unique identification number of the category as a key and takes the message content set as a value in the searched message sub-container.
9. The method of claim 8, wherein the message time container is populated with data by:
acquiring newly added data, wherein the newly added data comprises time elements, categories and message contents;
inquiring whether the category of the newly added data exists in a message sub-container corresponding to the time element of the newly added data;
if the new data exists, storing the message content of the new data into a message content set of the unique identification number corresponding to the category of the new data;
and if the new data does not exist, adding a key value pair taking the category of the new data as a key and taking the message content set as a value into the message sub-container, and storing the message content of the new data into the message content set corresponding to the category of the new data.
10. The method of claim 8, wherein the message content in the message time container is updated by:
receiving updating data, wherein the updating data comprises a time element, a category, a message keyword to be updated and new message content;
searching a message sub-container corresponding to the time element of the updating data from the message time container;
searching a message content set corresponding to the unique identification number of the category of the updating data from the message sub-container corresponding to the time element of the updating data;
and updating the message content conforming to the message keyword to be updated into the new message content in the message content set corresponding to the unique identification number of the category of the updating data.
11. The method according to any of claims 8 to 10, wherein the message content in the message time container is deleted by:
receiving deletion data, wherein the deletion data comprises a time element, a category and a message keyword to be deleted;
searching a message sub-container corresponding to the time element of the deleted data from the message time container;
searching a message content set of the unique identification number corresponding to the category of the deleted data from the message sub-container corresponding to the time element of the deleted data;
and deleting the message content conforming to the key words of the message to be deleted in the message content set corresponding to the unique identification number of the category of the deleted data.
12. The method of claim 8, further comprising: and responding to the key value pair which takes the unique identification number of the category as a key and takes the message content set as a value in the searched message sub-container, and returning the prompt information that the calling data does not exist if the data meeting the calling condition is not inquired.
13. A method for pushing information, the method comprising:
the method for calling data according to any one of claims 1-12, wherein the data meeting the calling condition is obtained by pushing information to the terminal.
14. An apparatus for invoking data, the apparatus comprising:
the device comprises a calling request acquisition unit, a data processing unit and a data processing unit, wherein the calling request acquisition unit is used for acquiring a calling request for data, and the calling request comprises a time element and a calling condition;
a message sub-container searching unit, configured to search a message sub-container of a time element that meets the invocation request from a message time container, where the message time container includes a time message key-value pair that takes the time element as a key and the message sub-container as a value;
and the coincidence data determining unit is used for inquiring data which is in accordance with the calling condition based on the searched message sub-container, wherein the message sub-container comprises a key value pair which takes the unique identification number of the category of the message content as a key and takes the message content as a value.
15. The apparatus of claim 14, wherein the call request obtaining unit is further configured to: receiving a call request for data; and
the device further comprises: and the call data returning unit is used for returning the data meeting the call condition to a sender of the call request.
16. The apparatus of any of claims 14 or 15, wherein the coincidence data determining unit is further configured to: and querying data which is in line with the calling condition in a key value pair which takes the unique identification number of the category as a key and takes the message content as a value from the searched message sub-container.
17. The apparatus of claim 14, wherein the message time container in the message sub-container lookup unit adds data via:
a newly added data acquisition unit, configured to acquire newly added data, where the newly added data includes a time element, a category, and a message content;
a message time storage unit, configured to store a key value pair with the unique identifier of the category of the newly added data as a key and the message content of the newly added data as a value into a message sub-container corresponding to the time element of the newly added data in the message time container;
a category information storage unit for storing a key value pair having a category of the newly added data as a key and a time element of the newly added data as a value into a category information container; wherein the category information container comprises a key-value pair with a category as a key and a time element as a value.
18. The apparatus of claim 17, wherein the message content in the message time container in the message sub-container lookup unit updates data via:
an update data receiving unit for receiving update data, the update data including a category and a new message content;
the updating time searching unit is used for searching the time elements of the category corresponding to the updating data from the category information container;
an update sub-container searching unit, configured to search, in the message time container, a message sub-container whose time element corresponds to the time element of the update data;
and the message content updating unit is used for updating the message content of the unique identification number corresponding to the category of the updating data into the new message content in the message sub-container of which the time element corresponds to the time element of the updating data.
19. The apparatus according to any one of claims 17 or 18, wherein the message content in the message time container in the message sub-container lookup unit deletes data via:
a deletion data receiving unit configured to receive deletion data, the deletion data including a category;
the deletion time searching unit is used for searching the time elements of the category corresponding to the deletion data from the category information container;
a deletion sub-container searching unit, configured to search, in the message time container, a message sub-container whose time element corresponds to the time element of the deletion data;
a data key value pair deleting unit, configured to delete a key value pair with a unique identification number of a category of the deleted data as a key in a message child container of a time element of the deleted data corresponding to the time element;
and the index key value pair deleting unit is used for deleting the key value pair taking the category of the deleted data as a key in the category information container.
20. The apparatus of claim 16, further comprising: and the prompt information returning unit is used for responding to the data which is matched with the calling condition in the key value pair which takes the unique identification number of the category as the key and takes the message content as the value and is not inquired in the searched message sub-container, and returning the prompt information that the calling data does not exist.
21. The apparatus according to claim 14, wherein the message sub-container in the message sub-container lookup unit comprises a key-value pair keyed by a unique identification number of a category and having a set of message contents as a value; and
the coincidence data determination unit is further configured to:
and determining data meeting the calling condition from the key value pair which takes the unique identification number of the category as a key and takes the message content set as a value in the searched message sub-container.
22. The apparatus of claim 21, wherein the message time container in the message sub-container lookup unit adds data via:
the new data acquisition unit is used for acquiring new data, and the new data comprises time elements, categories and message contents;
a newly added type inquiry unit, configured to inquire whether a type of the newly added data exists in a message sub-container corresponding to a time element of the newly added data;
a message content storing unit, configured to store, in a message sub-container corresponding to a time element of the newly added data, if the category of the newly added data exists, the message content of the newly added data in a message content set corresponding to a unique identification number of the category of the newly added data;
and the newly added data storage unit is used for adding a key value pair which takes the category of the newly added data as a key and takes the message content set as a value into the message sub-container if the category of the newly added data does not exist in the message sub-container corresponding to the time element of the newly added data, and storing the message content of the newly added data into the message content set corresponding to the category of the newly added data.
23. The apparatus of claim 21, wherein the message content in the message time container in the message sub-container lookup unit updates data via:
the device comprises a data receiving and updating unit, a data receiving and updating unit and a data updating unit, wherein the data receiving and updating unit is used for receiving updating data, and the updating data comprises a time element, a category, a message keyword to be updated and new message content;
a searching and updating sub-container unit, configured to search, from the message time container, a message sub-container corresponding to a time element of the update data;
a search message collection unit, configured to search a message content collection corresponding to the unique identification number of the category of the update data from the message sub-container corresponding to the time element of the update data;
and the updating message content unit is used for updating the message content conforming to the message keyword to be updated into the new message content in the message content set corresponding to the unique identification number of the category of the updating data.
24. The apparatus according to any of claims 21 to 23, wherein the message content in the message time container in the message sub-container lookup unit deletes data via:
the data receiving and deleting unit is used for receiving deleted data, and the deleted data comprises a time element, a category and a message keyword to be deleted;
a search deletion sub-container unit, configured to search, from the message time container, a message sub-container corresponding to the time element of the deletion data;
a search message collection unit, configured to search a message content collection corresponding to the unique identification number of the category of the deleted data from the message sub-container corresponding to the time element of the deleted data;
and the message content deleting unit is used for deleting the message content conforming to the message keyword to be deleted in the message content set corresponding to the unique identification number of the category of the deleted data.
25. The apparatus of claim 21, further comprising: and the prompt information returning unit is used for responding to that data meeting the calling condition is not inquired in a key value pair which takes the unique identification number of the category as a key and takes the message content set as a value in the searched message sub-container, and returning prompt information that the calling data does not exist.
26. An apparatus for pushing information, the apparatus comprising:
a push information unit, configured to push information to a terminal according to the data meeting the call condition obtained by the data call device according to any one of claims 14-25.
CN201710029106.8A 2017-01-16 2017-01-16 Method and device for calling data and method and device for pushing information Active CN108322380B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710029106.8A CN108322380B (en) 2017-01-16 2017-01-16 Method and device for calling data and method and device for pushing information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710029106.8A CN108322380B (en) 2017-01-16 2017-01-16 Method and device for calling data and method and device for pushing information

Publications (2)

Publication Number Publication Date
CN108322380A CN108322380A (en) 2018-07-24
CN108322380B true CN108322380B (en) 2021-07-30

Family

ID=62892370

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710029106.8A Active CN108322380B (en) 2017-01-16 2017-01-16 Method and device for calling data and method and device for pushing information

Country Status (1)

Country Link
CN (1) CN108322380B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104317872A (en) * 2014-10-20 2015-01-28 广东欧珀移动通信有限公司 Key information acquisition method and device
CN104346401A (en) * 2013-08-08 2015-02-11 中国电信股份有限公司 Method and device for message forwarding between components in cloud management platform
CN105468346A (en) * 2014-09-05 2016-04-06 中兴通讯股份有限公司 Timing event management method, storage method, execution method and corresponding apparatus
CN105681397A (en) * 2015-12-30 2016-06-15 曙光信息产业(北京)有限公司 Network traffic data storage method and system, query method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9986018B2 (en) * 2014-01-09 2018-05-29 Excalibur Ip, Llc Method and system for a scheduled map executor
EP3278213A4 (en) * 2015-06-05 2019-01-30 C3 IoT, Inc. Systems, methods, and devices for an enterprise internet-of-things application development platform
CN106170013B (en) * 2016-06-29 2019-06-07 上海浦东发展银行股份有限公司信用卡中心 A kind of Kafka message uniqueness method based on Redis

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104346401A (en) * 2013-08-08 2015-02-11 中国电信股份有限公司 Method and device for message forwarding between components in cloud management platform
CN105468346A (en) * 2014-09-05 2016-04-06 中兴通讯股份有限公司 Timing event management method, storage method, execution method and corresponding apparatus
CN104317872A (en) * 2014-10-20 2015-01-28 广东欧珀移动通信有限公司 Key information acquisition method and device
CN105681397A (en) * 2015-12-30 2016-06-15 曙光信息产业(北京)有限公司 Network traffic data storage method and system, query method and device

Also Published As

Publication number Publication date
CN108322380A (en) 2018-07-24

Similar Documents

Publication Publication Date Title
CN108228817B (en) Data processing method, device and system
US10055509B2 (en) Constructing an in-memory representation of a graph
CN108932313B (en) Data processing method and device, electronic equipment and storage medium
CN110851209B (en) Data processing method and device, electronic equipment and storage medium
CN111522927B (en) Entity query method and device based on knowledge graph
US20140365523A1 (en) Push subscriptions
CN107704202B (en) Method and device for quickly reading and writing data
CN111858518A (en) Method and device for updating reference document, electronic equipment and storage medium
CN107103011B (en) Method and device for realizing terminal data search
CN108304531B (en) Visualization method and device for reference relationship of digital object identifiers
CN105005567B (en) Interest point query method and system
CN112579695A (en) Data synchronization method and device
CN113094387A (en) Data query method and device, electronic equipment and machine-readable storage medium
CN115757400A (en) Data table processing method and device, electronic equipment and computer readable medium
CN114722036A (en) Data processing method and device, electronic equipment and readable storage medium
CN115168362A (en) Data processing method and device, readable medium and electronic equipment
CN111241137A (en) Data processing method and device, electronic equipment and storage medium
CN105843809B (en) Data processing method and device
CN113918659A (en) Data operation method and device, storage medium and electronic equipment
CN110427538B (en) Data query method, data storage method, data query device, data storage device and electronic equipment
CN113761565A (en) Data desensitization method and apparatus
CN112100168A (en) Method and device for determining data association relationship
CN108322380B (en) Method and device for calling data and method and device for pushing information
CN107463618B (en) Index creating method and device
US20150302047A1 (en) Handling an increase in transactional data without requiring relocation of preexisting data between shards

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
GR01 Patent grant
GR01 Patent grant