Help Center> RES> API Reference> API> Online Service> Creating an Online Service

Creating an Online Service

Function

This API is used to create online service metadata. After the metadata is created, you can manually publish the service.

URI

POST /v2.0/{project_id}/workspaces/{workspace_id}/resources/{resource_id}/service-instance

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details on how to obtain the project ID, see Obtaining a Project ID.

resource_id

Yes

String

Resource ID (data source ID or scenario ID)

workspace_id

Yes

String

Workspace ID

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

Content type. The value is application/json.

X-Auth-Token

Yes

String

User token. For details on how to obtain the user token, see Obtaining a User Token Through Password Authentication.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

job_name

Yes

String

Job name, which is a string of 1 to 64 characters and contains letters, digits, underscores (_), and hyphens (-)

Minimum: 1

Maximum: 64

description

No

String

Description

category

Yes

String

Category. The option is:

  • SERVICE indicates the online service.

job_type

Yes

String

Job type. The option is:

  • infer indicates the inference service.

job_config

Yes

jobConfig object

Job settings

topicUrn

No

String

Notification message settings

Table 4 jobConfig

Parameter

Mandatory

Type

Description

nearline_recall_param

No

NearLineRecallParam object

Parameters of a nearline retrieval job (required for nearline retrieval jobs)

max_recommended_num

No

Integer

Max. number of candidate sets (required for retrieval jobs)

Minimum: 1

Maximum: 200

match_feature_pairs

No

Array of MatchFeaturePair objects

Matched feature pair (required for feature matching-based retrieval jobs)

striping

No

Striping object

Row-based strategy (required for feature matching-based retrieval job, itemCF retrieval job, and userCF retrieval job)

match_type

No

String

Matching type (required for feature matching-based retrieval jobs). The options are:

  • UI: recommending items based on users

  • UU: recommending users based on users

  • II: recommending items based on items

  • IU: recommending users based on items

matrix_factorization

No

MatrixFactorization object

Matrix decomposition parameter settings (required for the ALS-based MF jobs)

behavior_frequencys

No

Array of BehaviorFrequency objects

Behavior frequency information (required for historical behavior-based candidate set generation jobs)

file_path

No

String

File path (required for business rule - manual import retrieval jobs)

ucb_param

No

UcbParam object

UCB job parameter (required for UCB-based retrieval jobs)

behavior_gravity

No

BehaviorGravity object

Gravity decay factor (required for the comprehensive behavior popularity-based retrieval jobs)

category

No

Category object

Type (required for the comprehensive behavior popularity-based retrieval jobs)

behavior_logic

No

String

Behavior filter logic (required for historical behavior filter jobs). The options are:

  • AND: If both conditions are met, the data is filtered.

  • OR: If one condition is met, the data is filtered.

features_engineering

No

EtlBasicParameter object

Feature parameter (required for offline feature engineering jobs)

sample_param

No

SampleParam object

Sample parameter (required for offline feature engineering jobs)

deep_learning_parameters

No

DeepLearingParam object

General parameters of a ranking job (required by LR, DeepFM, and AutoGroup)

algorithm_specify_parameters

No

AlgorithmSpecifyParameters object

Specific parameter of a ranking algorithm (required for LR, DeepFM, and AutoGroup)

load_widetable

No

Boolean

Importing a wide table (required for offline data import jobs)

load_profile

No

Boolean

Importing a profile (required for offline data import jobs)

save_mode

No

String

Retaining a wide table (required for offline data import jobs). The options are:

  • append: Yes

  • new: No -Overwrite: Overwrite

indicators

No

Array of Indicator objects

Statistical indicator (required for effect evaluation jobs)

offline_rank_job_name

No

String

Name of an offline ranking job (required for online training jobs)

update_interval

No

Integer

Update interval (required for online training jobs)

optimizer

No

Optimizer object

Optimizer (required for online training jobs)

flows

No

Flow object

Online process flow (required for online training jobs)

Table 5 NearLineRecallParam

Parameter

Mandatory

Type

Description

time_limit

No

Boolean

Time filter

timeFeature

No

String

Time feature

retainDays

No

Integer

Retention period (days)

recall_fileds

No

