Nearline Jobs
Overview
A nearline job provides the real-time computing function. It uses data stored in DIS as the data source and updates user profiles, item profiles, and recommendation candidate sets in real time. To use the nearline job, you need to transform formats of logs about tracing points in accordance with Realtime Logs and write the transformed logs into the DIS streams. For details, see Figure 1.
Types of the nearline strategy are as follows:
- Update User Profile Based on Behavior Data
- Search for Candidate Sets Based on Tags
- Update User Profile Based on User Data
- Update Item Profile Based on Item Data
Data such as the real-time behavior logs, real-time user logs, and real-time item logs, can be uploaded to DIS, as shown in Realtime Logs.
Realtime behavior logs are required by the Update User Profile Based on Behavior Data strategy and Search for Candidate Sets Based on Tags strategy.
Realtime user logs are required by the Update User Profile Based on User Data strategy.
Realtime item logs are required by the Update Item Profile Based on Item Data strategy.
Creating a Nearline Job
To create a nearline job, perform the following steps:
- Log in to the RES management console and click Nearline Jobs in the navigation tree on the left.
- Click Create. The Create Nearline Job page is displayed.
- Specify Name, Scenario, and Description.
- Name: Name of the nearline job to be created, which must start with Nearline- and consists of only letters, digits, hyphens (-), and underscores (_). The name must contain no more than 64 characters.
- Scenario: You can select a scenario created on the Global Configurations page.
- In the Compute Engine area, enter values for Service Name, Cluster Name, Configuration File Path, and Name.
- Click Add Nearline Strategy and select a proper strategy from the drop-down list box. Move your cursor to the question mark next to the strategy name to view the help information.
- (Optional) Select a strategy you want to delete and click Delete to delete it.
- After configuring all parameters, click OK. It may take a few seconds to run the job. Please wait.
You can switch to the nearline job list to view the basic information about nearline jobs. In the job list, the status of the newly created job is Computing. When the job status changes to Successful, the job execution is complete. If the status of a nearline job changes to Failed, click the job name. On the job details page that is displayed, view the job logs and troubleshoot the faults.
Update User Profile Based on Behavior Data
The Update User Profile Based on Behavior Data strategy can continuously update user profiles. The updating frequency is down to the second. Data stored in DIS functions as the source, which helps analyze the changing information of user profiles and updates those profiles as user behavior occurs.
Content of user profiles that can be updated includes dynamic information (user tags) and contextual information (user age, location, and contact information).
| Parameter | Description | Default Value |
|---|---|---|
| Strategy Alias | Name of the selected strategy, which consists of Chinese characters, letters, digits, underscores (_), spaces, or hyphens (-) and cannot start or end with a space. The name can contain no more than 60 characters. | Update User Profile Based on Behavior Data |
| Service Name | Name of the selected service. Currently, only DIS is supported. Add the Real-Time Behavior Log data to DIS where RES can read these data to perform nearline computing tasks. | DIS |
| Stream Name | Name of a data stream. Different streams need to be created for different types of data. | N/A |
| Start Location | Location where RES starts reading data stored in DIS. latest indicates that the latest data is read first. earliest indicates that the earliest data is read first. | latest |
| Behavior Type | Types of behaviors are:
| All behaviors selected |
| Window Interval (s) | Time interval for the running of nearline jobs, in seconds. For example, the value 10 indicates that the nearline strategy performs the computing tasks every 10 seconds, | 10s |
| Result Save Path | Path to access the samples constructed based on user and item profiles that already reside in behavior logs and CloudTable clusters. These samples are available for other functions. | N/A |
| Context Updating | Contextual information updating. The field context in User Operation Behavior Table indicates the contextual information of an occurred behavior. The contextual information stored in the CloudTable clusters can be updated in real time if Context Updating is enabled. | Disabled |
| Item Popularity Updating | Whether to calculate the popularity of an item according to behavior logs. In all nearline strategies, for example, the Search for Candidate Sets Based on Tags strategy, candidate sets is re-ranked in a specified mode. If you want to re-rank the candidate sets by popularity, Item Popularity Updating must be enabled. | Disabled |
| Historical Records Saving | Whether to collect users' historical records according to behavior logs. In all nearline strategies, for example, the Search for Candidate Sets Based on Tags strategy, if you want to filter out the historical records of users from the candidate sets, Historical Records Saving must be enabled. This function can be enabled only in the condition that historical records are saved before. | Disabled |
| Weight Attenuation Parameter | Attenuation parameter of the interest tag. A smaller value indicates a stronger attenuation capability. A larger value indicates a weaker attenuation capability. If the value is 0, no attenuation occurs. | 0.99 |
| Max. Length of Interest Tag | Maximum length of the interest tag among all tag systems. | 20 |
| Global Feature File | File needed before you use the nearline strategy. The global feature file contains all feature fields and data types of users and items in the offline data. Global Feature Files describes details of the global feature file. | N/A |
| Output Path of Dirty Data | Path where the input data that meets no job requirements resides | N/A |
| User Profile Storage | Data of User Profile Storage that comes from the user profiles updated by the Update User Profile Based on User Data strategy | N/A |
| Item Profile Storage | Data of Item Profile Storage that comes from the item profiles updated by the Update Item Profile Based on Item Data strategy | N/A |
| Filtering Information Storage | Table where the filtered items on which you have performed operations reside, for example, filter out items that you have viewed and store them in this table. | N/A |
Search for Candidate Sets Based on Tags
The Search for Candidate Sets Based on Tags strategy can continuously help you retrieve candidate sets. The retrieval frequency is down to the second. Data stored in DIS functions as the source and helps analyze user preferences based on the candidate sets are retrieved. Two retrieval modes are available:
- Interest tag
- Real-time tag
| Parameter | Description | Default Value |
|---|---|---|
| Strategy Alias | Name of the selected strategy, which consists of Chinese characters, letters, digits, underscores (_), spaces, or hyphens (-) and cannot start or end with a space. The name can contain no more than 60 characters. | Search for Candidate Sets Based on Tags |
| Data Source |
| Service Name: DIS Stream Name: N/A Start Location: latest |
| Behavior Type | Types of behaviors are:
| All behaviors selected |
| Window Interval (s) | Time interval for the running of nearline jobs, in seconds. For example, the value 10 indicates that the nearline strategy performs the computing tasks every 10 seconds, | 10 |
| Filter Historical Records | Whether to filter out historical records from the generated candidate sets. If yes, Filter Historical Records must be enabled. | Disabled |
| Ranking Rule for Candidate Sets | Ranking rule of the generated candidate sets, which includes:
| Hot |
| Maximum Length of Candidate Sets | Maximum length of the generated candidate sets. This value must be greater than that of the candidate sets updated by computing tasks. | 50 |
| Retrieval Rule for Candidate Sets | Retrieval rule for candidate sets.
| Interest tag |
| Number of Interest Tags | Number of interest tags in generated candidate sets. A smaller value indicates fewer types of candidate sets. NOTE: Select an appropriate quantity of interest tags at the highest weights to retrieve an item list that matches those tags. | 3 |
| Global Feature File | File needed before you use the nearline strategy. The global feature file contains all feature fields and data types of users and items in the offline data. Global Feature Files describes details of the global feature file. | N/A |
| Output Path of Dirty Data | Path where the input data that meets no job requirements resides | N/A |
| Custom Search | Replacement for the default search criteria. Custom Search allows you to search according to your custom criteria. NOTE: You can use this function only when different tag systems exist. In other cases, you are not advised to use it. | N/A |
| User Profile Storage | Platform for storing user profiles.
| N/A |
| Item Profile Storage | Platform for storing item profiles.
| N/A |
| Filtering Information Storage | Platform for storing the filtering sets.
| N/A |
| Candidate Set Storage | Platform for storing the candidate sets.
| N/A |
Update User Profile Based on User Data
The Update User Profile Based on User Data strategy can continuously update user profiles. The updating frequency is down to the second. Data stored in DIS functions as the source and helps capture user data nearline, which facilitates updating or adding data for user profiles to keep them in the latest state.
| Parameter | Description | Default Value |
|---|---|---|
| Strategy Alias | Name of the selected strategy, which consists of Chinese characters, letters, digits, underscores (_), spaces, or hyphens (-) and cannot start or end with a space. The name can contain no more than 60 characters. | Update User Profile Based on User Data |
| Data Source |
| Service Name: DIS Stream Name: N/A Start Location: latest |
| Window Interval (s) | Time interval for the running of nearline jobs, in seconds. For example, the value 10 indicates that the nearline strategy performs the computing tasks every 10 seconds, | 10s |
| Global Feature File | File needed before you use the nearline strategy. The global feature file contains all feature fields and data types of users and items in the offline data. Global Feature Files describes details of the global feature file. | N/A |
| Output Path of Dirty Data | Path where the input data that meets no job requirements resides | N/A |
| User Profile Storage | Platform for storing user profiles.
| N/A |
Update Item Profile Based on Item Data
The Update Item Profile Based on Item Data strategy can continuously update item profiles. The updating frequency is down to the second. Data stored in DIS functions as the source and continuously updates or adds data for item profiles to keep them in the latest state.
| Parameter | Description | Default Value |
|---|---|---|
| Strategy Alias | Name of the selected strategy, which consists of Chinese characters, letters, digits, underscores (_), spaces, or hyphens (-) and cannot start or end with a space. The name can contain no more than 60 characters. | Update Item Profile Based on Item Data |
| Data Source |
| Service Name: DIS Stream Name: N/A Start Location: latest |
| Window Interval (s) | Time interval for the running of nearline jobs, in seconds. For example, the value 10 indicates that the nearline strategy performs the computing tasks every 10 seconds, | 10s |
| Global Feature File | File needed before you use the nearline strategy. The global feature file contains all feature fields and data types of users and items in the offline data. Global Feature Files describes details of the global feature file. | N/A |
| Output Path of Dirty Data | Path where the input data that meets no job requirements resides | N/A |
| Update Candidate Set | Whether to update the candidate set to keep it up to date.
| false |
| Item Profile Storage | Platform for storing item profiles.
| N/A |
Last Article: Deleting an Offline Job
Next Article: Online Services

Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.