CN117555905B - Service processing method, device, equipment, storage medium and program product - Google Patents

Service processing method, device, equipment, storage medium and program product Download PDF

Info

Publication number
CN117555905B
CN117555905B CN202410048388.6A CN202410048388A CN117555905B CN 117555905 B CN117555905 B CN 117555905B CN 202410048388 A CN202410048388 A CN 202410048388A CN 117555905 B CN117555905 B CN 117555905B
Authority
CN
China
Prior art keywords
time
target
window
service
storage
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
CN202410048388.6A
Other languages
Chinese (zh)
Other versions
CN117555905A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202410048388.6A priority Critical patent/CN117555905B/en
Publication of CN117555905A publication Critical patent/CN117555905A/en
Application granted granted Critical
Publication of CN117555905B publication Critical patent/CN117555905B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • 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
    • G06F16/24552Database cache management
    • 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
    • G06F16/24553Query execution of query operations
    • G06F16/24554Unary operations; Data partitioning operations
    • G06F16/24556Aggregation; Duplicate elimination
    • 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/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2474Sequence data queries, e.g. querying versioned data

Abstract

The embodiment of the application discloses a business processing method, a device, equipment, a storage medium and a program product, which can be applied to scenes such as artificial intelligence, cloud technology and the like, and can be used for saving the calculation cost and the storage cost and improving the business processing efficiency. The method comprises the following steps: receiving a service request aiming at a target service characteristic; based on the user identification and the service characteristic identification, reading a first storage list and a second storage list from a target cache, wherein the first storage list comprises N first storage blocks, and the second storage list comprises M second storage blocks; determining a first target storage block from N first storage blocks and a second target storage block from M second storage blocks based on the target request time length and the first time length; and obtaining a target accumulated characteristic value corresponding to the target request duration based on the real-time characteristic value corresponding to the first time window stored in the first target storage block and the accumulated characteristic value corresponding to the second time window stored in the second target storage block.

Description

