Help Center> RES> User Guide> User Guide (Old)> Online Services> Creating an Online Service

Creating an Online Service

An online service defines how analysis results are applied. In general, it is an inference service provided by RES after an application is deployed online and offers APIs for external systems. RES has three online services, which are recommendation engine, text segmentation, and ranking.

  • Recommendation engine

    The recommendation engine is configured to perform convergence, filtering, and ranking on a candidate set obtained by executing the RES retrieval strategy.

  • Text tag

    The text tag provides natural language processing tools for you to extract keywords and identify named entities.

  • Ranking

    The ranking service allows you to adopt the RES ranking strategy to optimize the ranking sequence of their own candidate sets.

Prerequisites

  • An offline job has been calculated successfully and the UUID of the candidate set has been generated.
  • You can deploy a maximum of 10 online services. Each online service can create two online process flows. To increase the quota, submit a service ticket.
  • Ensure that the account is not in arrears. Resources are consumed when services are running.
  • If your account is in arrears, your account will be frozen and services will be stopped. You cannot invoke, start, or edit services.

Procedure

  1. Log in to the RES management console and click Online Services in the navigation tree on the left.
  2. Click Create. On the Create Online Service page that is displayed, set related parameters.
    1. Enter basic information and select a service type. Specify Name, Scenario, and Description according to actual requirements. For parameter Scenario, you can select a scenario created on the Global Configurations page.
      Figure 1 Basic Information area
    2. Select a service type based on business requirements. Currently, recommendation engine, ranking, and text tag are available.
    3. Click Add Online Flow to add an online process flow and name it. You can deploy a maximum of five online process flows. Configure the online process flow based on the selected service type, including convergence, filtering, ranking, and model configuration. For more details, see Table 1. Recommendation engine is highly recommended for you.
      Figure 2 Creating an online service
      Table 1 Parameters

      Parameter

      Sub-Parameter

      Description

      Convergence

      Recommendation Result Setting

      Add Recommendation Candidate Set (Select candidate sets generated by offline or nearline jobs for ranking.)

      • Alias and UUID: Click Select in the Operation column to select a task name and UUID for adding an offline or nearline job.
      • Priority: The recommendation results with a higher priority are displayed before the recommendation results with a lower priority.
      • Proportion of Data with the Same Priority: For the recommendation candidate sets with the same priority, the percentage indicates the number of recommended items. The sum of the percentages of the recommended items with the same priority must be equal to 100%.

      Add Online Candidate Set (Retrieve candidate sets online based on the configured parameters. Parameters can be configured only after a global feature file is added.)

      • Alias and UUID: Online candidate set and online-recall are used respectively. No modification is required.
      • Priority and Proportion of Data with the Same Priority: The settings are the same as those set for Add Recommendation Candidate Set.
      • Set: Click Set in the Operation column to set retrieval strategy parameters. Set Retrieval Type to Item or User based on the business requirements and configure the online retrieval feature. The feature attributes of online retrieval come from the global feature file configured in the Common Configurations area.

      Click Add Recommendation Candidate Set or Add Online Candidate Set to configure multiple candidate sets as the ranking target of the current online process.

      NOTE:

      The delay of the online candidate set is longer than that of the recommendation candidate set. If there is no special requirement, the recommendation candidate set is recommended.

      Fault Tolerance

      Fault tolerance is used for candidate sets outputted by the Business Rule-Manual Import strategy when data requests are abnormal. You need to create a Business Rule-Manual Import strategy. Click Select to obtain the job aliases and UUIDs generated by the Business Rule-Manual Import strategy.

      Offline Filtering

      Filtering

      Candidate set generated by the filter rules. Click Select to choose the job aliases and UUIDs generated by filter rules.

      Online Filtering

      [Deduplication] Item Attribute

      Attribute name that comes from item profiles. For example, product_color indicates that deduplication is performed on products of the same color.

      [Deduplication] Ignored Length

      Deduplication that is performed on the items after truncating the item IDs. For example, if the specified number of characters to be truncated is 2, either SKU_A1234 or SKU_A1244 is retained.

      Attribute Filtering Rule

      Filtering rule of custom user and item attributes, which is used to filter the recommendation results for end-users. For example, remove the items containing sensitive information from the candidate sets for users in tier-1 cities. Click to add an attribute filter rule.

      Ranking By

      Click Through Rate

      • Feature Engineering: Data required here is the candidate sets generated by the ranking strategies. Click Select to choose the required job aliases and UUIDs.
      • Model File Path: Path for storing the model generated by the ranking strategy.

      Attribute Weight

      Attribute Weight: Enter a value for Attribute and set Weight to 1.0. You can also click Add Attribute Weight as needed.

      Common Configurations

      Global Feature File

      File in JSON format. It contains the feature information of user and item attributes that are duplicated. For example, feature_name, feature_type, and feature_value_type indicate the attribute name, attribute type, and attribute value type. Data must be stored on OBS in advance.

      Profile Selection

      Profile is generated by the Initial User Profile-Item Profile-Standard Wide Table Generation operator in Feature Engineering. It is applied in deduplication filtering, attribute filtering, and ranking jobs. Click Select to choose the UUID generated by the feature engineering job.

      Model Configuration

      N/A

      Set Model Name, Model Version, Compute Node Specifications, Compute Nodes, and Traffic Splitting (%).

      Model Name and Model Version refer to the name and the version of the model used to call APIs. By default, Compute Node Specifications is set to 2core|8GB, Compute Nodes is set to 2, and the sum of Traffic Splitting (%) must equal to 100%.

      NOTE:

      Multiple online process flows must have the same model but different model versions.

  3. After entering all parameter values, click Next to go to a page where you can check all information. If there is no need of change, click Create Now to create an online service. If the status of an online service changes from Initializing or Deploying to Running in the service list, the online service is deployed. Generally, it may take several minutes or tens of minutes to run an online service. The duration depends on the amount of your selected data and resources. Please wait.