Array of RecallFiled objects

Retrieved field

itemCF_job_name

No

String

Name of an itemCF job

Table 6 RecallFiled

Parameter

Mandatory

Type

Description

name

No

String

Field name

value

No

Integer

Number of used field values

Minimum: 1

Maximum: 10

Default: 1

Table 7 MatchFeaturePair

Parameter

Mandatory

Type

Description

user_feature_name

No

String

User feature

item_feature_name

No

String

Item feature

weight

No

Double

Weight

match_count

No

Boolean

Measurement of the number of matched tags

Table 8 Striping

Parameter

Mandatory

Type

Description

nearest_neighborhood

Yes

Integer

Nearest neighbors

band

Yes

Integer

Similarity degree

Minimum: 1

Maximum: 20

row

Yes

Integer

Similarity distance

Minimum: 1

Maximum: 10

Table 9 MatrixFactorization

Parameter

Mandatory

Type

Description

implicit_vector_rank

Yes

Integer

Embedding size

Minimum: 1

Maximum: 100

regular_param

Yes

Double

Optimization lambda

Minimum: 1.0E-8

Maximum: 1

max_iterator_num

Yes

Integer

Number of iterations

Minimum: 1

Maximum: 50

Table 10 BehaviorFrequency

Parameter

Mandatory

Type

Description

behavior_type

Yes

String

Behavior type. The options are:

  • view indicates that you browsed an item.

  • click indicates that you clicked an item.

  • collect indicates that you added an item to favorites.

  • uncollect indicates that you removed an item from favorites.

  • search_click indicates that you searched and clicked an item.

  • comment indicates that you made comments on an item.

  • share indicates that you shared an item with others.

  • like indicates that you gave an item a thumb-up.

  • dislike indicates that you gave an item a thumb-down.

  • grade indicates that you rated an item.

  • consume indicates that you bought an item (primarily refers to goods).

  • use indicates that you watched videos/listened to music/read books.

  • download indicates that you downloaded something. -tip indicates that you gave somebody or something a reward.

  • subscribe indicates that you followed somebody or something.

lower_limit

No

Integer

Min. times

Minimum: 1

upper_limit

No

Integer

Max. times

Minimum: 1

time_interval

Yes

Integer

Time range

Minimum: 1

Table 11 UcbParam

Parameter

Mandatory

Type

Description

alpha

Yes

Double

Tradeoff parameter

Minimum: 0

Maximum: 1

min_used_num

Yes

Integer

Min. number of behaviors

Minimum: 30

Maximum: 1000

Table 12 BehaviorGravity

Parameter

Mandatory

Type

Description

weaken_factor

No

Double

Decay factor

Minimum: 0.1

Maximum: 5

view_type

No

String

Behavior quantity counting mode. The options are:

  • pv: page views or clicks, measuring the number of web pages visited by website users.

  • uv: unique visitors, counting the number of individual users accessing a site within the reporting period.

algo_type

No

String

Algorithm type. The options are:

  • normal

  • time

Table 13 Category

Parameter

Mandatory

Type

Description

user_meta_list

No

Array of strings

User feature

item_meta_list

No

Array of strings

Item feature

Table 14 EtlBasicParameter

Parameter

Mandatory

Type

Description

user_features

No

Array of FeatureTransformation objects

User feature

item_features

No

Array of FeatureTransformation objects

Item feature

rank_etl_filter

No

RankETLFilter object

Filter parameter

Table 15 FeatureTransformation

Parameter

Mandatory

Type

Description

attr

No

Attribute object

Feature

discrete_method

No

String

Discrete method. The options are:

  • equal_distance_discrete indicates equal-distance discretization.

  • user_define_discrete indicates custom discrete distance. -normalize indicates normalization.

  • null indicates non-discretization.

params

No

Object

Specific processing parameter

Table 16 Attribute

Parameter

Mandatory

Type

Description

name

Yes

String

Name

data_type

No

String

Data type

other_uses

No

Array of strings

Other usage

Table 17 RankETLFilter

Parameter

Mandatory

Type

Description

filter_type

Yes

String

Behavior deduplication mode. The options are:

  • abs_weight indicates the absolute weight value.

  • date indicates the date.

