CN106372254B - Method, device and terminal for processing service data - Google Patents

Method, device and terminal for processing service data Download PDF

Info

Publication number
CN106372254B
CN106372254B CN201610863693.6A CN201610863693A CN106372254B CN 106372254 B CN106372254 B CN 106372254B CN 201610863693 A CN201610863693 A CN 201610863693A CN 106372254 B CN106372254 B CN 106372254B
Authority
CN
China
Prior art keywords
service data
overtime
service
operation time
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
CN201610863693.6A
Other languages
Chinese (zh)
Other versions
CN106372254A (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.)
Guangzhou Huaduo Network Technology Co Ltd
Original Assignee
Guangzhou Huaduo Network 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 Guangzhou Huaduo Network Technology Co Ltd filed Critical Guangzhou Huaduo Network Technology Co Ltd
Priority to CN201610863693.6A priority Critical patent/CN106372254B/en
Publication of CN106372254A publication Critical patent/CN106372254A/en
Application granted granted Critical
Publication of CN106372254B publication Critical patent/CN106372254B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the invention provides a method, a device and a terminal for processing service data, wherein the method comprises the following steps: acquiring current service data stored in a terminal, wherein the service data is stored in the terminal in a linked list mode according to the operation time of the service data; judging whether the service data meets a preset overtime service condition or not according to the operation time of the service data; if yes, determining that the service data is overtime, acquiring next service data, and continuing to execute the operation time according to the service data to judge whether the service data meets a preset overtime service condition; if not, ending the step of executing the operation time according to the service data and judging whether the service data meets the preset overtime service condition. By adopting the embodiment of the invention, the searching of the overtime service data can be shortened, and the high efficiency of the service data processing is improved.

Description

