Application instance deployment method and apparatus, and readable storage medium
This application provides an application instance deployment method, apparatus, and a readable storage medium. In one embodiment, a data analysis network element receives a first message from a first network element, where the first message includes indication information used to indicate a first area. The first message is used to request first indication information that includes prediction information of a terminal device accessing an application instance of a target application in the first area. The data analysis network element determines the first indication information, and sends the first indication information to the first network element.
1 . A communication method, comprising:
receiving, by a data analysis network element, a first message from a first network element that requests first indication information comprising prediction information of a terminal device accessing an application instance of a target application in a first area, wherein
the first message comprises an application identifier of the application instance of the target application,
the first message further comprises indication information that indicates the first area, wherein the first area is an area served by a first edge node, and
the prediction information of the terminal device is used to assist in deploying the application instance of the target application on the first edge node;
determining, by the data analysis network element, the first indication information; and
sending, by the data analysis network element, the first indication information to the first network element, wherein the first indication information comprises at least one of the following:
a predicted first quantity of terminal devices accessing the application instance of the target application in the first area;
a predicted second quantity of terminal devices that are to leave the first area and that are in the terminal device accessing the application instance of the target application in the first area; or
a predicted third quantity of terminal devices that are to enter the first area and access the application instance of the target application.
2 . The method according to claim 1 , wherein the first indication information comprises a predicted quantity of terminal devices that are to leave the first area and that are in the terminal device accessing the application instance of the target application in the first area; and
the determining, by the data analysis network element, the first indication information comprises:
obtaining, by the data analysis network element, M1 terminal devices accessing the application instance of the target application in the first area, wherein M1 is a positive integer;
obtaining, by the data analysis network element, location information of the M1 terminal devices;
analyzing, by the data analysis network element, the location information of the M1 terminal devices; and
predicting, from the M1 terminal devices, the predicted quantity of terminal devices that are to leave the first area and that are in the terminal devices accessing the application instance of the target application in the first area.
3 . The method according to claim 1 , wherein the first indication information comprises a predicted quantity of terminal devices that are to enter the first area and access the application instance of the target application; and
the determining, by the data analysis network element, of the first indication information comprises:
obtaining, by the data analysis network element, N1 terminal devices accessing an application instance of the target application in a second area, wherein N1 is a positive integer;
obtaining, by the data analysis network element, location information of the N1 terminal devices;
analyzing, by the data analysis network element, the location information of the N1 terminal devices; and
predicting, from the N1 terminal devices, N2 terminal devices that are to enter the first area, wherein N2 is less than or equal to N1, and N2 is a positive integer, and the second area is an area adjacent to the first area.
4 . The method according to claim 3 , wherein after the receiving the first message from a first network element, and before the obtaining the NI terminal devices, the method further comprises:
sending, by the data analysis network element, a second message to an operation, administration, and maintenance network element, wherein the second message comprises the indication information used to indicate the first area;
receiving, by the data analysis network element, network topology information from the operation, administration, and maintenance network element, wherein the network topology information is used to indicate an area adjacent to the first area; and
determining, by the data analysis network element, the second area based on the area adjacent to the first area.
5 . The method according to claim 1 , wherein the indication information used to indicate the first area comprises at least one of the following:
an identifier of one or more cells comprised in the first area;
an identity of one or more tracking areas comprised in the first area;
a geometric area comprising one or more pieces of coordinate information of the first area; or
administrative region information of the first area.
6 . The method according to claim 1 , wherein the first network element is a network function network element or an application function network element.
7 . An apparatus, comprising:
a processor, coupled to a memory, wherein, when executing instructions in the memory, the processor is configured to:
receive a first message from a first network element that requests first indication information comprising prediction information of a terminal device accessing an application instance of a target application in a first area, wherein
the first message comprises an application identifier of the application instance of the target application,
the first message further comprises indication information that indicates the first area,
wherein the first area is an area served by a first edge node, and
the prediction information of the terminal device is used to assist in deploying the application instance of the target application on the first edge node;
determine the first indication information; and
send the first indication information to the first network element, wherein the first indication information comprises at least one of the following:
a predicted first quantity of terminal devices accessing the application instance of the target application in the first area;
a predicted second quantity of terminal devices that are to leave the first area and that are in the terminal device accessing the application instance of the target application in the first area; or
a predicted third quantity of terminal devices that are to enter the first area and access the application instance of the target application.
8 . The apparatus according to claim 7 , wherein the first indication information comprises a predicted quantity of terminal devices that are to enter the first area and access the application instance of the target application; and
the processor, to determine the first indication information, is further configured to:
obtain N1 terminal devices accessing an application instance of the target application in a second area, wherein N1 is a positive integer;
obtain location information of the N1 terminal devices;
analyze the location information of the NI terminal devices; and predict, from the N1 terminal devices, N2 terminal devices that are to enter the first area, wherein the second area is an area adjacent to the first area, N2 is less than or equal to N1, and N2 is a positive integer.
9 . The apparatus according to claim 8 , wherein the processor is configured to:
send a second message to an operation, administration, and maintenance network element, wherein the second message comprises the indication information used to indicate the first area;
receive network topology information from the operation, administration, and maintenance network element, wherein the network topology information is used to indicate an area adjacent to the first area; and
determine the second area based on the area adjacent to the first area.
10 . The apparatus according to claim 7 , wherein the first indication information comprises a predicted quantity of terminal devices that are to leave the first area and that are in the terminal device accessing the application instance of the target application in the first area; and
the processor, to determine the first indication information, is further configured to:
obtain M1 terminal devices accessing the application instance of the target application in the first area, wherein M1 is a positive integer;
obtain location information of the M1 terminal devices;
analyze the location information of the M1 terminal devices; and
predict, from the M1 terminal devices, a quantity of terminal devices that are to leave the first area and that are in the terminal devices accessing the application instance of the target application in the first area.
11 . The apparatus according to claim 7 , wherein the indication information used to indicate the first area comprises at least one of the following:
an identifier of one or more cells comprised in the first area;
an identity of one or more tracking areas comprised in the first area;
a geometric area comprising one or more pieces of coordinate information of the first area; or
administrative region information of the first area.
12 . The apparatus according to claim 7 , wherein the apparatus is a data analysis network element, and wherein the first network element is a network function network element or an application function network element.
13 . An apparatus, comprising:
a memory; and
a processor, coupled to the memory, wherein the processor, when executing instructions in the memory, is configured to:
send a first message to a data analysis network element, wherein the first message is used to request first indication information;
receive the first indication information from the data analysis network element, wherein the first indication information indicates prediction information of a terminal device accessing an application instance of a target application in a first area, wherein
the first message comprises an application identifier of the application instance of the target application;
the first message further comprises indication information that indicates the first area, wherein the first area is an area served by a first edge node;
the prediction information of the terminal device is used to assist in deploying the application instance of the target application on the first edge node;
the first indication information comprises at least one of the following:
a predicted first quantity of terminal devices accessing the application instance of the target application in the first area;
a predicted second quantity of terminal devices that are to leave the first area and that are in the terminal device accessing the application instance of the target application in the first area; or
a predicted third quantity of terminal devices that are to enter the first area and access the application instance of the target application; and
deploy the application instance of the target application in the first area based on the first indication information.
14 . The apparatus according to claim 13 , wherein the processor, to deploy the application instance of the target application, is further configured to:
responsive to determining that the prediction information of the terminal device accessing the application instance of the target application in the first area is greater than a first threshold, increase a quantity of application instances of the target application in the first area; or
responsive to determining that the prediction information of the terminal device accessing the application instance of the target application in the first area is less than a second threshold, decrease a quantity of application instances of the target application in the first area.
15 . The apparatus according to claim 13 , wherein the apparatus is a network function network element or an application function network element.
16 . A communication method, comprising:
sending a first message to a data analysis network element, wherein the first message is used to request first indication information;
receiving the first indication information from the data analysis network element, wherein the first indication information indicates prediction information of a terminal device accessing an application instance of a target application in a first area, wherein
the first message comprises an application identifier of the application instance of the target application;
the first message further comprises indication information that indicates the first area, wherein the first area is an area served by a first edge node;
the prediction information of the terminal device is used to assist in deploying the application instance of the target application on the first edge node;
the first indication information comprises at least one of the following:
a predicted first quantity of terminal devices accessing the application instance of the target application in the first area;
a predicted second quantity of terminal devices that are to leave the first area and that are in the terminal device accessing the application instance of the target application in the first area; or
a predicted third quantity of terminal devices that are to enter the first area and access the application instance of the target application; and
deploying the application instance of the target application in the first area based on the first indication information.
17 . The method according to claim 16 , wherein the indication information used to indicate the first area comprises at least one of the following:
an identifier of one or more cells comprised in the first area;
an identity of one or more tracking areas comprised in the first area;
a geometric area comprising one or more pieces of coordinate information of the first area; or
administrative region information of the first area.