time_type

Yes

String

Time type. The options are: Day Week Month

is_monday_first

No

Boolean

Whether Monday is the first day

Table 18 SampleParam

Parameter

Mandatory

Type

Description

divide_type

Yes

String

Division mode of training and test sets. The options are:

  • TIME indicates the time ratio.

  • RAMDOM indicates the number ratio.

train_rate

No

Double

Training data ratio

Minimum: 0.01

Maximum: 1

test_rate

No

Double

Test data ratio

Minimum: 0.01

Maximum: 1

Table 19 DeepLearingParam

Parameter

Mandatory

Type

Description

initial_parameters

No

Initial object

Initialization parameter

optimize_parameters

No

Optimizer object

Optimization parameter

regular_parameters

No

Regular object

Lambda parameter

max_iterations

No

Integer

Max. iterations

Minimum: 1

Maximum: 1000

early_stop_iterations

No

Integer

Iterations at early stopping

Minimum: 1

Maximum: 1000

batch_size

No

Integer

Batch size

Minimum: 1

dataset_split_parts

No

Integer

Number of training datasets to be split

Minimum: 1

Maximum: 10

restart_train

No

Boolean

Retraining

Table 20 Initial

Parameter

Mandatory

Type

Description

initial_method

Yes

String

Initialization method

Enumeration values:

  • normal

  • uniform

  • xavier

mean_value

No

Double

Mean

Minimum: -1

Maximum: 1

standard_deviation

No

Double

Standard deviation

Minimum: 0

Maximum: 1

min_value

No

Double

Min. value

Minimum: -1

Maximum: 0

max_value

No

Double

Max. value

Minimum: 0

Maximum: 1

Table 21 Regular

Parameter

Mandatory

Type

Description

l2_regularization

No

Double

Lambda 2

Minimum: 0

Maximum: 1

regular_loss_compute_mode

No

String

Regular loss calculation mode

Enumeration values:

  • full

  • batch

embed_l2_regularization

No

Double

Lambda 2 of embedding size

Minimum: 0

Maximum: 1

wide_l2_regularization

No

Double

Lambda 2 of the wide part

Minimum: 0

Maximum: 1

structure_l2_regularization

No

Double

Lambda 2 of the structured part

Minimum: 0

Maximum: 1

Table 22 AlgorithmSpecifyParameters

Parameter

Mandatory

Type

Description

latent_vector_length

No

Integer

Embedding size (required for DeepFM)

Minimum: 1

Maximum: 100

architecture

No

Array of integers

Neural network structure (required for DeepFM)

active_function

No

String

Activation function (required for DeepFM and AutoGroup)

Enumeration values:

  • relu

  • sigmoid

  • tanh

value_keep_probability

No

Double

Neuron retention probability (required for DeepFM and AutoGroup)

Minimum: 0

Maximum: 1

embed_size

No

Array of integers

Embedding size of each degree (required for AutoGroup)

mlp_architecture

No

Array of integers

Neural network structure (required for AutoGroup)

max_order

No

Integer

Max. interactions (required for AutoGroup)

hash_sizes

No

Array of integers

Hash length (required for AutoGroup)

hash_compensation

No

Array of numbers

Feature interaction penalty coefficient (required for AutoGroup)

use_wide_part

No

Boolean

Wide part required (required for AutoGroup)

structure_optimizer

No

Optimizer object

Optimizer parameter (required for AutoGroup)

merge_multi_hot

No

Boolean

Merge multi-value feature (required for AutoGroup)

fix_structure

No

Boolean

Fix hash structure (required for AutoGroup)

Table 23 Indicator

Parameter

Mandatory

Type

Description

indicator_name

No

String

Indicator. The options are: PV UV Custom

indicator_params

No

IndicatorParam object

Indicator parameter (required for custom metric)

Table 24 IndicatorParam

Parameter

Mandatory

Type

Description

customize_parameter

No

CustomizeParameter object

Custom parameter

customize_formula

No

CustomizeFormula object

Custom formula

Table 25 CustomizeParameter

Parameter

Mandatory

Type

Description

alias

Yes

String

Alias

behavior_type

Yes

String

Behavior type