Method, device and terminal for processing service data
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, and a terminal for processing service data.
Background
In revenue service activities, it is often the case that a time-out analysis of the large amount of traffic data generated in the revenue service activity is performed. In the existing data analysis scheme, a support terminal periodically and regularly performs traversal analysis on a large amount of data, finds out overtime service data from the data, and then processes the found overtime service data. However, in practice, it is found that, because the quantity of the service data is huge, traversal search of the full data is slow, the efficiency is low, and the efficiency of data processing is reduced; meanwhile, operations such as data insertion, deletion, updating and the like are not supported in conventional storage of a large amount of service data. There is therefore a need for an efficient data processing scheme.
Disclosure of Invention
The technical problem to be solved by the embodiments of the present invention is to provide a method, an apparatus and a terminal for processing service data, which can improve the efficiency of processing service data.
In one aspect, an embodiment of the present invention discloses a method for processing service data, where the method includes:
acquiring current service data stored in a terminal, wherein the service data is stored in the terminal in a linked list mode according to the operation time of the service data;
judging whether the service data meets a preset overtime service condition or not according to the operation time of the service data;
if yes, determining that the service data is overtime, acquiring next service data, and continuing to execute the operation time according to the service data to judge whether the service data meets a preset overtime service condition;
if not, ending the step of executing the operation time according to the service data and judging whether the service data meets the preset overtime service condition.
On the other hand, the embodiment of the present invention also discloses a device for processing service data, wherein the device comprises:
the system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring current service data stored in a terminal, and the service data is stored in the terminal in a linked list mode according to the operation time of the service data;
the judging module is used for judging whether the service data meets a preset overtime service condition or not according to the operation time of the service data;
the processing module is used for determining that the service data is overtime if the judgment result of the judging module is yes, acquiring next service data, and informing the judging module to continuously execute the step of judging whether the service data meets the preset overtime service condition or not according to the operation time of the service data; and if the judgment result of the judgment module is negative, informing the judgment module to finish executing the operation time according to the service data, and judging whether the service data meets the preset overtime service condition.
In another aspect, an embodiment of the present invention further discloses a terminal, where the terminal includes the device for processing service data.
The embodiment of the invention can be realized by acquiring current service data stored in a terminal, wherein the service data is stored in the terminal in a linked list mode according to the operation time of the service data, then judging whether the service data meets a preset overtime service condition or not according to the operation time of the service data, if so, determining that the service data is overtime, acquiring next service data, continuously executing the step of judging whether the service data meets the preset overtime service condition or not according to the operation time of the service data, and if not, finishing executing the operation time according to the service data and judging whether the service data meets the preset overtime service condition or not; therefore, each overtime service data can be found out quickly, the efficiency of data processing is improved, and the defect that a large amount of time is consumed due to the fact that all service data need to be traversed in the prior art is overcome.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a network architecture according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a service data processing method according to an embodiment of the present invention;
fig. 3 is a schematic flow chart of another service data processing method according to an embodiment of the present invention;
fig. 4 is a schematic flow chart of another service data processing method according to an embodiment of the present invention;
fig. 5 is a schematic flow chart of another service data processing method according to an embodiment of the present invention;
fig. 6 is a schematic flow chart of another service data processing method according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a service data processing apparatus according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of another service data processing apparatus according to an embodiment of the present invention;
FIG. 9 is a schematic structural diagram of a determining module according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of another service data processing apparatus according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first," "second," and "third" (if any) in the description and claims of the invention and the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "comprises" and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
The embodiment of the invention discloses a method, a device and a terminal for processing service data, which can quickly search overtime service data and improve the efficiency of data processing. The following are detailed below.
In order to better understand the method, the apparatus, and the terminal for processing service data provided by the embodiment of the present invention, a network architecture applicable to the embodiment of the present invention is described below. Fig. 1 is a schematic structural diagram of a network architecture according to an embodiment of the present invention. As shown in fig. 1, the network architecture diagram may include a plurality of terminals or clients, and the terminals may be communicatively connected to each other through the internet; optionally, the network architecture diagram may further include a service device, and in this case, each terminal may use the service device as a transmission medium and perform communication connection with each other through the internet. The terminal may include, but is not limited to, a vehicle-mounted device, a mobile phone, a mobile computer, a tablet computer, a Personal Digital Assistant (PDA), a media player, a smart television, a smart watch, smart glasses, a smart band, and other user devices; the service device may include a server, a service host, a service system, a service platform, and the like, and may be communicatively connected to the terminal through the internet. For convenience of description, the following description will be made with reference to a server as a representative of the service apparatus.
Referring to fig. 2, a flow chart of a service data processing method according to an embodiment of the present invention is shown, and the method according to the embodiment of the present invention may be applied to terminals with communication network functions, such as smart phones, tablet computers, smart wearable devices, and the like, and may be specifically implemented by processors of the terminals. The method of embodiments of the present invention further includes the following steps.
S101, current service data stored in a terminal is obtained, wherein the service data are stored in the terminal in a linked list mode according to the operation time of the service data.
In the embodiment of the invention, a large amount of service data can be generated in the revenue activity, and the service data of different service types can be stored in different linked lists by user/terminal in a classified manner, preferably, the user/terminal can store the service data according to the operation time of the service data, for example, the advertisement service data and the gift large-ratio spelling service data can be stored in the corresponding terminal/server in the form of the linked lists according to the sequence of the operation time of the service data from first to last or from last to first. It should be noted that the operation time of the service data may refer to a certain time/time between the time when the service data is generated in the whole revenue activity and the time when the service data is not stored, such as a playing start time and a playing end time of a certain advertisement, or an advertisement modification time/time sent by a user/client in a certain advertisement playing middle period. When a terminal needs to perform timeout service processing on service data in real time/periodically, that is, when the terminal needs to search for the timeout service data, the terminal may obtain current service data stored in the terminal, or the terminal may obtain the current service data from other terminals/servers in a wired/wireless communication manner (such as bluetooth, WIFI, 2G, data interface, data line, etc.), where the service data may be stored in a linked list form in the corresponding terminal/server according to operation data of the service data.
Optionally, the user/terminal may further use a storage address of the service data in the linked list as a storage address for storing the service data in a preset hash table, and further store the service data in the hash table, so as to store the service data in duplicate in the form of the linked list and the hash table at the same time, thereby avoiding data loss.
The terminal may include an Internet device such as a smart phone (e.g., an Android phone, an IOS phone, etc.), a personal computer, a tablet computer, a palmtop computer, a Mobile Internet device (MID, Mobile Internet Devices), or a wearable smart device, and the embodiments of the present invention are not limited thereto.
S102, judging whether the service data meet a preset overtime service condition or not according to the operation time of the service data.
In the embodiment of the present invention, the terminal may determine, according to the operation time of the service data in step S101, whether the service data meets an overtime service condition (for example, the play start-stop time set by a certain advertisement is 1 month and 1 day to 1 month and 7 days, and the total advertisement play time is 6 days, etc.) customized by the user/system in the terminal in advance. When the terminal determines that the service data meets the preset timeout service condition, the terminal continues to execute step S103; otherwise, the terminal considers that no overtime service data exists, and the process is ended.
Optionally, the determining, according to the operation time of the service data, whether the service data meets a preset timeout service condition includes:
determining the time interval from the operation time of the service data to the current system time for acquiring the service data;
and judging whether the time interval exceeds a time threshold value in a preset overtime service condition.
Specifically, the terminal may obtain the current system time of the service data obtained in step S101 and the operation time of the service data stored in the linked list, and then the terminal may calculate and determine a time interval from the operation time to the current system time of the service data according to the obtained current system time of the service data and the operation time of the service data, which may also be considered as the storage time of the service data stored in the linked list. Further, the terminal may determine whether a time interval between the determined operation time of the service data and the current system time for acquiring the service data exceeds a time threshold in a preset timeout service condition that is customized in the terminal by a user/system in advance, and if so, the terminal may determine that the service data meets the preset timeout service condition; otherwise, the terminal may determine that the service data does not satisfy the preset timeout service condition. Or, the terminal may further determine whether a preset timeout condition is met according to the current system time of the terminal acquiring the service data, and specifically, the terminal may determine whether the current system time of the acquired service data exceeds a preset end time threshold in the preset timeout condition, such as an end time of an advertisement. For example, it is assumed that service data of an advertisement is stored in the terminal, where the service data includes a play start time of the advertisement and play content information of the advertisement, and the service data of the advertisement is stored in the terminal in a linked list according to time, and if the terminal periodically performs timeout service processing on the advertisement, the terminal may calculate a time interval between the play start time and a current system time of the advertisement according to the obtained play start time of the advertisement service data and the current system time, and may consider the time interval as a play duration of the advertisement, and then the terminal may determine whether the play duration of the advertisement exceeds a time threshold in a preset timeout service condition (for example, the preset duration for playing the advertisement is set to be not more than 5 hours).
S103, determining that the service data is overtime, acquiring next service data, and continuing to execute the step of judging whether the service data meets the preset overtime service condition according to the operation time of the service data.
In the embodiment of the present invention, when the terminal determines that the service data meets the preset timeout service condition, the terminal may determine/think that the service data is timeout, that is, the service data is timeout service data, the terminal may continue to acquire the next service data in the linked list, and then repeatedly execute step S102 to determine whether the service data meets the preset timeout service condition according to the operation time of the service data, so that all the timeout service data in the linked list may be determined/searched. Because all the service data stored in the linked list are stored according to time, for example, according to the sequence from the first to the last of the time, when the terminal needs to determine the overtime service data in the linked list, by adopting the scheme of the present invention, when the terminal detects and judges that the first N service data in the linked list all satisfy the preset overtime service data, that is, the terminal determines that the first N service data in the linked list are overtime, if the terminal detects/judges that the N +1 th service data in the linked list does not satisfy the preset overtime service condition, the terminal can end the judging step, and automatically considers/determines that all the service data stored in the linked list at the N +1 th and the following in the linked list are not overtime.
Optionally, the method further includes:
generating corresponding service overtime notification information according to each overtime service data, and sending the service overtime notification information to a corresponding client; further comprising:
and deleting the overtime service data stored in the linked list.
The terminal may generate corresponding service timeout notification information according to the determined each timeout service data, specifically, if the determined each timeout service data is service data of the same service type, the terminal may generate corresponding service timeout notification information according to the determined each timeout service data, and send the service timeout notification information to a corresponding client, for example, if it is assumed that the determined each timeout service data is timeout service data of an advertisement, the terminal may generate corresponding advertisement service timeout notification information according to each timeout service data, and send the advertisement service timeout notification information to a corresponding broadcast and television client, so as to notify broadcast and television staff of releasing the advertisement. If the determined overtime service data refer to service data of different service types, the terminal can classify the determined overtime service data, further generate corresponding different service overtime notification information aiming at the overtime service data of different service types, further send the generated different service overtime notification information to corresponding different clients to notify the clients to perform corresponding service processing according to the service overtime notification information, such as different advertisers customizing and playing different advertisements on the same live video, and the terminal stores the service data of each advertisement in a linked list form, and when the terminal determines that the linked list stores a plurality of overtime advertisement service data, the terminal can identify whether the overtime advertisement service data are the advertisement service data of the same advertiser or not, if not, the terminal can select the advertisement service data of the same advertiser, generate corresponding advertisement overtime notification information, and further send the generated advertisement overtime notification information to the corresponding advertiser client, so as to notify the advertiser that the advertisement is overtime/exceeds the customized playing time length and whether to pay for continuous playing or not; or, the advertisement notification information is sent to the corresponding broadcasting staff so as to inform the corresponding broadcasting staff that the advertisement is put on the shelf/not played. Optionally, the terminal may further delete the determined timeout service data from the linked list.
Optionally, the service data corresponds to a storage address stored in the linked list, and the method further includes:
storing the service data in a preset hash table; and the storage address of the service data in the hash table is the same as the storage address in the linked list.
Specifically, when the terminal/server stores the service data in a form of a linked list according to time, one or more hash tables for storing data may be created at the same time, and the service data is stored in the hash tables at the same time, where for the same service data, the storage locations/addresses of the service data stored in the hash tables and the linked list respectively are the same, that is, the service data is stored in the hash tables again using the same storage address stored in the linked list. Optionally, when the terminal deletes the determined each overtime service data in the linked list, the terminal may correspondingly find/determine the position of each overtime service data in the hash table according to the storage position/address of each overtime service data in the linked list, and further delete the overtime service data in the hash table to ensure that each service data stored in the hash table and the linked list are the same/synchronous.
It can be understood that the service data is stored in the hash table according to a certain storage rule, and a storage location/address of the service data in the hash table may be represented as a function f (K), where K represents a keyword, that is, when a user/the terminal wants to search one or more target service data stored in the hash table, the key information (i.e., the keyword) corresponding to the target service data may be input, and the target service data stored corresponding to the address f (K) may be quickly found according to the storage address f (K); similarly, when deleting the determined each overtime service data in the hash table, the terminal may lock each overtime service data in the corresponding storage location according to the key information (i.e., the key word) corresponding to each overtime service data, and then delete the service data, so as to ensure that the linked list and each service data stored in the hash table are identical/synchronous.
Optionally, before the obtaining of the current service data stored in the terminal, the method further includes:
receiving a modification instruction for service data including the operation time;
and modifying and updating the service data including the operation time in the linked list.
The terminal may receive a modification instruction for the service data including the operation time sent by the user/other terminal, and further, the terminal may respond to the modification instruction to synchronously modify and update the service data stored in the linked list. For example, in a house renting activity, because the number of houses is large and house renting information of each tenant is relatively dispersed and is not easy to manage, at this time, a user can store house renting service data of each house of each building into a corresponding user terminal/server in a linked list mode so as to facilitate unified management of the user/terminal; assuming that a tenant rents a house once for several months due to being dispatched outside the work, in order to facilitate tenant management, the tenant can send relevant house service data of the house to a user terminal/server of the tenant for storage each time the tenant rents the house, when the user terminal/server receives the house service data sent by the tenant, the last house service data stored in the linked list before needs to be modified and updated into the last house service data, so as to facilitate tenant management, when the user terminal/server detects that the current house service data uploaded by the tenant exceeds preset timeout service data, if the terminal judges that the tenant of the house has not updated relevant house service information for more than 3 months, the tenant can be considered as not rented for 3 months, and the user terminal/server can generate corresponding house overtime service notification information according to the current house service data and send the house overtime service notification information to the tenant or the terminal corresponding to the landlord for respective reminding, such as reminding the tenant of whether to withdraw from the house or reminding the landlord of whether to additionally rent, and the like. Optionally, the terminal may further correspondingly search and update the service data stored in the hash table according to the modification instruction and corresponding to related key information (i.e., a key) stored in the hash table according to the service data, so as to keep the data synchronization between the linked list and the hash table.
Optionally, the method further includes:
and when receiving new service data, inserting and storing the new service data into the linked list according to the operation time of the new service data.
When the terminal receives new service data generated in revenue activity, the terminal may insert and store the new service data in the linked list according to the operation time of the new service data. Optionally, the terminal may further obtain a storage address where the new service data is correspondingly stored in the linked list, and use the storage address as a storage address where the new service data needs to be stored in the hash table, so as to synchronously store the new service data in the hash table.
Optionally, the method further includes:
receiving an operation instruction aiming at target service data, wherein the operation instruction comprises storage key information associated with the target service data;
searching the target service data from the hash table according to the storage key information in the operation instruction, and executing the operation indicated by the operation instruction on the target service data;
the operation instructions comprise any one or more of a viewing instruction, a modifying instruction, an updating instruction, a deleting instruction, an inserting instruction and a storing instruction.
The terminal may further receive an operation instruction for target service data stored in the hash table sent by a user/another terminal, where the operation instruction includes any one or more of a view instruction, a modify instruction, an update instruction, a delete instruction, an insert instruction, and a store instruction, and the operation instruction includes related storage key information (e.g., a keyword) of the target service data stored in the hash table, and then the terminal may search and determine a storage address of the target service data stored in the hash table according to the storage key information in the operation instruction, so as to obtain the target service data, and further the terminal may further perform an operation indicated by the operation instruction on the target service data, such as viewing and displaying the target service data, Modify, update, delete, etc.
Optionally, the terminal may further update and store the chain table and the hash table storing the service data into a shared memory and/or a hard disk in the terminal/server in real time/periodically.
To assist the understanding of the above embodiments, the following detailed description is given by way of an example. The terminal can store the service data generated in revenue activity according to the form of a linked list and a hash table, wherein the service data of different service types are correspondingly stored in different linked lists and hash tables, preferably, the service data stored in the linked list is stored according to time (namely, the storage time of the service data), and for the same service data, the service data has the same storage address in the linked list and the hash table. Therefore, the service data stored and inserted in the form of the hash table can be subjected to corresponding searching, viewing and deleting operations according to the KEY information (such as the KEY) for storing the service data; on the other hand, the service data are put into the linked list for sequencing storage according to the operation time of the service data, so that overtime service data can be quickly positioned/found out and then processed, and when one or more service data meet a preset overtime condition, a corresponding overtime service data processing callback interface is registered by using an observer mode, namely, each service logic can be informed for processing; the overtime service data can satisfy various preset service overtime requirement conditions, for example, a mode of starting to calculate the overtime time by using the starting time can be supported, and the calculation of the overtime time by using the operation time such as searching and updating is also supported. The specific implementation can also implement the following implementation steps:
a. when the data structure in the service (namely all or part of the service data stored in the linked list) has the service data which will be overtime in the future to be processed, the service data is inserted into the hash table, and the expected time for searching by using the hash table is as follows: o (1), the overtime service data can be quickly found, inserted and deleted;
b. supporting various overtime service requirements, configuration and dynamic loading, and supporting the type of computing overtime by starting time and the type of computing overtime by searching and updating time;
c. after inserting a piece of service data into the hash table, correspondingly inserting a piece of service data into the linked list, wherein the service data can record the operation time of the service data, and is also sorted according to time in the linked list, when a timer of the terminal processes service timeout processing operation at intervals, all the service data in the linked list can be checked, the service data of which the front part meets the preset timeout time in the preset service timeout condition is found out and is used as the overtime service data, and then the overtime service data are processed, such as deleted;
d. meanwhile, an updated model of the operation time is supported, when some service data is searched or modified, the operation time of the service data can be synchronously modified, the efficiency of data processing is high through the insertion and deletion of a linked list, and the operation time of the service data can be rapidly modified, so that the overtime time is newly calculated by the node (namely the operation time of the current service data), namely the overtime service data is determined again;
e. and after finding out and processing the overtime service data, throwing the overtime service data into the service callback logic for corresponding data processing, and supporting a processing model for processing the overtime service data by a plurality of service callback modes through an observer mode.
f. The storage of the service data supports shared memory, and simultaneously, the service data can be stored and written into a hard disk at regular time, so that a plurality of processes can share the data and the data loss is avoided.
The embodiment of the invention can be realized by acquiring current service data stored in a terminal, wherein the service data is stored in the terminal in a linked list mode according to the operation time of the service data, then judging whether the service data meets a preset overtime service condition or not according to the operation time of the service data, if so, determining that the service data is overtime, acquiring next service data, continuously executing the step of judging whether the service data meets the preset overtime service condition or not according to the operation time of the service data, and if not, finishing executing the operation time according to the service data and judging whether the service data meets the preset overtime service condition or not; therefore, each overtime service data can be found out quickly, the efficiency of data processing is improved, and the defect that a large amount of time is consumed due to the fact that all service data need to be traversed in the prior art is overcome.
Please refer to fig. 3, which is a flowchart illustrating a method for processing service data according to another embodiment of the present invention, where the method according to the embodiment of the present invention may be applied to terminals with communication network functions, such as smart phones, tablet computers, and smart wearable devices, and may be specifically implemented by processors of the terminals. The method of embodiments of the present invention further includes the following steps.
S201, obtaining current service data stored in a terminal, wherein the service data is stored in the terminal in a linked list mode according to the operation time of the service data.
S202, determining the time interval from the operation time of the business data to the current system time for acquiring the business data.
S203, judging whether the time interval exceeds a time threshold value in a preset overtime service condition.
In the embodiment of the invention, when the terminal judges that the time interval exceeds the time threshold value in the preset overtime service condition, the service data is determined to meet the preset overtime service condition; otherwise, the terminal determines that the service data does not meet the preset overtime service condition, and the process is ended.
And S204, determining that the service data does not meet the preset overtime service condition.
S205, determining that the service data meets a preset overtime service condition.
S206, determining that the service data is overtime, and acquiring next service data.
In the embodiment of the present invention, when the terminal determines that the service data meets the preset timeout service condition, the terminal may regard the service data as timeout, acquire the next service data stored in the linked list, and continue to execute the step of determining whether the service data meets the preset timeout service condition according to the operation time of the service data.
The embodiment of the invention can be realized by acquiring current service data stored in a terminal, wherein the service data is stored in the terminal in a linked list mode according to the operation time of the service data, then judging whether the service data meets a preset overtime service condition or not according to the operation time of the service data, if so, determining that the service data is overtime, acquiring next service data, continuously executing the step of judging whether the service data meets the preset overtime service condition or not according to the operation time of the service data, and if not, finishing executing the operation time according to the service data and judging whether the service data meets the preset overtime service condition or not; therefore, each overtime service data can be found out quickly, the efficiency of data processing is improved, and the defect that a large amount of time is consumed due to the fact that all service data need to be traversed in the prior art is overcome.
Referring to fig. 4, which is a schematic flow chart of a service data processing method according to another embodiment of the present invention, the method according to the embodiment of the present invention may include all the implementation steps shown in fig. 3, and before step S201, the method may further include the following implementation steps:
s301, receiving a modification instruction aiming at the service data including the operation time.
S302, modifying and updating the service data including the operation time in the linked list.
Please refer to fig. 5, which is a schematic flow chart of a service data processing method according to another embodiment of the present invention, where the method according to the embodiment of the present invention may include all or part of the implementation steps shown in fig. 3 or fig. 4, and may further include the following implementation steps:
s401, generating corresponding business overtime notification information according to each overtime business data, and sending the business overtime notification information to a corresponding client.
S402, deleting the overtime service data stored in the linked list.
S403, when receiving new service data, inserting and storing the new service data into the linked list according to the operation time of the new service data.
It should be noted that, the step S403 may be performed before or after any step of all steps in the embodiment of the present invention, and the embodiment of the present invention is not limited.
Similarly, referring to fig. 6, which is a schematic flow chart of a service data processing method according to another embodiment of the present invention, the method according to the embodiment of the present invention may include all or part of the implementation steps shown in fig. 3 to fig. 5, and may further include the following implementation steps:
s501, if the service data correspond to the storage address stored in the linked list, storing the service data in a preset hash table; and the storage address of the service data in the hash table is the same as the storage address in the linked list.
S502, receiving an operation instruction aiming at target service data, wherein the operation instruction comprises storage key information associated with the target service data; the operation instructions comprise any one or more of a viewing instruction, a modifying instruction, an updating instruction, a deleting instruction, an inserting instruction and a storing instruction.
S503, according to the storage key information in the operation instruction, the target service data is searched from the hash table, and the operation indicated by the operation instruction is executed on the target service data.
The embodiment of the invention can be realized by acquiring current service data stored in a terminal, wherein the service data is stored in the terminal in a linked list mode according to the operation time of the service data, then judging whether the service data meets a preset overtime service condition or not according to the operation time of the service data, if so, determining that the service data is overtime, acquiring next service data, continuously executing the step of judging whether the service data meets the preset overtime service condition or not according to the operation time of the service data, and if not, finishing executing the operation time according to the service data and judging whether the service data meets the preset overtime service condition or not; therefore, each overtime service data can be found out quickly, the efficiency of data processing is improved, and the defect that a large amount of time is consumed due to the fact that all service data need to be traversed in the prior art is overcome.
Referring to fig. 7, a schematic structural diagram of a service data processing apparatus according to an embodiment of the present invention is shown, where the apparatus according to the embodiment of the present invention may be disposed in a terminal with a communication network function, such as a smart phone, a tablet computer, and a smart wearable device, and the apparatus 7 includes:
an obtaining module 60, configured to obtain current service data stored in a terminal, where the service data is stored in the terminal in a linked list form according to operation time of the service data;
the judging module 61 is configured to judge whether the service data meets a preset timeout service condition according to the operation time of the service data;
a processing module 62, configured to determine that the service data is overtime if the determination result of the determining module 61 is yes, acquire the next service data, and notify the determining module 61 to continue to execute the step of determining whether the service data meets a preset overtime service condition according to the operation time of the service data; if the judgment result of the judgment module 61 is no, notifying the judgment module 61 to finish executing the operation time according to the service data, and judging whether the service data meets a preset overtime service condition.
For specific implementation of each module related in the embodiments of the present invention, reference may be made to descriptions of related functional modules or implementation steps in the corresponding embodiments of fig. 1 to fig. 6, which are not described herein again.
The embodiment of the invention can be realized by acquiring current service data stored in a terminal, wherein the service data is stored in the terminal in a linked list mode according to the operation time of the service data, then judging whether the service data meets a preset overtime service condition or not according to the operation time of the service data, if so, determining that the service data is overtime, acquiring next service data, continuously executing the step of judging whether the service data meets the preset overtime service condition or not according to the operation time of the service data, and if not, finishing executing the operation time according to the service data and judging whether the service data meets the preset overtime service condition or not; therefore, each overtime service data can be found out quickly, the efficiency of data processing is improved, and the defect that a large amount of time is consumed due to the fact that all service data need to be traversed in the prior art is overcome.
Please refer to fig. 8, which is a schematic structural diagram of a service data processing apparatus according to another embodiment of the present invention, where the apparatus 7 according to the embodiment of the present invention may include the obtaining module 60, the determining module 61, and the processing module 62, where the apparatus may further include:
a sending module 63, configured to generate corresponding service timeout notification information according to each service data that is timeout, and send the service timeout notification information to a corresponding client; further comprising:
and a deleting module 64, configured to delete the overtime service data stored in the linked list.
Specifically, as shown in fig. 9, a schematic structural diagram of a determining module according to an embodiment of the present invention is provided, where the determining module 61 may specifically include: a determination unit 610 and a judgment unit 611, wherein,
a determining unit 610, configured to determine a time interval between an operation time of the service data and a current system time of acquiring the service data;
the determining unit 611 is configured to determine whether the time interval exceeds a time threshold in a preset timeout service condition.
Further, referring to fig. 10, which is a schematic structural diagram of a service data processing apparatus according to another embodiment of the present invention, the apparatus 7 according to the embodiment of the present invention may include the obtaining module 60, the determining module 61, the processing module 62, the sending module 63, and the deleting module 64, where the apparatus may further include:
a first receiving module 65, configured to receive a modification instruction for service data including the operation time;
and an updating module 66, configured to modify and update the service data including the operation time in the linked list.
Optionally, the apparatus further comprises:
and the inserting module 67 is configured to insert and store new service data into the linked list according to the operation time of the new service data when the new service data is received.
Optionally, the service data corresponds to a storage address stored in the linked list, and the apparatus further includes:
a storage module 68, configured to store the service data in a preset hash table; and the storage address of the service data in the hash table is the same as the storage address in the linked list.
Optionally, the apparatus further comprises:
a second receiving module 69, configured to receive an operation instruction for target service data, where the operation instruction includes storage key information associated with the target service data;
an operation module 70, configured to find the target service data from the hash table according to the storage key information in the operation instruction, and execute the operation indicated by the operation instruction on the target service data;
the operation instructions comprise any one or more of a viewing instruction, a modifying instruction, an updating instruction, a deleting instruction, an inserting instruction and a storing instruction.
For specific implementation of each module related in the embodiment of the present invention, reference may be made to descriptions of related functional modules or implementation steps in the embodiments corresponding to fig. 1 to fig. 9, which are not described herein again.
The embodiment of the invention can be realized by acquiring current service data stored in a terminal, wherein the service data is stored in the terminal in a linked list mode according to the operation time of the service data, then judging whether the service data meets a preset overtime service condition or not according to the operation time of the service data, if so, determining that the service data is overtime, acquiring next service data, continuously executing the step of judging whether the service data meets the preset overtime service condition or not according to the operation time of the service data, and if not, finishing executing the operation time according to the service data and judging whether the service data meets the preset overtime service condition or not; therefore, each overtime service data can be found out quickly, the efficiency of data processing is improved, and the defect that a large amount of time is consumed due to the fact that all service data need to be traversed in the prior art is overcome.
Fig. 11 is a schematic structural diagram of a terminal according to an embodiment of the present invention. The terminal may be a device with a communication network function, such as a smart phone, a tablet computer, and a smart wearable device, as shown in fig. 11, the terminal according to the embodiment of the present invention may include modules, such as a display screen, a key, a speaker, and a sound pickup, and further includes: at least one bus 501, at least one processor 502 connected to the bus 501, and at least one memory 503 connected to the bus 501, a communication device 505 that implements a communication function, and a power supply device 504 that supplies power to each power consuming module of the terminal.
The processor 502 may invoke code stored in memory 503 to perform the associated functions via the bus 501, wherein the memory 503 includes an operating system, a data transfer application.
Wherein the processor 502 is configured to:
acquiring current service data stored in a terminal, wherein the service data is stored in the terminal in a linked list mode according to the operation time of the service data;
judging whether the service data meets a preset overtime service condition or not according to the operation time of the service data;
if yes, determining that the service data is overtime, acquiring next service data, and continuing to execute the operation time according to the service data to judge whether the service data meets a preset overtime service condition;
if not, ending the step of executing the operation time according to the service data and judging whether the service data meets the preset overtime service condition.
Further optionally, the processor 502 is further configured to:
generating corresponding service overtime notification information according to each overtime service data, and sending the service overtime notification information to a corresponding client; further comprising:
and deleting the overtime service data stored in the linked list.
Further optionally, the processor 502 is further configured to:
determining the time interval from the operation time of the service data to the current system time for acquiring the service data;
and judging whether the time interval exceeds a time threshold value in a preset overtime service condition.
Further optionally, the processor 502 is further configured to:
receiving a modification instruction for service data including the operation time;
and modifying and updating the service data including the operation time in the linked list.
Further optionally, the processor 502 is further configured to:
and when receiving new service data, inserting and storing the new service data into the linked list according to the operation time of the new service data.
Further optionally, the processor 502 is further configured to:
if the service data corresponds to the storage address stored in the linked list, storing the service data in a preset hash table; and the storage address of the service data in the hash table is the same as the storage address in the linked list.
Further optionally, the processor 502 is further configured to:
receiving an operation instruction aiming at target service data, wherein the operation instruction comprises storage key information associated with the target service data;
searching the target service data from the hash table according to the storage key information in the operation instruction, and executing the operation indicated by the operation instruction on the target service data;
the operation instructions comprise any one or more of a viewing instruction, a modifying instruction, an updating instruction, a deleting instruction, an inserting instruction and a storing instruction.
The embodiment of the invention can be realized by acquiring current service data stored in a terminal, wherein the service data is stored in the terminal in a linked list mode according to the operation time of the service data, then judging whether the service data meets a preset overtime service condition or not according to the operation time of the service data, if so, determining that the service data is overtime, acquiring next service data, continuously executing the step of judging whether the service data meets the preset overtime service condition or not according to the operation time of the service data, and if not, finishing executing the operation time according to the service data and judging whether the service data meets the preset overtime service condition or not; therefore, each overtime service data can be found out quickly, the efficiency of data processing is improved, and the defect that a large amount of time is consumed due to the fact that all service data need to be traversed in the prior art is overcome.
Embodiments of the present invention also provide a computer storage medium, where the computer storage medium may store a program, and the program includes, when executed, some or all of the steps of the freezing and thawing operation method of any application described in the above method embodiments.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (13)