Service processing method, device, equipment, storage medium and program product
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a business processing method, a business processing device, business processing equipment, a storage medium and a program product.
Background
In machine learning and data analysis, real-time accumulation features are a common requirement, particularly when processing large or long window data, which typically involves extensive data processing and computation. Therefore, a more efficient technical solution is needed to complete the processing and calculation of real-time accumulated features in large or long window scenes.
However, in conventional approaches to handling accumulation features, implementation is typically based on the Openmldb architecture. That is, the partitioning of the service data and the local pre-aggregation processing are completed based on the Openmldb architecture, so as to implement the local calculation of the accumulated features. However, for different service features in the same service data stream, not only multiple pieces of aggregate data need to be stored, but also under the condition that the span of a time window changes, the accumulated feature value still needs to be recalculated from service detail data, so that the calculation cost and the storage cost are increased, the accumulated feature value cannot be calculated in time, and the service processing efficiency is greatly reduced.
Disclosure of Invention
The embodiment of the application provides a service processing method, a device, equipment, a storage medium and a program product, which are used for saving the calculation cost and the storage cost, efficiently and timely completing the calculation of an accumulated characteristic value and further improving the service processing efficiency.
In a first aspect, an embodiment of the present application provides a service processing method. The method comprises the following steps: receiving a service request aiming at a target service feature, wherein the service request comprises a user identifier, a service feature identifier and a target request duration, and the service feature identifier is used for identifying the target service feature; based on the user identifier and the service feature identifier, a first storage list and a second storage list are read from a target cache, wherein the first storage list comprises N first storage blocks, each first storage block is used for storing real-time feature values of one first time window of N continuous first time windows, the second storage list comprises M second storage blocks, each second storage block is used for storing accumulated feature values of one second time window of M continuous second time windows, the duration of the second time window is equal to that of the first time window, and N, M is a positive integer; determining a first target storage block from the N first storage blocks and a second target storage block from the M second storage blocks based on the target request duration and a first duration, wherein the first duration is the duration of any first time window; and obtaining a target accumulated characteristic value corresponding to the target request duration based on the real-time characteristic value corresponding to the first time window stored in the first target storage block and the accumulated characteristic value corresponding to the second time window stored in the second target storage block, wherein the target accumulated characteristic value is used for indicating to perform service processing.
In a second aspect, an embodiment of the present application provides a service processing apparatus. The service processing device comprises an acquisition unit and a processing unit. The service processing device further comprises a transmitting unit. The system comprises an acquisition unit, a target service feature identification unit and a target service feature identification unit, wherein the acquisition unit is used for receiving a service request aiming at the target service feature, the service request comprises a user identification, the service feature identification and a target request duration, and the service feature identification is used for identifying the target service feature. The processing unit is configured to read a first storage list and a second storage list from a target cache based on the user identifier and the service feature identifier, where the first storage list includes N first storage blocks, each first storage block is configured to store real-time feature values of one of N consecutive first time windows, the second storage list includes M second storage blocks, each second storage block is configured to store accumulated feature values of one of M consecutive second time windows, a duration of the second time window is equal to a duration of the first time window, and N, M is a positive integer. The processing unit is configured to determine a first target storage block from the N first storage blocks and determine a second target storage block from the M second storage blocks based on the target request duration and a first duration, where the first duration is a duration of any of the first time windows. The processing unit is configured to obtain a target accumulated feature value corresponding to the target request duration based on the real-time feature value corresponding to the first time window stored in the first target storage block and the accumulated feature value corresponding to the second time window stored in the second target storage block, where the target accumulated feature value is used to instruct service processing.
In some alternative embodiments, the processing unit is configured to: when the first time length is smaller than the target request time length, determining a first storage block corresponding to a first sub-window to which the current time belongs and a first storage block corresponding to a second sub-window as a first target storage block based on the target request time length, wherein the first sub-window is a first time window with the smallest time difference between the N continuous first time windows and the current time, and the second sub-window is a first time window with the largest time difference between the N continuous first time windows and the current time; and when the first time length is smaller than the target request time length, determining second storage blocks corresponding to the first P-1 second time windows positioned at the current time as second target storage blocks based on the target request time length, wherein the second time length is smaller than the sum of the time lengths of the first P second time windows and is greater than or equal to the sum of the time lengths of the first P-1 second time windows, the second time length is the difference between the target request time length and the first time length, and P is a positive integer greater than or equal to 1.
In other alternative embodiments, the processing unit is configured to: extracting real-time characteristic values of the first sub-window from a first storage block corresponding to the first sub-window, and aggregating the real-time characteristic values of the first sub-window to obtain a first accumulated characteristic value; extracting real-time characteristic values meeting target time length from a first storage block corresponding to the second sub-window, and aggregating the real-time characteristic values meeting the target time length to obtain a second accumulated characteristic value, wherein the sum of the target time length and the current time is equal to the time length of the first time window; extracting accumulated characteristic values corresponding to the second time windows from second storage blocks corresponding to the first P-1 second time windows respectively, and aggregating the accumulated characteristic values of the first P-1 second time windows to obtain third accumulated characteristic values; and summing the first accumulated characteristic value, the second accumulated characteristic value and the third accumulated characteristic value to obtain a target accumulated characteristic value corresponding to the target request duration.
In other alternative embodiments, the processing unit is configured to: when the first time length is greater than or equal to the target request time length, determining a first storage block corresponding to a third sub-window to which the current time belongs as a first target storage block, wherein the third sub-window is a first time window with the smallest time difference between the N continuous first time windows and the current time; and extracting and aggregating real-time characteristic values corresponding to the target request duration from the first storage block corresponding to the third sub-window to obtain a target accumulated characteristic value corresponding to the target request duration.
In other optional embodiments, the sending unit is configured to send a service feedback message to the user terminal after obtaining the target accumulated feature value corresponding to the target request duration, where the service feedback message carries the target accumulated feature value.
In other alternative embodiments, the acquisition unit is further configured to: before a first storage list and a second storage list are read from a target cache based on the user identification and the service characteristic identification, first window information, second window information and sliding step length information are acquired, wherein the first window information is used for indicating the window condition of the first time window, the second window information is used for indicating the window condition of the second time window, and the sliding step length information is used for indicating the window interval condition of each first time window or the window interval condition of each second time window. A processing unit for: constructing the first storage list in the target cache based on the first window information and the sliding step information; and constructing the second storage list in the target cache based on the second window information and the sliding step size information.
In other alternative embodiments, the acquisition unit is further configured to: and acquiring service detail data aiming at the target service characteristics after constructing the first storage list in the target cache based on the first window information and the sliding step length information. A processing unit for: calculating a real-time characteristic value aiming at the target service characteristic in a preset time based on the service detail data; determining a first time window corresponding to the preset duration, and determining a third target storage block from the first storage list based on the first time window corresponding to the preset duration, wherein the third target storage block is a first storage block corresponding to the first time window corresponding to the preset duration; and writing the real-time characteristic value of the preset duration into the third target storage block.
In other alternative embodiments, the processing unit is further configured to: after the second storage list is built in the target cache based on the second window information and the sliding step length information, determining a second time window corresponding to the preset duration, and determining a fourth target storage block from the second storage list based on the second time window corresponding to the preset duration, wherein the fourth target storage block is a second storage block corresponding to the second time window corresponding to the preset duration; the real-time characteristic value of the preset duration and the current accumulated characteristic value in the fourth target storage block are subjected to aggregation treatment to obtain a fourth accumulated characteristic value, wherein the current accumulated characteristic value in the fourth target storage block is obtained by accumulation based on the real-time characteristic values of other preset durations before the preset duration; and writing the fourth accumulated characteristic value into the fourth target storage block.
In other alternative embodiments, the obtaining unit is configured to: acquiring service data, and aggregating the service data based on the user identifier to obtain target service data aiming at the user identifier; and acquiring service detail data aiming at the target service characteristics from the target service data based on the service characteristic identification.
A third aspect of the embodiments of the present application provides a service processing device, including: memory, input/output (I/O) interfaces, and memory. The memory is used for storing program instructions. The processor is configured to execute the program instructions in the memory, so as to execute the service processing method corresponding to the implementation manner of the first aspect.
A fourth aspect of the embodiments of the present application provides a computer-readable storage medium having instructions stored therein, which when run on a computer, cause the computer to perform to execute a method corresponding to an embodiment of the first aspect described above.
A fifth aspect of the embodiments of the present application provides a computer program product comprising instructions which, when run on a computer or processor, cause the computer or processor to perform the above-described method for performing the embodiment of the above-described first aspect.
From the above technical solutions, the embodiments of the present application have the following advantages:
in the embodiment of the application, a first storage list and a second storage list are constructed in a local target cache in advance, wherein the first storage list comprises N first storage blocks, and the second storage list comprises M second storage blocks. For each first memory block, the real-time characteristic value of one first time window of the N continuous first time windows can be stored; for each second memory block, it can also be used to store the cumulative eigenvalue of one second time window of M consecutive second time windows. Moreover, the duration of each second time window is equal to the duration of one first time window. In this way, after receiving a service request aiming at a target service feature, based on a user identifier and a service feature identifier carried in the service request, a first storage list and a second storage list are read from a target cache, and further, based on a target request duration and a first duration, a first target storage block is determined from N first storage blocks, and a second target storage block is determined from M second storage blocks. The first time period described is understood to be the time period of the first time window. Thus, after the first target storage block and the second target storage block are determined, the target accumulated characteristic value corresponding to the target request duration can be calculated through the real-time characteristic value of the corresponding first time window stored in the first target storage block and the accumulated characteristic value of the corresponding second time window stored in the second target storage block. The target integrated feature value can be used to process a service. That is, in the embodiment of the present application, a feature storage structure (i.e., a first storage list and a second storage list) is newly built in the target cache, and then a first storage block and a first time window in the feature storage structure are associated, and a second storage block and a second time window are associated, so that real-time feature values and accumulated feature values under the same time span can be stored in different storage blocks. In this way, in the process of calculating the target accumulated characteristic value meeting the target request duration, the corresponding real-time characteristic value and the accumulated characteristic value are directly read from different storage blocks of the target cache without recalculating the target accumulated characteristic value from service detail data, so that the calculation processing of the target accumulated characteristic value can be completed, the calculation cost and the storage cost are saved, the accumulated characteristic value can be efficiently and timely calculated, and the service processing efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 shows an application scenario schematic diagram provided in an embodiment of the present application;
FIG. 2 shows a schematic diagram of a system architecture provided by an embodiment of the present application;
fig. 3 shows a flowchart of a service processing method provided in an embodiment of the present application;
FIG. 4 is a schematic structural diagram of a memory structure according to an embodiment of the present disclosure;
FIG. 5 shows a schematic diagram of data types provided by embodiments of the present application;
FIG. 6 is a schematic diagram of a calculation flow of a target accumulated feature value according to an embodiment of the present application;
fig. 7 is another flow diagram of a service processing method according to an embodiment of the present application;
fig. 8 is a schematic diagram showing a functional module structure of a service processing apparatus provided in an embodiment of the present application;
fig. 9 shows a schematic hardware structure of a service processing device provided in an embodiment of the present application.
Description of the embodiments
The embodiment of the application provides a service processing method, a device, equipment, a storage medium and a program product, which are used for saving the calculation cost and the storage cost, efficiently and timely completing the calculation of an accumulated characteristic value and further improving the service processing efficiency.
It will be appreciated that in the specific embodiments of the present application, related data such as user information is referred to, and when the above embodiments of the present application are applied to specific products or technologies, user permissions or consents need to be obtained, and the collection, use and processing of related data need to comply with related laws and regulations and standards of related countries and regions.
The following description of the technical solutions in the embodiments of the present application will be made clearly and completely with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
The terms "first," "second," "third," "fourth" and the like in the description and in the claims of this application and in the above-described figures, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application described herein may be capable of being practiced otherwise than as specifically illustrated and described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The business feature or business label refers to feature information calculated based on business behavior data and the like, and includes, for example, but is not limited to, object features, service features and the like. Taking object features as an example, the described object features are sometimes also referred to as user tags, and refer to object feature information calculated based on object behavior data, static attribute data, and the like. At present, it is generally desirable to provide more comprehensive service features so as to more carefully understand the actual situation and state of the corresponding service, such as the security level of the service, the vulnerability situation of the service, and the like; or, since service data for calculating service features is constantly updated due to environmental changes, it is required to quickly and accurately calculate service features with strong timeliness, or to provide real-time service features, so as to provide a powerful support for a fast decision.
In machine learning and data analysis, real-time accumulation features are a common requirement, particularly when processing large or long window data, which typically involves extensive data processing and computation. By calculating the accumulated feature value of the service feature, the corresponding service feature is favorable to be used as the input of the neural network model, so that the neural network model with higher quality is produced, or risk analysis and the like on the service feature are realized, and the method is not limited in the application.
However, in conventional approaches to handling accumulation features, implementation is typically based on the Openmldb architecture. That is, the partitioning of the service data and the local pre-aggregation processing are completed based on the Openmldb architecture, so as to implement the local calculation of the accumulated features. However, for different service features in the same service data stream, not only multiple pieces of aggregate data need to be stored, but also under the condition that the span of a time window changes, the accumulated feature value still needs to be recalculated from service detail data, so that the calculation cost and the storage cost are increased, the accumulated feature value cannot be calculated in time, and the service processing efficiency is greatly reduced.
Therefore, in order to solve the above-mentioned technical problems, the embodiments of the present application provide a service processing method. The service processing method can be applied to the application scenario shown in fig. 1. As shown in fig. 1, a real-time traffic feature calculation scenario is illustrated, which generates three time windows of ten days, one hour, and five minutes, and performs different aggregate calculations based on the three time windows.
As shown in fig. 1, taking a business feature as an example of a card swiping behavior of a user, for a user corresponding to a user identifier u1, behavior data with an amount of 100 yuan is generated in 2022, 04, 02, 9:00. At this time, after obtaining the corresponding user information, consumption record, and other information of the user u1, the real-time calculation process of the user card swiping behavior is performed in combination with the behavior data, so as to calculate the cumulative feature values of the user card swiping behavior of the user u1 in the three time windows of the past ten days, the past one hour, and the past five minutes, for example, 10000 yuan, 1000 yuan, and 20 yuan, respectively.
Therefore, by calculating the accumulated characteristic values in different time windows, the business analysis on the user card swiping behavior of the user u1 can be realized, the neural network model with higher quality can be produced favorably, or the risk analysis on the consumption behavior of the user u1 can be realized, and the method is not limited in the application.
In fig. 1, the user card swiping action is taken as an example of the service feature to explain the scene. In practical applications, other types of service features are also included, such as a reading duration, a short video viewing duration, a number of mobile phone uses, a virtual game playing duration, etc., which are not limited in this application.
For the above-mentioned service processing method of the present application, the service processing method is also applicable to the system architecture shown in fig. 2, for example. As shown in fig. 2, the system architecture includes at least a computing device and a user terminal. The computing device at least comprises a computing module, a storage module, a service module and a configuration module. And, in the memory module, two different memory areas are included, namely, a first memory list including N first memory blocks and a second memory list including M second memory blocks. Each first memory block corresponds to a first time window, and each second memory block corresponds to a second time window. The time span of the first time window is the same as the time span of the second time window.
Thus, in the feature writing process (corresponding to the solid arrow flow in fig. 2), the computing device acquires service detail data of different service features, such as data E1 to data En, etc., where n is a real number greater than or equal to 1. The computing device aggregates the service detail data of the users corresponding to the user identifications according to the user identifications through the computing module, so that the target service detail data of different users are obtained. In this way, the computing device calculates the real-time characteristic value aiming at the target service characteristic in different time windows through the computing module, and then writes the real-time characteristic value into the first storage block corresponding to the corresponding first time window. And similarly, aggregating the real-time characteristic value and the current accumulated characteristic value in the second storage block corresponding to the second time window through the calculation module, and writing the aggregated accumulated characteristic value into the second storage block corresponding to the second time window.
For example, taking the service feature user_last_1d_duration corresponding to the service feature identifier 1001 shown in fig. 2 and 2022 as an example, the duration of the first time window and the second time window are assumed to be 1 day (i.e. 1440 minutes). At this time, in each second storage block in the second storage list, the cumulative feature value of each day (sum_value as shown in fig. 2) may be stored, so that the second storage list can store the cumulative feature values of each day from 2022, 01, 12, 31, 365 days. Likewise, in each first storage block in the first storage list, a real-time feature value of each day (value_list as shown in fig. 2) may be stored so that the first storage list can store real-time feature values of each day from 2022, 01, 12, 31, 365 days. For example, the day 2022, 01 may be stored in the first memory block in the first memory list as a real-time feature value for each of 1440 minutes.
It should be noted that, under the condition that no corresponding real-time characteristic value is generated, the default value of the corresponding real-time characteristic value is 0.
Thus, in a feature read flow (flow corresponding to the dashed arrow in fig. 2), the computing device may receive a service request through the service module. The service request includes a user identifier, a service feature identifier, and a target request duration, for example, the user identifier is u1 as shown in fig. 2, and the service feature is denoted by 1001. Thus, after receiving the service request, the computing device further obtains, through the service module, the first storage list and the second storage list from the target cache based on the user identifier and the service feature identifier carried in the service request, and further determines, based on the target request duration, a first target storage block from the first storage list, and determines, from the second storage list, a second target storage block. Further, the computing device calculates the real-time characteristic value of the first time window stored in the first target storage block and the accumulated characteristic value of the second time window stored in the second target storage block through the service module, so as to calculate the target accumulated characteristic value of the target request duration.
Alternatively, the computing device may send the target accumulated feature value to the user terminal after obtaining the target accumulated feature value. After receiving the target accumulated feature value sent by the computing device, the user terminal performs service processing based on the target accumulated feature value, for example, but not limited to, service analysis, service vulnerability processing, and the like.
The business processing method provided by the application can be applied to the field of object portrait production. For example, the user's interests may be counted and calculated in real time by accumulating the user's usage habit or consumption behavior in an Application (APP), capturing the user's interest preference, payment habit, etc., and further using the produced business data as the input of algorithms such as neural network model or business rule, etc., so as to improve the refresh efficiency, click duration, recall number, etc. Or, the service processing method provided by the application can also be applied to the fields of anti-cheating behaviors and the like, and whether the corresponding object behavior is in abnormal behavior or not can be analyzed through calculating the accumulated characteristic value of the object behavior, and the embodiment of the application is not limited.
In practical application, the above-mentioned service processing method can also be applied to scenes such as artificial intelligence, cloud technology, intelligent traffic, intelligent internet of things, internet of vehicles, service recommendation or service search, and the like, and is not limited in the application.
In addition, the computing devices mentioned above may include, but are not limited to, terminal devices, servers, question and answer robots, and the like. The terminal device may include, but is not limited to, a smart phone, a desktop computer, a notebook computer, a tablet computer, a smart speaker, a vehicle-mounted device, a smart watch, a wearable smart device, a smart voice interaction device, a smart home appliance, an aircraft, and the like. The server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or may be a cloud server or the like for providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (context delivery network, CDN), basic cloud computing services such as big data and artificial intelligent platforms, and the application is not limited specifically.
The described user terminals may include, but are not limited to, smart phones, desktop computers, notebook computers, tablet computers, smart speakers, vehicle devices, smart watches, wearable smart devices, intelligent voice interaction devices, smart appliances, etc., and are not limited in this application.
A business processing method provided in the embodiments of the present application is described below with reference to the accompanying drawings. Fig. 3 shows a flowchart of a service processing method provided in an embodiment of the present application. As shown in fig. 3, the service processing method may include the steps of:
301. and receiving a service request aiming at the target service feature, wherein the service request comprises a user identifier, a service feature identifier and a target request duration, and the service feature identifier is used for identifying the target service feature.
In this example, the target user wants to know the target request duration, and for the accumulated feature of the target service feature, the user identifier, the service feature identifier and the target request duration can be mapped into the service request through the user terminal, and then the service request is sent to the computing device through a wired network or a wireless network, etc. In this way, the computing device may receive a service request for the target service feature. For example, after receiving a service request for the target service feature, the computing device may demap the service request, thereby obtaining a user identifier, a service feature identifier, and a target request duration carried in the service request.
The mentioned user identification can be used to identify the target user to which the service request was initiated. The described target request duration is understood to be the duration corresponding to the time when the target user wants to know the accumulated characteristic value of the target service characteristic in the preset duration. And the service characteristic identifier is used for identifying the target service characteristic.
For example, taking the service feature identifier 1001 and the service feature identifier 1002 shown in fig. 2 as an example, the service feature identifier 1001 is used to identify a user_latest_1d_duration service feature, and the service feature identifier 1002 is used to identify a last2d_duration service feature. If the above-mentioned service request is expressed as { "user_id": "u1", "feature_id":1001,48h }, it can be seen from the service request that the target user corresponding to the user identifier u1 wants to be able to learn that the service feature identifier is the user_last_1d_duration service feature corresponding to 1001, and the accumulated feature value is 48 hours (h) before the current time.
In practical application, the service request may also have other expression forms, which are not limited in the present application. In addition, the user identifier u1, the service feature identifier 1001, and the target request duration are 48h, which is also only an exemplary description in the present application, and is not limited in the specific application. For example, the accumulated feature value within 7 days before the current time may also be calculated for the target user corresponding to the user identifier u1, the last_2d_duration service feature corresponding to the service feature representation 1002.
The target request duration described can be determined according to the service requirement in practical application, except the values of 48h, 7 days and the like, and the method is not limited in the application.
302. Based on the user identification and the service feature identification, a first storage list and a second storage list are read from a target cache, wherein the first storage list comprises N first storage blocks, each first storage block is used for storing real-time feature values of one first time window of N continuous first time windows, the second storage list comprises M second storage blocks, each second storage block is used for storing accumulated feature values of one second time window of M continuous second time windows, the duration of the second time window is equal to that of the first time window, and N, M is a positive integer.
In this example, the computing device may also construct the first and second storage lists in the target cache based on the configuration information prior to reading the first and second storage lists from the target cache, so as to facilitate completing a write operation to the feature values in the first and second storage lists. This can be understood in particular with reference to the following:
First window information, second window information and sliding step length information are acquired. For example, the target user sets the configuration information required for storage in advance based on the service requirement, and the configuration information at least includes the first window information, the second window information and the sliding step information. In this way, the computing device may obtain the first window information, the second window information, and the sliding step information by obtaining the configuration information.
The first window information described can reflect window conditions of a first time window, such as every minute of a day. The described second window information may reflect window conditions of a second time window, such as a day of the year. In addition, sliding step information for indicating window interval conditions of each first time window, such as interval of 1 minute, etc.; alternatively, the sliding step information may also indicate a window interval of each second time window, such as an interval of 1 day, etc., which is not limited in the present application.
After the first window information and the sliding step information are obtained, a first storage list can be built in the target cache based on the first window information and the sliding step information. As an exemplary description, by establishing a one-to-one association relationship between the current first time window indicated by the first window information and the current first storage block in the target cache, the current first storage block can be further used to store the real-time characteristic value of the current first time window. Therefore, under the current first time window, based on the sliding step length information, the next first time window can be determined, so that the association relationship between the next first time window and another first storage block in the target cache is further constructed, and further the next first storage block can be used for storing the real-time characteristic value of the next first time window. And so on, so as to construct a first storage list, which can be specifically understood with reference to the content shown in fig. 4, and will not be described in detail herein.
That is, the first memory list includes N first memory blocks, each for storing real-time characteristic values of one first time window of N consecutive first time windows.
Similarly, after the second window information and the sliding step information are obtained, a second storage list may be constructed in the target cache based on the second window information and the sliding step information. As an exemplary description, by establishing a one-to-one association relationship between the current second time window indicated by the second window information and the current second storage block in the target cache, the current second storage block can be further used to store the real-time characteristic value of the current second time window. Therefore, under the current second time window, based on the sliding step length information, the next second time window can be determined, so that the association relationship between the next second time window and another second storage block in the target cache is further constructed, and the next second storage block can be used for storing the real-time characteristic value of the next second time window. And so on, so as to construct a second storage list, which can be specifically understood with reference to the content shown in fig. 4, and will not be described in detail herein.
That is, the second memory list includes M second memory blocks, each for storing the accumulated feature value of one second time window of M consecutive second time windows.
It should be noted that, for the duration of each second time window, the duration is considered to be equal to the duration of the first time window. In addition, the duration of the second time window, sometimes referred to as the window size of the second time window, is not limited to the name in the present application. Similarly, the duration of the first time window, sometimes also referred to as the window size of the first time window, is not limited to a name in the present application.
For example, fig. 4 shows a schematic structural diagram of a storage structure provided in an embodiment of the present application. As shown in fig. 4, in the aforementioned storage module (also referred to as target cache in this application) mentioned in fig. 2, two storage lists, namely the first storage list and the second storage list mentioned in fig. 2, need to be stored. The first storage list includes N first storage blocks, for example, a first storage block A1 to a first storage block AN. And each first storage block is used for storing the real-time characteristic value of one time window in the N continuous first time windows.
For example, N consecutive first time windows, in turn, are first time window T1 to first time window TN. At this time, for the first storage block A1, it is able to store the real-time characteristic value of the first time window T1. For example, taking the duration of each first time window as 1 day (i.e. 24 hours) as an example, assuming that the first time window T1 is 2022, 1 month, 1 day, then in the first storage block A1, real-time feature values of each minute in the 1 days may be stored sequentially. For example, the real-time eigenvalues of 1 st minute (i.e., 00:01) of 2022, 1 st month, 1 st day in the first memory block A1; further, after the real-time feature is generated at 2 min (i.e. 00:02) in 1 st month of 2022, the real-time feature value at 1 min (i.e. 00:01) in 1 st month of 2022 and the real-time feature value at 2 min are polymerized to obtain a polymerized real-time feature value, for example, value_mm=agg (value_01, value), where value_01 represents the real-time feature value at 2 min and value_01 represents the real-time feature value at 1 min (i.e. 00:01), agg () represents an aggregation function, including but not limited to sum, max, and other functions. In this way, the aggregated real-time feature value value_mm is updated and stored in the first storage block A1, so that the first storage block A1 is changed from storing the real-time feature value of the 1 st minute to storing the real-time feature value of the 1 st minute and the real-time feature value of the 2 nd minute. And so on, after generating the corresponding real-time characteristic value until 1440 min, aggregating the real-time characteristic value at 1440 min with the previous real-time characteristic values at 1 min to 1439 min, thereby completing the storage processing of the real-time characteristic value at each minute in 1440 min, namely, the first storage block A1 can store the real-time characteristic value at 1 min, the real-time characteristic value at 2 min, the third and fourth, and the real-time characteristic value at 1440 min. More specifically, the real-time feature value of 1 st minute in 1 st month 1 day 2022 is stored by the first sub-block 1 in the first storage block A1; storing real-time characteristic values of 2 nd minutes in 1 st of 2022 years and 1 st of 2 nd by a first sub-block 2 in a first storage block A1; by analogy, the real-time characteristic value of 1440 minutes in month 1 of 2022 is stored by the first sub-block 1440 in the first storage block A1.
Similarly, for the second memory block A2, real-time characteristic values of the first time window T2 may be stored. For example, assuming that the first time window T2 is 2022, 1 for 1 day, 1 for 2 months, then the first storage block A2 may sequentially store the real-time feature value of each minute in 1 for 2022, 1 for 2 days, and the content stored in the first storage block A1 may be understood, which is not described herein.
Similarly, the first storage block AN can be used to store the real-time characteristic value of the first time window TN, and can be understood by referring to the content stored in the first storage block A1, which is not described herein.
For example, consider the business feature shown in fig. 2 described above as the business feature of 1001, assuming the business feature is 2022 years of reading. At this time, in the i-th first memory block in the first memory list, the reading time period every 1 minute in the i-th day may be stored. For example, for the first memory block A1, it can be used to store a read duration of each minute on day 1 (e.g., day 1 of 2022, month 1), for example, denoted as d_ {1001} [1] _20220101[1,1440]. Likewise, for the second memory block A2, it can be used to store a read duration of each minute on day 2 (e.g., day 2 of 1 month of 2022), for example, denoted as d_ {1001[2] } 20220102[1,1440]. And so on, for the first memory block a365 (i.e., n=365), it can be used to store the read duration of each minute on day 365 (e.g., day 31 of 12 months of 2022), for example, denoted as d_ {1001} [365 _20221231[1,1440].
The above-mentioned second memory list includes M second memory blocks, for example, the second memory block B1 to the second memory block BM. And, for each second memory block, storing the accumulated characteristic value of one second time window of the M consecutive second time windows.
Taking M consecutive second time windows, in turn, a second time window G1 to a second time window GM as an example, at this time, for the second storage block B1, it is able to store the accumulated feature value of the second time window G1. For example, taking the example that the duration of each second time window is 1 day (i.e., 24 hours), assuming that the second time window G1 is 2022, 1 month, 1 day, then in the second storage block B1, the cumulative feature value within the 24 hours (i.e., 1440 minutes) may be stored. More specifically, among 1 day, 2022, 1 month, 1 day, the real-time feature values of each minute within the first time window T1 stored in the first storage block A1 may be subjected to aggregation processing such as summation, to obtain an accumulated feature value of 1 day, 2022, 1 month, 1 day, and further the accumulated feature value of 1 day, 2022, 1 month, 1 day, may be stored in the second storage block B1.
For the second storage block B2, it may be used to store the accumulated feature value of the second time window G2, and may be specifically understood with reference to the content of the second storage block B1, which is not described herein. The second time window G2 is depicted as corresponding to the first time window T2. And so on, for the second memory block BM, it may be used to store the accumulated feature value of the second time window GM, which may be specifically understood with reference to the content of the second memory block B1, which is not described herein. The second time window GM described corresponds to the first time window TN.
For example, taking the aforementioned reading time length of 2022 as an example of the service feature, for the ith second storage block Bi in the second storage list, the total reading time length of 1440 minutes on the ith day, that is, the cumulative reading time length on the ith day, is expressed as s_1001 } [ i ] =d_1001 ] [ i ] _yyyymmdd [1] + … +d_1001 ] [ i ] _yyymmdd [1440], 1.ltoreq.i.ltoreq.m, i is an integer. For example, the second memory block B1 can be used to store the accumulated reading time period on day 1 (e.g., 2022, 1), for example, denoted as s_ {1001} [1] =d_ [1001] [1] _20220101[1] + … +d_ [1001] [1] _20220101[1440]. Similarly, the second memory block B2 can be used to store the accumulated reading time period on day 2 (e.g., 2022, 1, 2), for example, denoted as s_ {1001} [2] =d_ [1001] [2] _20220102[1] + … +d_ [1001] _ [2] _20220102[1440]. And so on, for the second memory block B365 (i.e., n=365), it can be used to store the accumulated reading duration on day 365 (e.g., day 31 of 12 of 2022), for example, denoted as s_ {1001} [365] =d_ [1001] [365] _ [ 20221231[1] + … +d_ [1001] [365] _20221231[1440].
Note that, for the real-time feature value stored in each first storage block, the type of the accumulated feature value stored in each second storage block may include, but is not limited to, int, float, string, byte [ ], seq, and other basic data types, and may be specifically understood with reference to the content shown in fig. 5, which is not specifically limited herein.
After the first storage list and the second storage list are constructed, the computing device may first acquire service data, and aggregate the service data based on the user identifier, so as to obtain target service data for the user identifier. After determining the target service data of the pair of user identifiers, the computing device obtains service detail data aiming at the target service characteristics from the target service data based on the service characteristic identifiers.
In this way, the computing device calculates a real-time feature value for the target service feature within the preset duration based on the service detail data. For example, a real-time characteristic value is calculated within 1 minute. Further, based on the time offset between the current time and the current first time window, determining a first time window corresponding to the preset duration from N continuous first time windows. After the first time window corresponding to the preset duration is determined, a corresponding third target storage block is determined from the first storage list based on the association relation between the first time window and the first storage block and the first time window corresponding to the preset duration. That is, the third target memory block is understood to be the first memory block corresponding to the first time window corresponding to the preset duration. Thus, after the third target storage block is determined, the real-time characteristic value of the preset duration can be written into the third target storage block.
For example, assuming that the current time is 2022, 1 month, 1 day, 00:05, the real-time eigenvalue in 1 minute of 00:05 can be calculated based on business detail data at this time, which is Q1. Further, by calculating the time offset between 2022, 1, 00:05, and 2022, 1, the corresponding first time window may be determined to be T1, and further, based on the first time window T1, the corresponding first storage block A1 is determined to be the third target storage block. In this way, the computing device may write the real-time feature value Q1 into the first memory block A1. More specifically, the real-time feature value Q1 is written into the first block 5 in the first memory block A1.
In addition, based on the time offset between the current time and the initial second time window, a second time window corresponding to the preset duration can be determined from the M second time windows. In this way, the fourth target storage block is determined from the second storage list based on the second time window corresponding to the preset duration and the association relationship between the second time window and the second storage block. That is, the fourth target memory block is a second memory block corresponding to a second time window corresponding to the preset duration. Further, the real-time characteristic value of the preset time length and the current accumulated characteristic value in the fourth target storage block are subjected to aggregation processing to obtain a fourth accumulated characteristic value. The current accumulated feature value in the described fourth target storage block is accumulated based on the real-time feature values of other preset durations before the preset duration. In this way, after the fourth integrated feature value is obtained by aggregation, the fourth integrated feature value is written into the fourth target memory block.
For example, the current time is 2022, 12, 31, 18:00, assuming that a real-time feature value W1 within 1 minute can be calculated based on the business detail data. At this time, by calculating the time offset (i.e. 365) between the 2022 12 month 31 day and 2022 1 month 1 day, the corresponding second time window may be determined as G365, and further the second storage block B365 corresponding to the second time window G365 may be determined as the fourth target storage block. Thus, the current accumulated feature value stored in the second storage block B365 is summed with the W1 to obtain an updated accumulated feature value (i.e., a fourth accumulated feature value), and written into the second storage block B365.
Note that the current accumulated feature value stored in the second storage block B365 mentioned in the above example is based on 2022, 12, 31, 00:00 to 2022, 12, 31, 17: the real-time eigenvalues of 59 and 1080 minutes were summed.
Thus, after the real-time feature value is written into the first storage block and the accumulated feature value is written into the second storage block, a subsequent feature reading operation can be performed to calculate the target accumulated feature value corresponding to the target request duration.
That is, after constructing the first storage list and the second storage list, and writing the real-time feature value of each first time window into the first storage block in the first storage list, and writing the accumulated feature value of each second time window into the second storage block in the second storage list, the computing device may read the first storage list and the second storage list from the target cache based on the user identification and the service feature identification in the service request, so that the feature values of different time windows can be known.
303. Based on the target request duration and the first duration, determining a first target memory block from the N first memory blocks and determining a second target memory block from the M second memory blocks, wherein the first duration is the duration of the first time window.
In this example, since the first storage block corresponding to each first time window is used for storing the real-time feature value corresponding to the first time window, and each second storage block is used for storing the accumulated feature value corresponding to the second time window. Therefore, when the target user needs to query the accumulated feature value of the target request duration, the computing device can compare the target request duration with the first duration, and further can extract from different storage blocks under the condition that the target request duration is different. Note that the first duration mentioned is the duration of any one of the first time windows.
For example, when the first time length is greater than or equal to the target request time length, it is indicated that the real-time feature value stored in the first storage block can meet the feature requirement under the current target request time length, and at this time, the real-time feature value can be directly extracted from the first storage block. Otherwise, when the first time length is smaller than the target request time length, the fact that the real-time characteristic value stored in the first storage block cannot meet the characteristic requirement under the target request time length is indicated, and the characteristic requirement under the target request time length needs to be extracted from the first storage block and the second storage block. For different situations, it can be understood in particular with reference to the following described manner, namely:
Case 1, first time length is less than target request time length
For example, if the target request time length is longer than the duration of any one of the first time windows, in order to avoid the need to continuously and repeatedly determine the accumulated feature value by calculating the service detail data, in the embodiment of the present application, the computing device may determine, as the first sub-window, a first time window with the smallest time difference between the current time and N consecutive first time windows based on the target request time length when the first time length is shorter than the target request time length; likewise, a first time window with the largest time difference between the N continuous first time windows and the current time is determined as a second sub-window based on the target request duration. Further, the computing device determines a first storage block corresponding to the first sub-window and a first storage block corresponding to the second sub-window as the first target storage block.
In addition, in the case that the first time length is smaller than the target request time length, the computing device also needs to calculate a time length difference between the target request time length and the first time length, that is, the second time length. Thus, the computing device determines whether the second time period is less than the sum of the time periods of the first P second time windows at the current time, and whether the second time period is greater than or equal to the sum of the time periods of the first P-1 second time windows. Further, the computing device determines the second storage block corresponding to each of the first P-1 second time windows at the current time as the second target storage block when the second time length is determined to be smaller than the sum of the time lengths of the first P second time windows and greater than or equal to the sum of the time lengths of the first P-1 second time windows. P is a positive integer greater than or equal to 1.
For example, assuming that the target request duration is 48h, the duration of any one of the first time windows (i.e., the first time duration) is 24h, and comparing the target request duration with the first time duration, 24h < 48h. Taking the example shown in fig. 4 as an example, it is assumed that the current time is 2022, 1, 8, 18:00, at this time, there are 8 first memory blocks (e.g., first memory block A1 to first memory block A8) corresponding to the first memory list, and these 8 first memory blocks correspond to 8 first time windows, i.e., first time window T1 to first time window T8. And, the first time window T1 represents 2022, 1-month, 1-day, and so on, and the first time window T8 represents 2022, 1-month, 8-day.
At this time, the first time window T8 is determined to be a first sub-window, and the first time window T6 is determined to be a second sub-window based on the target request duration 48h through the time differences between the 8 first time windows and 18:00 of the current time 2022, 1 month and 8 days. In this way, the first memory block A8 corresponding to the first time window T8 and the first memory block A6 corresponding to the first time window T6 are set as the first target memory blocks.
In addition, by calculating the target request duration and the first duration, the second duration may be obtained to be 24h. Moreover, the computing device may determine, based on the current time 2022, 1 month 8 days 18:00, that the second time window corresponding to the current time is G8. Thus, the computing device may determine that the second time period is 24h, less than the sum of the time periods of the first 2 second time windows (i.e., g6+g7) of the current time, and greater than or equal to the time period of the first 1 second time windows (i.e., G7) of the current time. In this way, the computing device may determine the second memory block (i.e., B7) corresponding to the first 1 second time windows G7 of the current time as the second target memory block.
It should be noted that, the above-mentioned target request is shown as 48h, and the duration of the first time window is 24h, which is a value, and in practical application, may be also determined according to the service requirement, which is not limited in this application.
Case 2, first time period greater than or equal to target request time period
For example, when the first time period is greater than or equal to the target request time period, it is stated that the feature values satisfying the target request time period can be extracted in the first time window to which the first time period belongs, and at this time, the real-time feature values may be extracted from the first storage block.
Based on this, the computing device may determine, based on the target request duration, a first time window of the N consecutive first time windows having a smallest time difference from the current time, as a third sub-window, in a case where the first time duration is greater than or equal to the target request duration. In this way, the computing device determines the first storage block corresponding to the third sub-window as the first target storage block.
For example, assuming that the target request duration is 16h, the duration of any one of the first time windows (i.e., the first time duration) is 24h, as can be seen by comparison, 24h > 16h. Taking the example shown in fig. 4 as an example, it is assumed that the current time is 2022, 1, 8, 18:00, at this time, there are 8 first memory blocks (e.g., first memory block A1 to first memory block A8) corresponding to the first memory list, and these 8 first memory blocks correspond to 8 first time windows, i.e., first time window T1 to first time window T8. And, the first time window T1 represents 2022, 1-month, 1-day, and so on, and the first time window T8 represents 2022, 1-month, 8-day.
Thus, based on the current time 2022, month 1, 8, and day 18:00, the computing device may determine that the first time window corresponding to the current time is T8, i.e., the third sub-window is T8. Furthermore, the real-time characteristic value of each minute is already stored in the first memory block A8 corresponding to the first time window T8 for 18 hours, i.e., 00:00 to 18:00. Thus, the computing device may treat this first memory block A8 as the first target memory block.
304. And obtaining a target accumulated characteristic value corresponding to the target request duration based on the real-time characteristic value of the corresponding first time window stored in the first target storage block and the accumulated characteristic value of the corresponding second time window stored in the second target storage block, wherein the target accumulated characteristic value is used for indicating to perform service processing.
In this example, the computing device, after determining the first target memory block and the second target memory block, may extract real-time characteristic values corresponding to the first time window from the first target memory block and extract stored accumulated characteristic values corresponding to the second time window from the second target memory block. In this way, the computing device can sum the real-time characteristic value of the corresponding first time window stored in the first target storage block and the accumulated characteristic value of the corresponding second time window stored in the second target storage block, so as to calculate and obtain the target accumulated characteristic value corresponding to the target request duration.
Illustratively, as can be appreciated from the foregoing step 303, in the case where the target request duration is different, the feature values in different memory blocks are extracted to calculate the target accumulated feature value. The following also describes case 1 and case 2 shown in the foregoing step 303, specifically as follows:
case 1, first time length is less than target request time length
For example, in the case that the first time length is smaller than the target request time length, since the first target storage block includes a first storage block corresponding to the first sub-window and a first storage block corresponding to the second sub-window, and the second target storage block includes second storage blocks corresponding to the first P-1 second time windows, the process of calculating the target accumulated feature value by the computing device may be understood from the flowchart with reference to fig. 6, that is:
601. and extracting the real-time characteristic value of the first sub-window from the first storage block corresponding to the first sub-window, and aggregating the real-time characteristic value of the first sub-window to obtain a first accumulated characteristic value.
602. And extracting real-time characteristic values meeting the target duration from the first storage block corresponding to the second sub-window, and aggregating the real-time characteristic values meeting the target duration to obtain a second accumulated characteristic value.
In this example, the contents of the first sub-window, the second sub-window, etc. described above may be understood with reference to the contents described in step 303, which is not described herein. In addition, the described target time length can be understood as the difference between the time length of the first time window and the current time.
For example, taking the example shown in the foregoing case 1 in the step 303 as an example, since the current time is 2022, 1, 8, 18, 00, and the real-time feature value of each minute in 18 hours, i.e. 00, 00 to 18, 00 is stored in the first storage block A8 corresponding to the first sub-window, at this time, the computing device may extract the real-time feature value of each minute in 18 hours stored in the first storage block T8, and perform the summation processing, so as to obtain the cumulative feature value of 18 hours, i.e. the first cumulative feature value.
In addition, the computing device calculates the time difference between the duration of the first time window and the current time, i.e. 24h-18h = 6h. Thus, the computing device needs to extract the real-time feature value for 6 hours from the first storage block A6 corresponding to the second sub-window T6. Specifically, the computing device may extract real-time feature values of each minute in 6 hours of 2022, 1 month, 6 days, 18:00 to 24:00 from the first storage block A6, and perform a summation process, so as to obtain a cumulative feature value of the 6 hours, that is, a second cumulative feature value.
603. And extracting the accumulated characteristic values corresponding to the second time windows from the second storage blocks corresponding to the first P-1 second time windows, and aggregating the accumulated characteristic values of the first P-1 second time windows to obtain a third accumulated characteristic value.
For example, taking the example shown in case 1 in the foregoing step 303 as an example, since the current time is 2022, 1 month, 8 days, 18:00, the determined second target memory block is the second memory block B7. At this time, the computing device may extract the accumulated feature value of the second time window G7, i.e., the accumulated feature value corresponding to 24 hours on day 2022, 1, 7, directly from the second memory block B7.
Note that, the execution sequence of the steps 601 to 603 is not limited in the embodiment of the present application. For example, in practical applications, step 602 may be performed first, then step 601 may be performed, and finally step 603 may be performed; alternatively, steps 601 to 603 may be performed simultaneously, which is not limited in the present application.
604. And aggregating the first accumulated characteristic value, the second accumulated characteristic value and the third accumulated characteristic value to obtain a target accumulated characteristic value corresponding to the target request duration.
In this example, after calculating the first accumulated feature value, the second accumulated feature value, and the third accumulated feature value, the computing device may aggregate, such as sum, the first accumulated feature value, the second accumulated feature value, and the third accumulated feature value, thereby calculating a target accumulated feature value corresponding to the target request duration.
Case 2, first time period greater than or equal to target request time period
In an exemplary case where the first time period is greater than or equal to the target request time period, since the first target storage block includes the first storage block corresponding to the third sub-window, the computing device may directly extract and aggregate the real-time feature value corresponding to the target request time period from the first storage block corresponding to the third sub-window in the process of calculating the target accumulated feature value, so as to calculate and obtain the target accumulated feature value corresponding to the target request time period.
For example, taking the example shown in case 2 in the previous step 303 as an example, assuming that the current time 2022 is 18:00 on 1 month and 8 days, the computing device may extract real-time feature values of each minute within 16 hours from 2022 is 02:00 on 1 month and 8 days to 2022 is 18:00 on 1 month and 8 days directly from the third sub-window (i.e., the first time window T8). Further, the computing device obtains the corresponding target accumulated feature value by summing the real-time feature values of each minute in 16 hours from 2022, 1, 8, 02:00 to 2022, 1, 8, 18:00.
In some optional examples, after obtaining the target accumulated feature value corresponding to the target request duration, the computing device may further send a service feedback message to the user terminal, where the service feedback message carries the target accumulated feature value. In this way, after receiving the service feedback message, the user terminal performs demapping processing on the service feedback message, and extracts the target accumulated feature value. The user terminal can perform service processing based on the target accumulated feature value. For example, the business analysis, such as risk analysis, business vulnerability analysis, etc., of the user is performed based on the target accumulated feature value, which is not limited in the present application.
In some examples, the service processing method provided by the application may also be described from the perspective of information interaction between the computing device and the user terminal. Fig. 7 is another schematic flow chart of a service processing method according to an embodiment of the present application. As shown in fig. 7, the service processing method at least includes the following steps:
701. the user terminal sends a service request aiming at the target service feature to the computing equipment, wherein the service request comprises a user identifier, a service feature identifier and a target request duration, and the service feature identifier is used for identifying the target service feature.
In this example, the target user wants to know the target request duration, and for the accumulated feature of the target service feature, the user identifier, the service feature identifier and the target request duration can be mapped into the service request through the user terminal, and then the service request is sent to the computing device through a wired network or a wireless network, etc.
702. The computing device reads a first storage list and a second storage list from the target cache based on the user identifier and the service feature identifier, wherein the first storage list comprises N first storage blocks, each first storage block is used for storing real-time feature values of one first time window of N continuous first time windows, the second storage list comprises M second storage blocks, each second storage block is used for storing accumulated feature values of one second time window of M continuous second time windows, the duration of the second time window is equal to that of the first time window, and N, M is a positive integer.
703. The computing device determines a first target memory block from the N first memory blocks and a second target memory block from the M second memory blocks based on the target request duration and the first duration, the first duration being a duration of any first time window.
704. The computing equipment obtains a target accumulated characteristic value corresponding to the target request duration based on the real-time characteristic value corresponding to the first time window stored in the first target storage block and the accumulated characteristic value corresponding to the second time window stored in the second target storage block.
It should be noted that the descriptions of the steps 702 to 704 may be understood with reference to the descriptions of the steps 302 to 304 in fig. 3, which are not repeated herein.
705. The computing device sends a service feedback message to the user terminal, wherein the service feedback message carries a target accumulated characteristic value.
706. And the user terminal performs service processing based on the target accumulated characteristic value.
In this example, after calculating the target accumulated feature value corresponding to the target request duration, the computing device may further send a service feedback message to the user terminal, where the service feedback message carries the target accumulated feature value. In this way, after receiving the service feedback message, the user terminal performs demapping processing on the service feedback message, and extracts the target accumulated feature value. The user terminal can perform service processing based on the target accumulated feature value. For example, the business analysis, such as risk analysis, business vulnerability analysis, etc., of the user is performed based on the target accumulated feature value, which is not limited in the present application.
It should be noted that, in the examples illustrated in fig. 2 to 7, only the first time window is taken as 1 day, and the second time window is taken as one day of the year as an example, and other values, such as a month, a week, etc., may be used in practical applications, which is not limited in this application.
In this embodiment, a feature storage structure (i.e., a first storage list and a second storage list) is newly built in the target cache, so that a first storage block and a first time window in the feature storage structure are associated, and a second storage block and a second time window are associated, so that real-time feature values and accumulated feature values under the same time span can be stored in different storage blocks. In this way, in the process of calculating the target accumulated characteristic value meeting the target request duration, all service detail data are not required to be read, and all service detail data are not required to be recalculated, but the real-time characteristic value and the accumulated characteristic value in the corresponding time window are directly read from different storage blocks of the target cache, so that the calculation processing of the target accumulated characteristic value can be completed, the calculation cost and the storage cost are saved, the accumulated characteristic value can be efficiently and timely calculated, and the service processing efficiency is improved.
In addition, historical service detail data is pre-aggregated in advance according to a specific first time window (such as every minute in a day) and a second time window (such as every day in a year), and the service detail data is reserved in a first storage list and a second storage list. In this way, the characteristic value calculation of different time windows with different time window sizes and different types can be realized in the same target storage, so that the development efficiency is improved in subsequent development and iteration.
The foregoing description of the solution provided in the embodiments of the present application has been mainly presented in terms of a method. It should be understood that, in order to implement the above-described functions, hardware structures and/or software modules corresponding to the respective functions are included. Those of skill in the art will readily appreciate that the various illustrative modules and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The embodiment of the application may divide the functional modules of the apparatus according to the above method example, for example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The integrated modules may be implemented in hardware or in software functional modules. It should be noted that, in the embodiment of the present application, the division of the modules is schematic, which is merely a logic function division, and other division manners may be implemented in actual implementation.
In the present embodiment, the term "module" or "unit" refers to a computer program or a part of a computer program having a predetermined function, and works together with other relevant parts to achieve a predetermined object, and may be implemented in whole or in part by using software, hardware (such as a processing circuit or a memory), or a combination thereof. Also, a processor (or multiple processors or memories) may be used to implement one or more modules or units. Furthermore, each module or unit may be part of an overall module or unit that incorporates the functionality of the module or unit.
The following describes the service processing device in the embodiment of the present application in detail, and fig. 8 is a schematic diagram of one embodiment of the service processing device provided in the embodiment of the present application. As shown in fig. 8, the service processing apparatus may include an acquisition unit 801 and a processing unit 802. Optionally, the service processing apparatus further comprises a sending unit 803.
The obtaining unit 801 is configured to receive a service request for a target service feature, where the service request includes a user identifier, a service feature identifier, and a target request duration, and the service feature identifier is used to identify the target service feature. It is specifically understood that the foregoing description of step 301 in fig. 3 is referred to, and details are not repeated herein.
The processing unit 802 is configured to read, from the target cache, a first storage list and a second storage list based on the user identifier and the service feature identifier, where the first storage list includes N first storage blocks, each first storage block is configured to store real-time feature values of one first time window of N consecutive first time windows, the second storage list includes M second storage blocks, each second storage block is configured to store cumulative feature values of one second time window of M consecutive second time windows, and a duration of the second time window is equal to a duration of the first time window, and N, M is a positive integer. It is specifically understood that the foregoing description of step 302 in fig. 3 is referred to, and details are not repeated herein.
The processing unit 802 is configured to determine a first target memory block from N first memory blocks and determine a second target memory block from M second memory blocks based on the target request duration and a first duration, where the first duration is a duration of any first time window. It is specifically understood that the foregoing description of step 303 in fig. 3 is omitted here.
The processing unit 802 is configured to obtain a target accumulated feature value corresponding to the target request duration, where the target accumulated feature value is used to indicate to perform service processing, based on the real-time feature value of the corresponding first time window stored in the first target storage block and the accumulated feature value of the corresponding second time window stored in the second target storage block. It is specifically understood that the foregoing description of step 304 in fig. 3 is referred to, and details are not repeated herein.
In some alternative embodiments, processing unit 802 is configured to: when the first time length is smaller than the target request time length, determining a first storage block corresponding to a first sub-window to which the current time belongs and a first storage block corresponding to a second sub-window as the first target storage block based on the target request time length, wherein the first sub-window is a first time window with the smallest time difference between the N continuous first time windows and the current time, and the second sub-window is a first time window with the largest time difference between the N continuous first time windows and the current time; when the first time length is smaller than the target request time length, determining second storage blocks corresponding to the first P-1 second time windows at the current time as second target storage blocks based on the target request time length, wherein the second time length is smaller than the sum of the time lengths of the first P second time windows and is larger than or equal to the sum of the time lengths of the first P-1 second time windows, the second time length is the difference between the target request time length and the first time length, and P is a positive integer larger than or equal to 1.
In other alternative embodiments, processing unit 802 is configured to: extracting real-time characteristic values of the first sub-window from a first storage block corresponding to the first sub-window, and aggregating the real-time characteristic values of the first sub-window to obtain a first accumulated characteristic value; extracting real-time characteristic values meeting the target duration from a first storage block corresponding to the second sub-window, and aggregating the real-time characteristic values meeting the target duration to obtain a second accumulated characteristic value, wherein the sum of the target duration and the current time is equal to the duration of the first time window; extracting accumulated characteristic values corresponding to the second time windows from second storage blocks corresponding to the previous P-1 second time windows respectively, and aggregating the accumulated characteristic values of the previous P-1 second time windows to obtain third accumulated characteristic values; and summing the first accumulated characteristic value, the second accumulated characteristic value and the third accumulated characteristic value to obtain a target accumulated characteristic value corresponding to the target request duration.
In other alternative embodiments, processing unit 802 is configured to: when the first time length is greater than or equal to the target request time length, determining a first storage block corresponding to a third sub-window to which the current time belongs as a first target storage block, wherein the third sub-window is a first time window with the smallest time difference between the N continuous first time windows and the current time; and extracting and aggregating real-time characteristic values corresponding to the target request duration from the first storage block corresponding to the third sub-window to obtain a target accumulated characteristic value corresponding to the target request duration.
In other optional embodiments, the sending unit 803 is configured to send a service feedback message to the user terminal after obtaining the target accumulated feature value corresponding to the target request duration, where the service feedback message carries the target accumulated feature value.
In other alternative embodiments, the obtaining unit 801 is further configured to: before a first storage list and a second storage list are read from a target cache based on a user identifier and a service characteristic identifier, first window information, second window information and sliding step length information are acquired, wherein the first window information is used for indicating the window condition of a first time window, the second window information is used for indicating the window condition of a second time window, and the sliding step length information is used for indicating the window interval condition of each first time window or the window interval condition of each second time window. A processing unit 802, configured to: constructing a first storage list in the target cache based on the first window information and the sliding step length information; and constructing a second storage list in the target cache based on the second window information and the sliding step size information.
In other alternative embodiments, the obtaining unit 801 is further configured to: and acquiring service detail data aiming at the target service characteristics after constructing a first storage list in the target cache based on the first window information and the sliding step length information. A processing unit 802, configured to: calculating a real-time characteristic value aiming at the target service characteristic in a preset duration based on the service detail data; determining a first time window corresponding to the preset time length, and determining a third target storage block from the first storage list based on the first time window corresponding to the preset time length, wherein the third target storage block is a first storage block corresponding to the first time window corresponding to the preset time length; and writing the real-time characteristic value of the preset time length into a third target storage block.
In other alternative embodiments, the processing unit 802 is further configured to: after a second storage list is built in the target cache based on the second window information and the sliding step length information, determining a second time window corresponding to the preset time length, and determining a fourth target storage block from the second storage list based on the second time window corresponding to the preset time length, wherein the fourth target storage block is a second storage block corresponding to the second time window corresponding to the preset time length; the method comprises the steps that a real-time characteristic value of a preset time length and a current accumulated characteristic value in a fourth target storage block are subjected to aggregation treatment to obtain a fourth accumulated characteristic value, wherein the current accumulated characteristic value in the fourth target storage block is obtained by accumulation based on the real-time characteristic values of other preset time lengths before the preset time length; and writing the fourth accumulated characteristic value into a fourth target storage block.
In other alternative embodiments, the obtaining unit 801 is configured to: acquiring service data, and aggregating the service data based on the user identification to obtain target service data aiming at the user identification; based on the service feature identification, service detail data aiming at the target service feature is obtained from the target service data.
The service processing device in the embodiment of the present application is described above from the point of view of the modularized functional entity, and the service processing device in the embodiment of the present application is described below from the point of view of hardware processing. Fig. 9 is a schematic hardware structure of a service processing device according to an embodiment of the present application. The service processing device may vary considerably in configuration or performance, including but not limited to the service processing apparatus shown in fig. 8.
As shown in fig. 9, the business processing device 300 may vary considerably in configuration or performance and may include one or more central processing units (central processing units, CPU) 322 (e.g., one or more processors) and memory 332, one or more storage media 330 (e.g., one or more mass storage devices) storing applications 342 or data 344. Wherein the memory 332 and the storage medium 330 may be transitory or persistent. The program stored in the storage medium 330 may include one or more modules (not shown), each of which may include a series of instruction operations in the service processing apparatus. Still further, central processor 322 may be configured to communicate with storage medium 330 to execute a series of instruction operations in storage medium 330 on business process device 300. Illustratively, the central processor 322 is configured to execute computer-executable instructions stored in the storage medium 330, thereby implementing the service processing method provided in the above-described embodiments of the present application.
The traffic processing device 300 may also include one or more power supplies 326, one or more wired or wireless network interfaces 350, one or more input/output interfaces 358, and/or one or more operating systems 341, such as Windows ServerTM, mac OS XTM, unixTM, linuxTM, freeBSDTM, etc.
Illustratively, the central processor 322 in fig. 9 may cause the service processing device to perform the method in the method embodiment as corresponding to fig. 3 to 7 by invoking computer-executable instructions stored in the memory 332.
In particular, the functions/implementations of the processing unit 802 in fig. 8 may be implemented by the central processor 322 in fig. 9 invoking computer executable instructions stored in the memory 332. The functions/implementation procedures of the acquisition unit 801 and the transmission unit 803 in fig. 8 can be implemented through the input-output interface 358 in fig. 9.
The steps performed by the service processing device in the above-described embodiments may be based on the service processing device structure shown in fig. 9.
Also provided in embodiments of the present application is a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the methods described in the foregoing embodiments.
Embodiments of the present application also provide a computer program product comprising a computer program which, when executed by a processor, implements the steps of the methods described in the foregoing embodiments.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of elements is merely a logical functional division, and there may be additional divisions of actual implementation, e.g., multiple elements or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The computer program product includes one or more computer instructions. When the computer-executable instructions are loaded and executed on a computer, the processes or functions in accordance with embodiments of the present application are fully or partially produced. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). Computer readable storage media can be any available media that can be stored by a computer or data storage devices such as servers, data centers, etc. that contain an integration of one or more available media. Usable media may be magnetic media (e.g., floppy disks, hard disks, magnetic tape), optical media (e.g., DVD), or semiconductor media (e.g., SSD)), or the like.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting thereof; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the corresponding technical solutions.