threshold

No

Double

Threshold

Minimum: 0

Maximum: 1

deduplication

Yes

String

Deduplication

Table 26 CustomizeFormula

Parameter

Mandatory

Type

Description

alias

No

String

Alias

formula

No

String

Formula

Table 27 Optimizer

Parameter

Mandatory

Type

Description

type

No

String

Optimizer type

Enumeration values:

  • adam

  • adagrad

  • ftrl

learning_rate

No

Integer

Learning rate

Minimum: 0

Maximum: 1

initial_accumulator_value

No

Double

Initial gradient sum

Minimum: 0

Maximum: 1

lambda1

No

Double

Lambda 1

Minimum: 0

Maximum: 1

lambda2

No

Double

Lambda 2

Minimum: 0

Maximum: 1

epsilon

No

Double

Epsilon

Minimum: 0

Maximum: 1

decay_rate

No

Double

Decay factor

Minimum: 0

Maximum: 1

decay_steps

No

Double

Decay step

Minimum: 1

Table 28 Flow

Parameter

Mandatory

Type

Description

flow_id

Yes

String

Process flow ID

attr_pair_rules_filter

No

Array of AttrPairRules objects

Feature pair filter

attr_pair_rules_reserve

No

Array of AttrPairRules objects

Feature pair to be reserved

deduplication_list

No

Array of Deduplication objects

Feature deduplication

attribute_info

No

AttributeInfo object

Comprehensive ranking information

bloom_filter_conf

No

BloomFilterConf object

Bloom filter settings

group_attr

No

String

The scatter attribute for grouping

pre_deal

No

Boolean

Deduplication before ranking

rank_setting

No

String

Ranking configuration information

rules

No

Rule object

Candidate set merging

filter_sets

No

Array of strings

Filter configuration information

attr_value_rules_filter

No

Array of AttrValueRules objects

Feature filter

attr_value_rules_reserve

No

Array of AttrValueRules objects

Feature to be reserved

ctr_job

No

String

Ranking job (required when click-through rate is used)

ratio

No

Integer

Traffic proportion

Minimum: 1

Maximum: 100

toppings

No

Array of strings

List of candidate sets to be pinned on top

Table 29 AttrPairRules

Parameter

Mandatory

Type

Description

attr_pairs

No

Array of AttrPair objects

Feature pair

Table 30 AttrPair

Parameter

Mandatory

Type

Description

party_a

No

String

Feature name of the recommended item

party_b

No

String

Feature name of the recommended item

Table 31 Deduplication

Parameter

Mandatory

Type

Description

attributes

No

Array of strings

Feature

Table 32 AttributeInfo

Parameter

Mandatory

Type

Description

rank_feature_pairs

No

Array of RankFeaturePair objects

Matched feature pair

numerical_attrs

No

Array of NumericalAttr objects

Feature weight

num_statistics_type

No

String

Statistics mode. The options are:

  • ORDER indicates that weights are accumulated based on the feature value sequence.

  • ABS indicates that weights are accumulated based on the absolute value.

Enumeration values:

  • ORDER

  • ABS

Table 33 RankFeaturePair

Parameter

Mandatory

Type

Description

feature_name_a

No

String

Feature of the item to be recommended

feature_name_b

No

String

Feature of the recommended item

weight

No

Float

Weight

Minimum: 0.01

Maximum: 1

Table 34 NumericalAttr

Parameter

Mandatory

Type

Description

name

Yes

String

Feature name

weight

Yes

Float

Weight

Minimum: 0.001

Maximum: 1

Table 35 BloomFilterConf

Parameter

Mandatory

Type

Description

behaviors

No

Array of strings

Type of the behavior to be filtered

interval

No

Integer

Filter time

Minimum: 1

Maximum: 7

Table 36 Rule

Parameter

Mandatory

Type

Description

table_name

Yes

String

Table name of a candidate set

rule_ratio

Yes

Integer

Rule ratio

Minimum: 1

Maximum: 100

priority

Yes

Integer

Priority

Minimum: 1

Maximum: 10

Table 37 AttrValueRules

Parameter

Mandatory

Type

Description

attr_values_a

No

Array of AttrValue objects

Feature value settings of the recommended item

attr_values_b

Yes

Array of AttrValue objects

Feature value settings of the item to be recommended

Table 38 AttrValue

Parameter

Mandatory

Type

Description

name

Yes

String

Feature name

value

Yes

String

Feature value

Response Parameters

Status code: 200

Table 39 Response body parameters

Parameter

Type

Description

is_success

Boolean

Whether the request is successful

job

jobs object

Service description

message

String

Response message (This field is not returned when the request is successful.)

error_code

String

Error code (This parameter is not returned when the request is successful.)

Table 40 jobs

Parameter

Type

Description

category

String

Category

config_info

String

Configuration information

description

String

Description

job_id

String

Job ID

job_name

String

Job name

job_type

String

Job type

next_schedule_time

Integer

Next scheduling time

platform

String

Platform

resource_id

String

Resource ID

schedule

String

Scheduling parameter

status

String

Status

workspace_id

String

Workspace ID

job_config

jobConfig object

Job settings

Table 41 jobConfig

Parameter

Type

Description

nearline_recall_param

NearLineRecallParam object

Parameters of a nearline retrieval job (required for nearline retrieval jobs)

max_recommended_num

Integer

Max. number of candidate sets (required for retrieval jobs)

Minimum: 1

Maximum: 200

match_feature_pairs

Array of MatchFeaturePair objects

Matched feature pair (required for feature matching-based retrieval jobs)

striping

Striping object

Row-based strategy (required for feature matching-based retrieval job, itemCF retrieval job, and userCF retrieval job)

match_type

String

Matching type (required for feature matching-based retrieval jobs). The options are:

  • UI: recommending items based on users

  • UU: recommending users based on users

  • II: recommending items based on items

  • IU: recommending users based on items

matrix_factorization

MatrixFactorization object

Matrix decomposition parameter settings (required for the ALS-based MF jobs)

behavior_frequencys

Array of BehaviorFrequency objects

Behavior frequency information (required for historical behavior-based candidate set generation jobs)

file_path

String

File path (required for business rule - manual import retrieval jobs)

ucb_param

UcbParam object

UCB job parameter (required for UCB-based retrieval jobs)

behavior_gravity

BehaviorGravity object

Gravity decay factor (required for the comprehensive behavior popularity-based retrieval jobs)

category

Category object

Type (required for the comprehensive behavior popularity-based retrieval jobs)

behavior_logic

String

Behavior filter logic (required for historical behavior filter jobs). The options are:

  • AND: If both conditions are met, the data is filtered.

  • OR: If one condition is met, the data is filtered.

features_engineering

EtlBasicParameter object

Feature parameter (required for offline feature engineering jobs)

sample_param

SampleParam object

Sample parameter (required for offline feature engineering jobs)

deep_learning_parameters

DeepLearingParam object

General parameters of a ranking job (required by LR, DeepFM, and AutoGroup)

algorithm_specify_parameters

AlgorithmSpecifyParameters object

Specific parameter of a ranking algorithm (required for LR, DeepFM, and AutoGroup)

load_widetable

Boolean

Importing a wide table (required for offline data import jobs)

load_profile

Boolean

Importing a profile (required for offline data import jobs)

save_mode

String

Retaining a wide table (required for offline data import jobs). The options are:

  • append: Yes

  • new: No -Overwrite: Overwrite

indicators

Array of Indicator objects

Statistical indicator (required for effect evaluation jobs)

offline_rank_job_name

String

Name of an offline ranking job (required for online training jobs)

update_interval

Integer

Update interval (required for online training jobs)

optimizer

Optimizer object

Optimizer (required for online training jobs)

flows

Flow object

Online process flow (required for online training jobs)

Table 42 NearLineRecallParam

Parameter

Type

Description

time_limit

Boolean

Time filter

timeFeature

String

Time feature

retainDays

Integer

Retention period (days)

recall_fileds

Array of RecallFiled objects

Retrieved field

itemCF_job_name

String

Name of an itemCF job

Table 43 RecallFiled

Parameter

Type

Description

name

String

Field name

value

Integer

Number of used field values

Minimum: 1

Maximum: 10

Default: 1