1. A method for processing service data, the method comprising:
acquiring current service data stored in a terminal, wherein the service data is stored in the terminal in a linked list mode according to the operation time of the service data, and the operation time of the service data refers to the time between the generation of the service data in the operation and the non-storage of the service data;
judging whether the service data meets a preset overtime service condition or not according to the operation time of the service data;
if yes, determining that the service data is overtime, acquiring next service data, and continuing to execute the operation time according to the service data to judge whether the service data meets a preset overtime service condition;
if not, ending the step of executing the operation time according to the service data and judging whether the service data meets the preset overtime service condition;
wherein the service data corresponds to a storage address stored in the linked list, and the method further includes:
storing the service data in a preset hash table; the storage address of the service data in the hash table is the same as the storage address in the linked list;
when the data structure in the service has service data which will be overtime in the future and needs to be processed, the service data is inserted into the hash table, and the expected time for searching by using the hash table is as follows: o (1);
after inserting a piece of service data into the hash table, correspondingly inserting a piece of service data into the chain table, wherein the operation time of the service data is recorded in the service data, and the service data is sorted according to time in the chain table.
2. The method of claim 1, wherein the method further comprises:
generating corresponding service overtime notification information according to each overtime service data, and sending the service overtime notification information to a corresponding client; further comprising:
and deleting the overtime service data stored in the linked list.
3. The method of claim 1, wherein the determining whether the service data meets a preset timeout condition according to the operation time of the service data comprises:
determining the time interval from the operation time of the service data to the current system time for acquiring the service data;
and judging whether the time interval exceeds a time threshold value in a preset overtime service condition.
4. The method of claim 1, wherein before the obtaining the current service data stored in the terminal, further comprising:
receiving a modification instruction for service data including the operation time;
and modifying and updating the service data including the operation time in the linked list.
5. The method of claim 1, wherein the method further comprises:
and when receiving new service data, inserting and storing the new service data into the linked list according to the operation time of the new service data.
6. The method of claim 1, wherein the method further comprises:
receiving an operation instruction aiming at target service data, wherein the operation instruction comprises storage key information associated with the target service data;
searching the target service data from the hash table according to the storage key information in the operation instruction, and executing the operation indicated by the operation instruction on the target service data;
the operation instructions comprise any one or more of a viewing instruction, a modifying instruction, an updating instruction, a deleting instruction, an inserting instruction and a storing instruction.
7. An apparatus for processing service data, the apparatus comprising:
the system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring current service data stored in a terminal, the service data is stored in the terminal in a linked list mode according to the operation time of the service data, and the operation time of the service data refers to the time between the generation of the service data in the operation and the reception activities and the non-storage of the service data;
the judging module is used for judging whether the service data meets a preset overtime service condition or not according to the operation time of the service data;
the processing module is used for determining that the service data is overtime if the judgment result of the judging module is yes, acquiring next service data, and informing the judging module to continuously execute the step of judging whether the service data meets the preset overtime service condition or not according to the operation time of the service data; if the judgment result of the judgment module is negative, informing the judgment module to finish executing the operation time according to the service data, and judging whether the service data meets a preset overtime service condition;
the service data corresponds to a storage address stored in the linked list, and the apparatus further includes:
the storage module is used for storing the service data in a preset hash table; the storage address of the service data in the hash table is the same as the storage address in the linked list;
when the data structure in the service has service data which will be overtime in the future and needs to be processed, the service data is inserted into the hash table, and the expected time for searching by using the hash table is as follows: o (1);
after inserting a piece of service data into the hash table, correspondingly inserting a piece of service data into the chain table, wherein the operation time of the service data is recorded in the service data, and the service data is sorted according to time in the chain table.
8. The apparatus of claim 7, wherein the apparatus further comprises:
the sending module is used for generating corresponding business overtime notification information according to each overtime business data and sending the business overtime notification information to a corresponding client; further comprising:
and the deleting module is used for deleting the overtime service data stored in the linked list.
9. The apparatus of claim 7, wherein the determining module comprises:
the determining unit is used for determining the time interval from the operation time of the business data to the current system time for acquiring the business data;
and the judging unit is used for judging whether the time interval exceeds a time threshold value in a preset overtime service condition.
10. The apparatus of claim 7, wherein the apparatus further comprises:
the first receiving module is used for receiving a modification instruction aiming at the service data comprising the operation time;
and the updating module is used for modifying and updating the service data including the operation time in the linked list.
11. The apparatus of claim 7, wherein the apparatus further comprises:
and the inserting module is used for inserting and storing the new service data into the linked list according to the operation time of the new service data when the new service data is received.
12. The apparatus of claim 7, wherein the apparatus further comprises:
the second receiving module is used for receiving an operation instruction aiming at target service data, wherein the operation instruction comprises storage key information associated with the target service data;
the operation module is used for searching the target service data from the hash table according to the storage key information in the operation instruction and executing the operation indicated by the operation instruction on the target service data;
the operation instructions comprise any one or more of a viewing instruction, a modifying instruction, an updating instruction, a deleting instruction, an inserting instruction and a storing instruction.
13. A terminal, characterized in that it comprises means for traffic data processing according to any of claims 7 to 12.
CN201610863693.6A 2016-09-28 2016-09-28 Method, device and terminal for processing service data Active CN106372254B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610863693.6A CN106372254B (en) 2016-09-28 2016-09-28 Method, device and terminal for processing service data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610863693.6A CN106372254B (en) 2016-09-28 2016-09-28 Method, device and terminal for processing service data

Publications (2)

Publication Number Publication Date
CN106372254A CN106372254A (en) 2017-02-01
CN106372254B true CN106372254B (en) 2022-04-29

Family

ID=57898416

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610863693.6A Active CN106372254B (en) 2016-09-28 2016-09-28 Method, device and terminal for processing service data

Country Status (1)

Country Link
CN (1) CN106372254B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109117432A (en) * 2017-06-22 2019-01-01 北京京东尚科信息技术有限公司 A kind of method and device obtaining data
CN111865829B (en) * 2019-04-24 2022-08-02 成都鼎桥通信技术有限公司 Encryption and decryption method and device for service data
CN114363416B (en) * 2021-12-29 2024-01-23 杭州趣链科技有限公司 Cross-chain processing method and device based on block chain, storage medium and server

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101365206A (en) * 2007-08-10 2009-02-11 中兴通讯股份有限公司 Detection system and method for exception example resource
CN102023926A (en) * 2010-12-08 2011-04-20 杭州华三通信技术有限公司 Method and device for data overtime aging processing
CN102117309A (en) * 2010-01-06 2011-07-06 卓望数码技术(深圳)有限公司 Data caching system and data query method

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1228935C (en) * 2001-05-31 2005-11-23 中兴通讯股份有限公司 Method of searching international nobile recognition number and electronic sequence number
CN104462549B (en) * 2014-12-25 2018-03-23 瑞斯康达科技发展股份有限公司 A kind of data processing method and device
CN105893420A (en) * 2015-12-01 2016-08-24 乐视网信息技术(北京)股份有限公司 Detection method and device of advertisement playing abnormity
CN105554530B (en) * 2015-12-14 2019-04-02 深圳市九洲电器有限公司 Set-top box advertisement management method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101365206A (en) * 2007-08-10 2009-02-11 中兴通讯股份有限公司 Detection system and method for exception example resource
CN102117309A (en) * 2010-01-06 2011-07-06 卓望数码技术(深圳)有限公司 Data caching system and data query method
CN102023926A (en) * 2010-12-08 2011-04-20 杭州华三通信技术有限公司 Method and device for data overtime aging processing