Claims (13)

1. A method for processing a service, comprising:
receiving a service request aiming at a target service feature, wherein the service request comprises a user identifier, a service feature identifier and a target request duration, and the service feature identifier is used for identifying the target service feature;
based on the user identifier and the service feature identifier, a first storage list and a second storage list are read from a target cache, wherein the first storage list comprises N first storage blocks, each first storage block is used for storing real-time feature values of one first time window of N continuous first time windows, the second storage list comprises M second storage blocks, each second storage block is used for storing accumulated feature values of one second time window of M continuous second time windows, the duration of the second time window is equal to that of the first time window, and N, M is a positive integer;
Determining a first target storage block from the N first storage blocks and a second target storage block from the M second storage blocks based on the target request duration and a first duration, wherein the first duration is the duration of any first time window;
based on the real-time characteristic value corresponding to the first time window stored in the first target storage block and the accumulated characteristic value corresponding to the second time window stored in the second target storage block, obtaining a target accumulated characteristic value corresponding to the target request duration, wherein the target accumulated characteristic value is used for indicating to perform service processing;
determining a first target memory block from the N first memory blocks and a second target memory block from the M second memory blocks based on the target request duration and the first duration, comprising:
when the first time length is smaller than the target request time length, determining a first storage block corresponding to a first sub-window to which the current time belongs and a first storage block corresponding to a second sub-window as a first target storage block based on the target request time length, wherein the first sub-window is a first time window with the smallest time difference between the N continuous first time windows and the current time, and the second sub-window is a first time window with the largest time difference between the N continuous first time windows and the current time;
When the first time length is smaller than the target request time length, determining second storage blocks corresponding to first P-1 second time windows positioned at the current time as second target storage blocks based on the target request time length, wherein the second time length is smaller than the sum of the time lengths of the first P second time windows and is larger than or equal to the sum of the time lengths of the first P-1 second time windows, the second time length is the difference between the target request time length and the first time length, and P is a positive integer larger than or equal to 1;
or when the first time length is greater than or equal to the target request time length, determining a first storage block corresponding to a third sub-window to which the current time belongs as a first target storage block, wherein the third sub-window is a first time window with the smallest time difference between the N continuous first time windows and the current time.
2. The method of claim 1, wherein obtaining the target accumulated feature value corresponding to the target request duration based on the accumulated feature value corresponding to the first time window real-time feature value stored by the first target storage block and the accumulated feature value corresponding to the second time window stored by the second target storage block, comprises:
Extracting real-time characteristic values of the first sub-window from a first storage block corresponding to the first sub-window, and aggregating the real-time characteristic values of the first sub-window to obtain a first accumulated characteristic value;
extracting real-time characteristic values meeting target time length from a first storage block corresponding to the second sub-window, and aggregating the real-time characteristic values meeting the target time length to obtain a second accumulated characteristic value, wherein the sum of the target time length and the current time is equal to the time length of the first time window;
extracting accumulated characteristic values corresponding to the second time windows from second storage blocks corresponding to the first P-1 second time windows respectively, and aggregating the accumulated characteristic values of the first P-1 second time windows to obtain third accumulated characteristic values;
and summing the first accumulated characteristic value, the second accumulated characteristic value and the third accumulated characteristic value to obtain a target accumulated characteristic value corresponding to the target request duration.
3. The method of claim 1, wherein obtaining the target accumulated feature value corresponding to the target request duration based on the real-time feature value corresponding to the first time window stored in the first target storage block and the accumulated feature value corresponding to the second time window stored in the second target storage block, comprises:
And extracting and aggregating real-time characteristic values corresponding to the target request duration from the first storage block corresponding to the third sub-window to obtain a target accumulated characteristic value corresponding to the target request duration.
4. A method according to any one of claims 1 to 3, wherein after obtaining the target accumulated feature value corresponding to the target request duration, the method further comprises:
and sending a service feedback message to the user terminal, wherein the service feedback message carries the target accumulated characteristic value.
5. A method according to any one of claims 1 to 3, wherein before reading the first and second stored lists from the target cache based on the user identification and the service characteristic identification, the method further comprises:
acquiring first window information, second window information and sliding step length information, wherein the first window information is used for indicating the window condition of the first time window, the second window information is used for indicating the window condition of the second time window, and the sliding step length information is used for indicating the window interval condition of each first time window or indicating the window interval condition of each second time window;
Constructing the first storage list in the target cache based on the first window information and the sliding step information;
and constructing the second storage list in the target cache based on the second window information and the sliding step size information.
6. The method of claim 5, wherein after constructing the first stored list in the target cache based on the first window information and the sliding step size information, the method further comprises:
acquiring service detail data aiming at the target service characteristics;
calculating a real-time characteristic value aiming at the target service characteristic in a preset time based on the service detail data;
determining a first time window corresponding to the preset duration, and determining a third target storage block from the first storage list based on the first time window corresponding to the preset duration, wherein the third target storage block is a first storage block corresponding to the first time window corresponding to the preset duration;
and writing the real-time characteristic value of the preset duration into the third target storage block.
7. The method of claim 6, wherein after constructing the second stored list in the target cache based on the second window information and the sliding step size information, the method further comprises:
Determining a second time window corresponding to the preset duration, and determining a fourth target storage block from the second storage list based on the second time window corresponding to the preset duration, wherein the fourth target storage block is a second storage block corresponding to the second time window corresponding to the preset duration;
the real-time characteristic value of the preset duration and the current accumulated characteristic value in the fourth target storage block are subjected to aggregation treatment to obtain a fourth accumulated characteristic value, wherein the current accumulated characteristic value in the fourth target storage block is obtained by accumulation based on the real-time characteristic values of other preset durations before the preset duration;
and writing the fourth accumulated characteristic value into the fourth target storage block.
8. The method according to any of claims 6 to 7, wherein obtaining service detail data for the target service feature comprises:
acquiring service data, and aggregating the service data based on the user identifier to obtain target service data aiming at the user identifier;
and acquiring service detail data aiming at the target service characteristics from the target service data based on the service characteristic identification.
9. A service processing apparatus, comprising:
the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for receiving a service request aiming at a target service feature, the service request comprises a user identifier, a service feature identifier and a target request duration, and the service feature identifier is used for identifying the target service feature;
the processing unit is configured to read a first storage list and a second storage list from a target cache based on the user identifier and the service feature identifier, where the first storage list includes N first storage blocks, each first storage block is configured to store real-time feature values of one of N consecutive first time windows, the second storage list includes M second storage blocks, each second storage block is configured to store accumulated feature values of one of M consecutive second time windows, a duration of the second time window is equal to a duration of the first time window, and N, M is a positive integer;
the processing unit is configured to determine a first target storage block from the N first storage blocks and determine a second target storage block from the M second storage blocks based on the target request duration and a first duration, where the first duration is a duration of any of the first time windows;
The processing unit is configured to obtain a target accumulated feature value corresponding to the target request duration, where the target accumulated feature value is used to instruct service processing, based on a real-time feature value corresponding to the first time window stored in the first target storage block and an accumulated feature value corresponding to the second time window stored in the second target storage block;
a processing unit for:
when the first time length is smaller than the target request time length, determining a first storage block corresponding to a first sub-window to which the current time belongs and a first storage block corresponding to a second sub-window as a first target storage block based on the target request time length, wherein the first sub-window is a first time window with the smallest time difference between the N continuous first time windows and the current time, and the second sub-window is a first time window with the largest time difference between the N continuous first time windows and the current time;
when the first time length is smaller than the target request time length, determining second storage blocks corresponding to first P-1 second time windows positioned at the current time as second target storage blocks based on the target request time length, wherein the second time length is smaller than the sum of the time lengths of the first P second time windows and is larger than or equal to the sum of the time lengths of the first P-1 second time windows, the second time length is the difference between the target request time length and the first time length, and P is a positive integer larger than or equal to 1;
Or when the first time length is greater than or equal to the target request time length, determining a first storage block corresponding to a third sub-window to which the current time belongs as a first target storage block, wherein the third sub-window is a first time window with the smallest time difference between the N continuous first time windows and the current time.
10. The service processing device according to claim 9, wherein the processing unit is configured to:
extracting real-time characteristic values of the first sub-window from a first storage block corresponding to the first sub-window, and aggregating the real-time characteristic values of the first sub-window to obtain a first accumulated characteristic value;
extracting real-time characteristic values meeting target time length from a first storage block corresponding to the second sub-window, and aggregating the real-time characteristic values meeting the target time length to obtain a second accumulated characteristic value, wherein the sum of the target time length and the current time is equal to the time length of the first time window;
extracting accumulated characteristic values corresponding to the second time windows from second storage blocks corresponding to the first P-1 second time windows respectively, and aggregating the accumulated characteristic values of the first P-1 second time windows to obtain third accumulated characteristic values;
And summing the first accumulated characteristic value, the second accumulated characteristic value and the third accumulated characteristic value to obtain a target accumulated characteristic value corresponding to the target request duration.
11. A service processing apparatus, comprising: an input/output interface, a processor, and a memory, the memory having program instructions stored therein;
the processor is configured to execute program instructions stored in a memory to perform the method of any one of claims 1 to 8.
12. A computer readable storage medium comprising instructions which, when run on a computer device, cause the computer device to perform the method of any of claims 1 to 8.
13. A computer program product comprising instructions which, when run on a computer device, cause the computer device to perform the method of any of claims 1 to 8.
CN202410048388.6A 2024-01-12 2024-01-12 Service processing method, device, equipment, storage medium and program product Active CN117555905B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410048388.6A CN117555905B (en) 2024-01-12 2024-01-12 Service processing method, device, equipment, storage medium and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410048388.6A CN117555905B (en) 2024-01-12 2024-01-12 Service processing method, device, equipment, storage medium and program product