Table 44 MatchFeaturePair

Parameter

Type

Description

user_feature_name

String

User feature

item_feature_name

String

Item feature

weight

Double

Weight

match_count

Boolean

Measurement of the number of matched tags

Table 45 Striping

Parameter

Type

Description

nearest_neighborhood

Integer

Nearest neighbors

band

Integer

Similarity degree

Minimum: 1

Maximum: 20

row

Integer

Similarity distance

Minimum: 1

Maximum: 10

Table 46 MatrixFactorization

Parameter

Type

Description

implicit_vector_rank

Integer

Embedding size

Minimum: 1

Maximum: 100

regular_param

Double

Optimization lambda

Minimum: 1.0E-8

Maximum: 1

max_iterator_num

Integer

Number of iterations

Minimum: 1

Maximum: 50

Table 47 BehaviorFrequency

Parameter

Type

Description

behavior_type

String

Behavior type. The options are:

  • view indicates that you browsed an item.

  • click indicates that you clicked an item.

  • collect indicates that you added an item to favorites.

  • uncollect indicates that you removed an item from favorites.

  • search_click indicates that you searched and clicked an item.

  • comment indicates that you made comments on an item.

  • share indicates that you shared an item with others.

  • like indicates that you gave an item a thumb-up.

  • dislike indicates that you gave an item a thumb-down.

  • grade indicates that you rated an item.

  • consume indicates that you bought an item (primarily refers to goods).

  • use indicates that you watched videos/listened to music/read books.

  • download indicates that you downloaded something. -tip indicates that you gave somebody or something a reward.

  • subscribe indicates that you followed somebody or something.

lower_limit

Integer

Min. times

Minimum: 1

upper_limit

Integer

Max. times

Minimum: 1

time_interval

Integer

Time range

Minimum: 1

Table 48 UcbParam

Parameter

Type

Description

alpha

Double

Tradeoff parameter

Minimum: 0

Maximum: 1

min_used_num

Integer

Min. number of behaviors

Minimum: 30

Maximum: 1000

Table 49 BehaviorGravity

Parameter

Type

Description

weaken_factor

Double

Decay factor

Minimum: 0.1

Maximum: 5

view_type

String

Behavior quantity counting mode. The options are:

  • pv: page views or clicks, measuring the number of web pages visited by website users.

  • uv: unique visitors, counting the number of individual users accessing a site within the reporting period.

algo_type

String

Algorithm type. The options are:

  • normal

  • time

Table 50 Category

Parameter

Type

Description

user_meta_list

Array of strings

User feature

item_meta_list

Array of strings

Item feature

Table 51 EtlBasicParameter

Parameter

Type

Description

user_features

Array of FeatureTransformation objects

User feature

item_features

Array of FeatureTransformation objects

Item feature

rank_etl_filter

RankETLFilter object

Filter parameter

Table 52 FeatureTransformation

Parameter

Type

Description

attr

Attribute object

Feature

discrete_method

String

Discrete method. The options are:

  • equal_distance_discrete indicates equal-distance discretization.

  • user_define_discrete indicates custom discrete distance. -normalize indicates normalization.

  • null indicates non-discretization.

params

Object

Specific processing parameter

Table 53 Attribute

Parameter

Type

Description

name

String

Name

data_type

String

Data type

other_uses

Array of strings

Other usage

Table 54 RankETLFilter

Parameter

Type

Description

filter_type

String

Behavior deduplication mode. The options are:

  • abs_weight indicates the absolute weight value.

  • date indicates the date.

time_type

String

Time type. The options are: Day Week Month

is_monday_first

Boolean

Whether Monday is the first day

Table 55 SampleParam

Parameter

Type

Description

divide_type

String

Division mode of training and test sets. The options are:

  • TIME indicates the time ratio.

  • RAMDOM indicates the number ratio.

train_rate

Double

Training data ratio

Minimum: 0.01

Maximum: 1

test_rate

Double

Test data ratio

Minimum: 0.01

Maximum: 1

Table 56 DeepLearingParam

Parameter

Type

Description

initial_parameters

Initial object

Initialization parameter

optimize_parameters

Optimizer object

Optimization parameter

regular_parameters

Regular object

Lambda parameter

max_iterations

Integer

Max. iterations

Minimum: 1

Maximum: 1000

early_stop_iterations

Integer

Iterations at early stopping

Minimum: 1

Maximum: 1000

batch_size

Integer

Batch size

Minimum: 1

dataset_split_parts

Integer

Number of training datasets to be split

Minimum: 1

Maximum: 10

restart_train

Boolean

Retraining

Table 57 Initial

Parameter

Type

Description

initial_method

String

Initialization method

Enumeration values:

  • normal

  • uniform

  • xavier

mean_value

Double

Mean

Minimum: -1

Maximum: 1

standard_deviation

Double

Standard deviation

Minimum: 0

Maximum: 1

min_value

Double

Min. value

Minimum: -1

Maximum: 0

max_value

Double

Max. value

Minimum: 0

Maximum: 1

Table 58 Regular

Parameter

Type

Description

l2_regularization

Double

Lambda 2

Minimum: 0

Maximum: 1

regular_loss_compute_mode

String

Regular loss calculation mode

Enumeration values:

  • full

  • batch

embed_l2_regularization

Double

Lambda 2 of embedding size

Minimum: 0

Maximum: 1

wide_l2_regularization

Double

Lambda 2 of the wide part

Minimum: 0

Maximum: 1

structure_l2_regularization

Double

Lambda 2 of the structured part

Minimum: 0

Maximum: 1

Table 59 AlgorithmSpecifyParameters

Parameter

Type

Description

latent_vector_length

Integer

Embedding size (required for DeepFM)

Minimum: 1

Maximum: 100

architecture

Array of integers

Neural network structure (required for DeepFM)

active_function

String

Activation function (required for DeepFM and AutoGroup)

Enumeration values:

  • relu

  • sigmoid

  • tanh

value_keep_probability

Double

Neuron retention probability (required for DeepFM and AutoGroup)

Minimum: 0

Maximum: 1

embed_size

Array of integers

Embedding size of each degree (required for AutoGroup)

mlp_architecture

Array of integers

Neural network structure (required for AutoGroup)

max_order

Integer

Max. interactions (required for AutoGroup)

hash_sizes

Array of integers

Hash length (required for AutoGroup)

hash_compensation

Array of numbers

Feature interaction penalty coefficient (required for AutoGroup)

use_wide_part

Boolean

Wide part required (required for AutoGroup)

structure_optimizer

Optimizer object

Optimizer parameter (required for AutoGroup)

merge_multi_hot

Boolean

Merge multi-value feature (required for AutoGroup)

fix_structure

Boolean

Fix hash structure (required for AutoGroup)

Table 60 Indicator

Parameter

Type

Description

indicator_name

String

Indicator. The options are: PV UV Custom

indicator_params

IndicatorParam object

Indicator parameter (required for custom metric)

Table 61 IndicatorParam

Parameter

Type

Description

customize_parameter

CustomizeParameter object

Custom parameter

customize_formula

CustomizeFormula object

Custom formula

Table 62 CustomizeParameter

Parameter

Type

Description

alias

String

Alias

behavior_type

String

Behavior type

threshold

Double

Threshold

Minimum: 0

Maximum: 1

deduplication

String

Deduplication

Table 63 CustomizeFormula

Parameter

Type

Description

alias

String

Alias

formula

String

Formula

Table 64 Optimizer

Parameter

Type

Description

type

String

Optimizer type

Enumeration values:

  • adam

  • adagrad

  • ftrl

learning_rate

Integer

Learning rate

Minimum: 0

Maximum: 1

initial_accumulator_value

Double

Initial gradient sum

Minimum: 0

Maximum: 1

lambda1

Double

Lambda 1

Minimum: 0

Maximum: 1

lambda2

Double

Lambda 2

Minimum: 0

Maximum: 1

epsilon

Double

Epsilon

Minimum: 0

Maximum: 1

decay_rate

Double

Decay factor

Minimum: 0

Maximum: 1

decay_steps

Double

Decay step

Minimum: 1

Table 65 Flow

Parameter

Type

Description

flow_id

String

Process flow ID

attr_pair_rules_filter

Array of AttrPairRules objects

Feature pair filter

attr_pair_rules_reserve

Array of AttrPairRules objects

Feature pair to be reserved

deduplication_list

Array of Deduplication objects

Feature deduplication

attribute_info

AttributeInfo object

Comprehensive ranking information

bloom_filter_conf

BloomFilterConf object

Bloom filter settings

group_attr

String

The scatter attribute for grouping

pre_deal

Boolean

Deduplication before ranking

rank_setting

String

Ranking configuration information

rules

Rule object

Candidate set merging

filter_sets

Array of strings

Filter configuration information

attr_value_rules_filter

Array of AttrValueRules objects

Feature filter

attr_value_rules_reserve

Array of AttrValueRules objects

Feature to be reserved

ctr_job

String

Ranking job (required when click-through rate is used)

ratio

Integer

Traffic proportion

Minimum: 1

Maximum: 100

toppings

Array of strings

List of candidate sets to be pinned on top

Table 66 AttrPairRules

Parameter

Type

Description

attr_pairs

Array of AttrPair objects

Feature pair

Table 67 AttrPair

Parameter

Type

Description

party_a

String

Feature name of the recommended item

party_b

String

Feature name of the recommended item

Table 68 Deduplication

Parameter

Type

Description

attributes

Array of strings

Feature

Table 69 AttributeInfo

Parameter

Type

Description

rank_feature_pairs

Array of RankFeaturePair objects

Matched feature pair

numerical_attrs

Array of NumericalAttr objects

Feature weight

num_statistics_type

String

Statistics mode. The options are:

  • ORDER indicates that weights are accumulated based on the feature value sequence.

  • ABS indicates that weights are accumulated based on the absolute value.

Enumeration values:

  • ORDER

  • ABS

Table 70 RankFeaturePair

Parameter

Type

Description

feature_name_a

String

Feature of the item to be recommended

feature_name_b

String

Feature of the recommended item

weight

Float

Weight

Minimum: 0.01

Maximum: 1

Table 71 NumericalAttr

Parameter

Type

Description

name

String

Feature name

weight

Float

Weight

Minimum: 0.001

Maximum: 1

Table 72 BloomFilterConf

Parameter

Type

Description

behaviors

Array of strings

Type of the behavior to be filtered

interval

Integer

Filter time

Minimum: 1

Maximum: 7

Table 73 Rule

Parameter

Type

Description

table_name

String

Table name of a candidate set

rule_ratio

Integer

Rule ratio

Minimum: 1

Maximum: 100

priority

Integer

Priority

Minimum: 1

Maximum: 10

Table 74 AttrValueRules

Parameter

Type

Description

attr_values_a

Array of AttrValue objects

Feature value settings of the recommended item

attr_values_b

Array of AttrValue objects

Feature value settings of the item to be recommended

Table 75 AttrValue

Parameter

Type

Description

name

String

Feature name

value

String

Feature value

Example Requests

This API is used to publish an inference service.

/v2.0/testuuidxxxxxxxxxxxxxxxxxxxxxxxx/workspaces/testuuidxxxxxxxxxxxxxxxxxxxxxxxx/resources/testuuidxxxxxxxxxxxxxxxxxxxxxxxx/service-instance

{
  "category" : "SERVICE",
  "job_type" : "infer",
  "job_config" : {
    "flows" : [ {
      "ratio" : 100,
      "rules" : [ {
        "table_name" : "item-UIREC",
        "rule_ratio" : 100,
        "priority" : "1"
      } ],
      "flow_id" : "flow1"
    } ]
  },
  "description" : "inference service",
  "job_name" : "online1"
}

Example Responses

Status code: 200

OK

{
  "job" : {
    "category" : "SERVICE",
    "job_name" : "online1",
    "job_id" : "testuuidxxxxxxxxxxxxxxxxxxxxxxxx",
    "description" : "inference service",
    "job_type" : "infer",
    "status" : "Draft",
    "platform" : "AIP",
    "workspace_id" : "testuuidxxxxxxxxxxxxxxxxxxxxxxxx",
    "resource_id" : "testuuidxxxxxxxxxxxxxxxxxxxxxxxx"
  },
  "is_success" : true
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.