Also Published As

Publication number Publication date
CN106372254A (en) 2017-02-01

Similar Documents

Publication Publication Date Title
CN102622397B (en) Hash tag management in a microblogging infrastructure
CN106484858B (en) hot content pushing method and device
CN111447505B (en) Video clipping method, network device, and computer-readable storage medium
US9078047B2 (en) Content reproduction device
CN111277847B (en) Method, device, server and system for displaying chat messages in live broadcast
US20160036759A1 (en) Systems and methods for event stream management
CN106372254B (en) Method, device and terminal for processing service data
CN102004994B (en) Online product recommendation and selection method, device and system
CN108966316B (en) Method, device and equipment for displaying multimedia resources and predicting connection waiting duration
CN107318038B (en) Method for synchronizing video playing and comment, terminal equipment and storage medium
CN104615430A (en) Android-system-based information notification display system and implementation method of Android-system-based information notification display system
CN104699682B (en) Information processing method and device
US10831681B2 (en) Display apparatus, display control method, and computer readable recording medium
CN109657164B (en) Method, device and storage medium for publishing message
CN111901619A (en) Message pushing method and device
CN112288508A (en) House state information updating method, server and storage medium
CN103595960A (en) Interesting information monitoring and pushing method and device
CN110032691A (en) Data cached sweep-out method, device and equipment
CN103702218A (en) Video playing method and device
KR101522728B1 (en) Data transmission method and device based on slide detection
US9916473B2 (en) Privacy protection for a life-log system
KR20160129775A (en) An automated and integrated system for tournament logistics and services using internet, electronic devices, and methods thereof
CN108269104B (en) Media information delivery method, delivery engine server and media information delivery system
CN111047351A (en) Advertisement putting method and device, storage medium and electronic device
CN109672898A (en) Sending method, device and the electronic equipment of message in a kind of direct broadcasting room

Legal Events

Date Code Title Description
C06 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