Publications (2)

Publication Number Publication Date
CN117555905A CN117555905A (en) 2024-02-13
CN117555905B true CN117555905B (en) 2024-04-02

Family

ID=89821948

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410048388.6A Active CN117555905B (en) 2024-01-12 2024-01-12 Service processing method, device, equipment, storage medium and program product

Country Status (1)

Country Link
CN (1) CN117555905B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017080169A1 (en) * 2015-11-13 2017-05-18 乐视控股(北京)有限公司 Video platform monitoring and analysis system
CN114116162A (en) * 2021-11-18 2022-03-01 支付宝(杭州)信息技术有限公司 Data processing method, system and non-transitory storage medium
CN115048595A (en) * 2022-07-20 2022-09-13 恒生电子股份有限公司 Data acquisition method, device, terminal and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017080169A1 (en) * 2015-11-13 2017-05-18 乐视控股(北京)有限公司 Video platform monitoring and analysis system
CN114116162A (en) * 2021-11-18 2022-03-01 支付宝(杭州)信息技术有限公司 Data processing method, system and non-transitory storage medium
CN115048595A (en) * 2022-07-20 2022-09-13 恒生电子股份有限公司 Data acquisition method, device, terminal and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
有线电视大数据分析平台数据存储与挖掘;刘海涛;;广播电视信息;20161215(12);第60-62页 *

Also Published As

Publication number Publication date
CN117555905A (en) 2024-02-13

Similar Documents

Publication Publication Date Title
CN110046929B (en) Fraudulent party identification method and device, readable storage medium and terminal equipment
US20190392441A1 (en) Customizing authorization request schedules with machine learning models
WO2021159766A1 (en) Data identification method and apparatus, and device, and readable storage medium
CN109685536B (en) Method and apparatus for outputting information
CN111367965B (en) Target object determining method, device, electronic equipment and storage medium
CN116383753B (en) Abnormal behavior prompting method, device, equipment and medium based on Internet of things
CN114205690A (en) Flow prediction method, flow prediction device, model training method, model training device, electronic equipment and storage medium
CN110991789B (en) Method and device for determining confidence interval, storage medium and electronic device
CN111340574B (en) Risk user identification method and device and electronic equipment
CN117555905B (en) Service processing method, device, equipment, storage medium and program product
CN112035676A (en) User operation behavior knowledge graph construction method and device
CN111832661A (en) Classification model construction method and device, computer equipment and readable storage medium
CN117036001A (en) Risk identification processing method, device and equipment for transaction service and storage medium
CN110557351B (en) Method and apparatus for generating information
CN113630476B (en) Communication method and communication device applied to computer cluster
CN113343577B (en) Parameter optimization method, device, equipment and medium based on machine learning
CN114723455A (en) Service processing method and device, electronic equipment and storage medium
CN113779335A (en) Information generation method and device, electronic equipment and computer readable medium
CN112214506A (en) Information acquisition method and device and storage medium
CN110784552A (en) Monitoring method, device, equipment and medium
CN110738571A (en) transaction risk control method and related device
CN112084422B (en) Account data intelligent processing method and device
CN112799929A (en) Root cause analysis method and system for alarm log
CN117319010A (en) Access method, device, equipment and medium applied to edge calculation
CN113762974A (en) Data processing method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant