Service processing method, device and storage medium based on URL

文档序号:1904775 发布日期:2021-11-30 浏览:8次 中文

阅读说明:本技术 基于url的业务处理方法、设备、存储介质 (Service processing method, device and storage medium based on URL ) 是由 张辉 于 2021-08-30 设计创作,主要内容包括:本发明公开了一种基于URL的业务处理方法、设备、存储介质,该方法包括:当宿主APP获取到待识别URL,从待识别URL中获取第一特征参数;SDK将业务主机号参数集合和业务路径参数集合发送至宿主APP;当宿主APP检测到业务主机号参数集合中存在第一特征参数,从待识别URL中获取第二特征参数;当宿主APP检测到业务路径参数集合中存在第二特征参数,将待识别URL确定为业务URL,并将业务URL发送至SDK;SDK根据业务URL进行页面跳转。本发明的方案利用业务主机号参数集合和业务路径参数集合实现业务URL的识别,由于两个集合之间不存在关联关系,因此当集合中的参数需要改动,只需要一次开销修改相关数据,不会出现参数未改动的风险,有效提高业务处理的准确率。(The invention discloses a service processing method, equipment and a storage medium based on a Uniform Resource Locator (URL), wherein the method comprises the following steps: when a host APP acquires a URL to be identified, acquiring a first characteristic parameter from the URL to be identified; the SDK sends the service host number parameter set and the service path parameter set to a host APP; when a host APP detects that a first characteristic parameter exists in a service host number parameter set, acquiring a second characteristic parameter from a URL to be identified; when the host APP detects that a second characteristic parameter exists in the service path parameter set, determining the URL to be identified as a service URL, and sending the service URL to the SDK; and the SDK carries out page skipping according to the service URL. The scheme of the invention realizes the identification of the service URL by utilizing the service host number parameter set and the service path parameter set, and because the association relationship does not exist between the two sets, when the parameters in the sets need to be changed, only one time of spending to modify the related data is needed, the risk of not changing the parameters can not occur, and the accuracy rate of service processing is effectively improved.)

1. A service processing method based on Uniform Resource Locator (URL) is characterized by comprising the following steps:

when a host application program APP acquires a URL to be identified, acquiring a first characteristic parameter from the URL to be identified, wherein the first characteristic parameter is a host number parameter of the URL to be identified;

the software development kit SDK sends a service host number parameter set and a service path parameter set to the host APP;

the host APP performs matching processing on the first characteristic parameter and the service host number parameter set, and when the first characteristic parameter is detected to exist in the service host number parameter set, a second characteristic parameter is obtained from the URL to be identified, wherein the second characteristic parameter is a path parameter of the URL to be identified;

the host APP performs matching processing on the second characteristic parameter and the service path parameter set, determines the URL to be identified as a service URL when the second characteristic parameter is detected to exist in the service path parameter set, and sends the service URL to the SDK;

and the SDK carries out page skipping according to the service URL.

2. The method according to claim 1, wherein the obtaining the first feature parameter from the URL to be identified comprises:

the host APP acquires a third characteristic parameter from the URL to be identified, wherein the third characteristic parameter is the protocol type of the URL to be identified;

the host APP acquires service protocol information;

and the host APP performs matching processing on the third characteristic parameter and the service protocol information, and when the host APP detects that the third characteristic parameter and the service protocol information are successfully matched, the host APP acquires the first characteristic parameter from the URL to be identified.

3. The method according to claim 2, wherein the host APP obtains a third feature parameter from the URL to be identified, including:

and the host APP performs null detection on the URL to be identified, and when the host APP detects that no null exists in the URL to be identified, a third characteristic parameter is acquired from the URL to be identified.

4. The method of claim 3, further comprising:

when the host APP detects that the first characteristic parameter does not exist in the service host number parameter set, generating and sending first prompt information;

alternatively, the first and second electrodes may be,

when the host APP detects that the second characteristic parameter does not exist in the service path parameter set, generating and sending second prompt information;

alternatively, the first and second electrodes may be,

when the host APP detects that the third characteristic parameter is failed to be matched with the service protocol information, generating and sending third prompt information;

alternatively, the first and second electrodes may be,

and when the host APP detects that the URL to be identified has a null value, generating and sending fourth prompt information.

5. The method of claim 1, wherein the SDK sends a set of service host number parameters and a set of service path parameters to the host APP, comprising:

when the SDK obtains a new service URL, creating a service object according to the service URL, wherein the service object comprises a service host number parameter and a service path parameter;

and the SDK stores the service host number parameter to the service host number parameter set, stores the service path parameter to the service path parameter set, and sends the service host number parameter set and the service path parameter set to the host APP.

6. The method of claim 5, further comprising:

and when the SDK detects that the service path parameters in the service object exist in the service path parameter set, a new service object is created again.

7. The service processing device based on the URL is characterized in that the service processing device based on the URL comprises a host APP unit and an SDK unit;

the host APP unit is used for acquiring a first characteristic parameter from the URL to be identified under the condition that the host APP unit acquires the URL to be identified, wherein the first characteristic parameter is a host number parameter of the URL to be identified;

the SDK unit is used for sending the service host number parameter set and the service path parameter set to the host APP unit;

the host APP unit is further configured to perform matching processing on the first feature parameter and the service host number parameter set, and when it is detected that the first feature parameter exists in the service host number parameter set, obtain a second feature parameter from the URL to be identified, where the second feature parameter is a path parameter of the URL to be identified;

the host APP unit is further configured to perform matching processing on the second feature parameter and the service path parameter set, determine the URL to be identified as a service URL when the second feature parameter is detected to exist in the service path parameter set, and send the service URL to the SDK unit;

the host APP unit is further configured to obtain a service URL according to the URL to be identified, the service host number parameter set, the service path parameter set, and the URL identification policy, and send the service URL to the SDK unit;

and the SDK unit is used for carrying out page skipping according to the service URL.

8. The apparatus of claim 7, wherein the host APP unit further includes a third feature parameter obtaining unit, a service protocol information obtaining unit, and a first feature parameter obtaining unit;

the third characteristic parameter obtaining unit is configured to obtain a third characteristic parameter from the URL to be identified, where the third characteristic parameter is a protocol type of the URL to be identified;

the service protocol information acquisition unit is used for acquiring service protocol information;

and the first characteristic parameter obtaining unit is configured to perform matching processing on the third characteristic parameter and the service protocol information, and when the host APP detects that the third characteristic parameter and the service protocol information are successfully matched, obtain the first characteristic parameter from the URL to be identified.

9. An electronic device, comprising: memory, processor and computer program stored on the memory and executable on the processor, characterized in that the processor implements a method for uniform resource locator URL based service processing according to any one of claims 1 to 6 when executing the computer program.

10. A storage medium storing computer-executable instructions for performing the method of uniform resource locator URL based transaction processing as claimed in any one of claims 1 to 6.

Technical Field

The present invention relates to, but not limited to, the field of data processing technologies, and in particular, to a service processing method, device, and storage medium based on a URL.

Background

The WebView is a component for loading a Uniform Resource Locator (URL) in an android system, and a host Application program (APP) has a preset WebView packaging method and can realize basic URL processing. When a service URL needs to be loaded in WebView, for example, an Activity page in health management is opened and closed, a mobile phone network state is obtained, and the like, the service URL needs to be processed by a Software Development Kit (SDK) built in a host APP. The common method is that the SDK provides a method for identifying a specific URL in a service for the host APP, and when the host APP determines that the URL to be identified is the service URL, the host APP forwards the service URL to the SDK, and the SDK performs service processing on the service URL.

The method for identifying the service URL in the related technology is to match the URL to be identified with the URL set in the service, if the URL set in the service exists, the URL to be identified is determined to be the specific URL in the service, for example, the protocol parameters of each URL in the URL set in the service are the same, each URL in the URL set in the service needs to be accessed for modification when the protocol parameters are modified, all URLs in the URL set in the service cannot be synchronously modified, and the risk that the URL parameters are not modified is easily caused, so that the SDK service processing is wrong.

Disclosure of Invention

The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.

The embodiment of the invention provides a service processing method, equipment and a storage medium based on a Uniform Resource Locator (URL), which can improve the accuracy of service processing.

In a first aspect, an embodiment of the present invention provides a service processing method based on a URL, including:

when a host application program APP acquires a URL to be identified, acquiring a first characteristic parameter from the URL to be identified, wherein the first characteristic parameter is a host number parameter of the URL to be identified;

the software development kit SDK sends a service host number parameter set and a service path parameter set to the host APP;

the host APP performs matching processing on the first characteristic parameter and the service host number parameter set, and when the first characteristic parameter is detected to exist in the service host number parameter set, a second characteristic parameter is obtained from the URL to be identified, wherein the second characteristic parameter is a path parameter of the URL to be identified;

the host APP performs matching processing on the second characteristic parameter and the service path parameter set, determines the URL to be identified as a service URL when the second characteristic parameter is detected to exist in the service path parameter set, and sends the service URL to the SDK;

and the SDK carries out page skipping according to the service URL.

In a second aspect, an embodiment of the present invention provides a service processing apparatus based on a URL, where the service processing apparatus based on the URL includes a host APP unit and an SDK unit;

the host APP unit is used for acquiring a first characteristic parameter from the URL to be identified under the condition that the host APP unit acquires the URL to be identified, wherein the first characteristic parameter is a host number parameter of the URL to be identified;

the SDK unit is used for sending the service host number parameter set and the service path parameter set to the host APP unit;

the host APP unit is further configured to perform matching processing on the first feature parameter and the service host number parameter set, and when it is detected that the first feature parameter exists in the service host number parameter set, obtain a second feature parameter from the URL to be identified, where the second feature parameter is a path parameter of the URL to be identified;

the host APP unit is further configured to perform matching processing on the second feature parameter and the service path parameter set, determine the URL to be identified as a service URL when the second feature parameter is detected to exist in the service path parameter set, and send the service URL to the SDK unit;

the host APP unit is further configured to obtain a service URL according to the URL to be identified, the service host number parameter set, the service path parameter set, and the URL identification policy, and send the service URL to the SDK unit;

and the SDK unit is used for carrying out page skipping according to the service URL.

In a third aspect, an embodiment of the present invention provides an electronic device, including: the service processing device comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor implements the URL-based service processing method according to the embodiment of the first aspect when executing the computer program.

In a fourth aspect, an embodiment of the present invention provides a storage medium, which stores computer-executable instructions, where the computer-executable instructions are configured to execute the method for processing a service based on a URL according to the embodiment of the first aspect.

The embodiment of the invention comprises the following steps: when a host application program APP acquires a URL to be identified, acquiring a first characteristic parameter from the URL to be identified, wherein the first characteristic parameter is a host number parameter of the URL to be identified; the software development kit SDK sends a service host number parameter set and a service path parameter set to the host APP; the host APP performs matching processing on the first characteristic parameter and the service host number parameter set, and when the first characteristic parameter is detected to exist in the service host number parameter set, a second characteristic parameter is obtained from the URL to be identified, wherein the second characteristic parameter is a path parameter of the URL to be identified; the host APP performs matching processing on the second characteristic parameter and the service path parameter set, determines the URL to be identified as a service URL when the second characteristic parameter is detected to exist in the service path parameter set, and sends the service URL to the SDK; and the SDK carries out page skipping according to the service URL. According to the scheme provided by the embodiment of the invention, the first characteristic parameter is extracted from the URL to be identified and is matched with the service host number parameter set, the second characteristic parameter is extracted from the URL to be identified and is matched with the service path parameter set to obtain the service URL, and because the incidence relation does not exist between the service host number parameter set and the service path parameter set, when the parameters in the service host number parameter set or the service path parameter set are changed, only one time of overhead modification is needed, the risk that the parameters are not changed does not occur, and the accuracy of service processing is effectively improved.

Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.

Drawings

The accompanying drawings are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the example serve to explain the principles of the invention and not to limit the invention.

FIG. 1 is a flowchart of a method for processing a URL-based service according to an embodiment of the present invention;

FIG. 2 is a flow chart of obtaining a first characteristic parameter according to another embodiment of the present invention;

FIG. 3 is a flowchart of obtaining a third characteristic parameter according to another embodiment of the present invention;

FIG. 4 is a flow chart of generating and sending a prompt message according to another embodiment of the present invention;

fig. 5 is a flowchart of sending a service host number parameter set and a service path parameter set to a host APP by an SDK according to another embodiment of the present invention;

FIG. 6 is a flow diagram for creating a business object provided by another embodiment of the present invention;

FIG. 7 is a flowchart of a method for URL-based transaction processing according to another embodiment of the present invention;

fig. 8 is a block diagram of a URL-based service processing apparatus according to another embodiment of the present invention;

fig. 9 is a block diagram of an electronic device according to another embodiment of the present invention.

Detailed Description

In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

It should be noted that although functional blocks are partitioned in a schematic diagram of an apparatus and a logical order is shown in a flowchart, in some cases, the steps shown or described may be performed in a different order than the partitioning of blocks in the apparatus or the order in the flowchart. The terms "first," "second," and the like in the description, in the claims, or in the drawings described above, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.

The invention provides a service processing method, equipment and a storage medium based on a Uniform Resource Locator (URL), wherein the method comprises the following steps: when a host application program APP acquires a URL to be identified, acquiring a first characteristic parameter from the URL to be identified, wherein the first characteristic parameter is a host number parameter of the URL to be identified; the software development kit SDK sends a service host number parameter set and a service path parameter set to the host APP; the host APP performs matching processing on the first characteristic parameter and the service host number parameter set, and when the first characteristic parameter is detected to exist in the service host number parameter set, a second characteristic parameter is obtained from the URL to be identified, wherein the second characteristic parameter is a path parameter of the URL to be identified; the host APP performs matching processing on the second characteristic parameter and the service path parameter set, determines the URL to be identified as a service URL when the second characteristic parameter is detected to exist in the service path parameter set, and sends the service URL to the SDK; and the SDK carries out page skipping according to the service URL. According to the scheme provided by the embodiment of the invention, the first characteristic parameter is extracted from the URL to be identified and is matched with the service host number parameter set, the second characteristic parameter is extracted from the URL to be identified and is matched with the service path parameter set to obtain the service URL, and because the incidence relation does not exist between the service host number parameter set and the service path parameter set, when the parameters in the service host number parameter set or the service path parameter set are changed, only one time of overhead modification is needed, the risk that the parameters are not changed does not occur, and the accuracy of service processing is effectively improved.

The embodiments of the present invention will be further explained with reference to the drawings.

As shown in fig. 1, fig. 1 is a flowchart of a URL-based service processing method according to an embodiment of the present invention, in which the method includes, but is not limited to, the following steps:

step S110, when the host APP acquires the URL to be identified, acquiring a first characteristic parameter from the URL to be identified, wherein the first characteristic parameter is a host number parameter of the URL to be identified.

It can be understood that, when the host APP acquires the URL to be identified and the URL to be identified is not the URL that can be implemented in the preset WebView encapsulation method of the host APP, the host APP acquires the host number parameter, i.e., the first characteristic parameter, from the URL to be identified, and provides a data basis for determining whether the URL to be identified is the service URL in the SDK.

It can be understood that the embodiment of the present application does not limit the specific manner of obtaining the first feature parameter from the URL to be identified, and field extraction may be implemented through an artificial intelligence model, and those skilled in the art can select the first feature parameter according to actual situations, which is not described herein again.

Step S120, the SDK sends the service host number parameter set and the service path parameter set to the host APP.

It can be understood that the host number parameter set includes host number parameters of service URLs in multiple SDKs, the service path parameter set includes path parameters of service URLs in multiple SDKs, and the SDKs send the service host number parameter set and the service path parameter set to the host APP, which can determine whether the URL to be identified provides a data basis for the service URL in the SDK for the host APP.

Step S130, the host APP performs matching processing on the first characteristic parameter and the service host number parameter set, and when the first characteristic parameter is detected to exist in the service host number parameter set, a second characteristic parameter is obtained from the URL to be identified, wherein the second characteristic parameter is a path parameter of the URL to be identified;

step S140, the host APP performs matching processing on the second characteristic parameter and the service path parameter set, determines the URL to be identified as a service URL when detecting that the second characteristic parameter exists in the service path parameter set, and sends the service URL to the SDK;

and step S150, the SDK carries out page skipping according to the service URL.

It can be understood that, the host APP first detects a first feature parameter in a URL to be identified, matches the first feature parameter with the service host number parameter set, when it is detected that the first feature parameter exists in the service host number parameter set, that is, it is determined that the host number parameter in the URL to be identified conforms to the host number parameter condition of the service URL in the SDK, continues to obtain a second feature parameter from the URL to be identified, and when the host APP detects that the second feature parameter exists in the service path parameter set, that is, it is determined that the path parameter in the URL to be identified conforms to the path parameter condition of the service URL in the SDK, determines the URL to be identified as the service URL, and sends the service URL to the SDK, so that the SDK jumps pages according to the determined service URL. Compared with the technical scheme that the URL to be identified is matched with the service URL set in the SDK, and whether the URL to be identified is the service URL in the SDK is determined according to the matching result, the embodiment of the application extracts the first characteristic parameter from the URL to be identified and matches the first characteristic parameter with the service host number parameter set, extracts the second characteristic parameter from the URL to be identified and matches the second characteristic parameter with the service path parameter set to obtain the service URL.

In addition, referring to fig. 2, in an embodiment, the step S110 in the embodiment shown in fig. 1 further includes, but is not limited to, the following steps:

step S210, the host APP obtains a third characteristic parameter from the URL to be identified, wherein the third characteristic parameter is the protocol type of the URL to be identified;

step S220, the host APP obtains service protocol information;

and step S230, the host APP performs matching processing on the third characteristic parameter and the service protocol information, and when the host APP detects that the third characteristic parameter and the service protocol information are successfully matched, the host APP acquires the first characteristic parameter from the URL to be identified.

It is understood that, in an embodiment of the present application, the host APP acquires the first feature parameter in the URL to be identified, before matching with the service host number parameter set, acquiring the protocol type from the URL to be identified, matching the protocol type of the URL to be identified with the service protocol information acquired by the host APP, wherein, the service protocol information is the protocol type of the service URL in the SDK, when the host APP detects that the third characteristic parameter is successfully matched with the service protocol information, the first characteristic parameter is obtained from the URL to be identified, when the matching of the third characteristic parameter and the service protocol information fails, the host APP determines that the URL to be identified is a non-service URL, subsequent matching processing is not performed, the characteristic parameter is extracted from the URL to be identified for segmented matching processing, and compared with a scheme of performing matching processing on the URL to be identified and a service URL set, the technical scheme provided by the invention can effectively reduce the resource consumption of the host APP due to matching processing.

It should be noted that, the embodiment of the present application does not limit the method for obtaining the service protocol information, and the service protocol information may be sent to the host APP by the SDK, or may be a parameter preset by the host APP.

In addition, referring to fig. 3, in an embodiment, the step S210 in the embodiment shown in fig. 2 further includes, but is not limited to, the following steps:

and S310, the host APP performs null detection on the URL to be identified, and when the host APP detects that no null exists in the URL to be identified, the third characteristic parameter is acquired from the URL to be identified.

It can be understood that, in an embodiment of the present application, before the host APP acquires the third feature parameter and performs matching processing on the third feature parameter and the service protocol information, null detection is performed on the URL to be identified, and when the host APP detects that no null exists in the URL to be identified, the third feature parameter is acquired from the URL to be identified; when detecting that the URL to be identified has a null value, the host APP determines that the URL to be identified is a non-service URL, and does not perform subsequent matching processing.

In addition, referring to fig. 4, in an embodiment, the method for processing a service based on a URL further includes the following steps:

step S410, when the host APP detects that the first characteristic parameter does not exist in the service host parameter set, generating and sending first prompt information;

alternatively, the first and second electrodes may be,

step S420, when the host APP detects that the second characteristic parameter does not exist in the service path parameter set, generating and sending second prompt information;

alternatively, the first and second electrodes may be,

step S430, when the host APP detects that the matching of the third characteristic parameter and the service protocol information fails, generating and sending third prompt information;

alternatively, the first and second electrodes may be,

step S440, when the host APP detects that the URL to be identified has a null value, generating and sending fourth prompt information.

It can be understood that, when the host APP detects that the first feature parameter does not exist in the service host parameter set, the first prompt information is generated and sent to the client, and the content of the first prompt information may include: the URL to be identified is prompt information of a non-service URL, or host number parameters of the URL to be identified, namely the prompt information that the first characteristic parameters do not accord with the conditions of the service host number parameters of the service URL in the SDK; when the host APP detects that the second characteristic parameter does not exist in the service path parameter set, generating and sending second prompt information to the client, where the content of the second prompt information may include: the URL to be identified is prompt information of a non-service URL, or path parameters of the URL to be identified, namely prompt information that the second characteristic parameters do not meet the service path parameter conditions of the service URL in the SDK; when the host APP detects that the third characteristic parameter fails to match the service protocol information, generating and sending third prompt information to the client, where the content of the third prompt information may include: the URL to be identified is prompt information of a non-service URL or a protocol type of the URL to be identified, namely the third characteristic parameter does not conform to the prompt information of the service protocol information of the service URL in the SDK; when the host APP detects that the URL to be identified has a null value, fourth prompt information is generated and sent to the host APP client, and the content of the fourth prompt information may include: and the URL to be identified is prompt information of a non-service URL, or the URL to be identified is null data or prompt information of a null field of the URL to be identified. According to the scheme of the application, under the condition that the host APP makes mistakes or fails in the identification processing of the URL to be identified, the prompt message is sent to the client, so that the host APP user can monitor the processing state of the URL to be identified, and the user experience is improved.

In addition, referring to fig. 5, in an embodiment, the step S120 in the embodiment shown in fig. 1 further includes, but is not limited to, the following steps:

step S510, when the SDK obtains a new service URL, a service object is created according to the service URL, and the service object comprises a service host number parameter and a service path parameter;

step S520, the SDK stores the service host parameter to the service host number parameter set, stores the service path parameter to the service path parameter set, and sends the service host parameter set and the service path parameter set to the host APP.

It can be understood that, when the SDK acquires a new service URL, a service object SchemeDispatcher is created in a SchemeManager module of the SDK according to the service URL, a service Host number parameter Host and a service Path parameter Path are configured for the SchemeDispatcher object, the Host parameter is stored in a service Host number parameter set, the Path parameter is stored in a service Path parameter set, and the service Host parameter set and the service Path parameter set are sent to the Host APP. According to the technical scheme, a data basis can be provided for judging whether the URL to be identified is the service URL in the SDK; and because the incidence relation does not exist between the service host number parameter set and the service path parameter set, when the parameters in the service host number parameter set or the service path parameter set need to be changed, only one time of overhead modification is needed, the risk that the parameters are not changed is avoided, and the accuracy of service URL identification and corresponding service processing is effectively improved.

In addition, referring to fig. 6, in an embodiment, the method for processing a service based on a URL further includes the following steps:

step S610, when the SDK detects that the service path parameter in the service object already exists in the service path parameter set, a new service object is created again.

It can be understood that the service path parameter can uniquely identify the service URL in the SDK, perform collision detection on the service path parameter in the case of configuring the service object parameter, and recreate a new service object when it is detected that the service path parameter in the service object already exists in the service path parameter set.

In order to explain the URL-based service processing method provided by the present invention in more detail, a specific example is used to describe the technical solution of the present invention.

Example one: referring to fig. 7, fig. 7 is a flowchart of a URL-based service processing method according to another embodiment of the present invention, where the flowchart includes the following steps:

step S710, when the SDK obtains a new service URL, the SDK creates a service object SchemeDispatcher in the Schememanager module according to the service URL, and configures a service Host number parameter Host and a service Path parameter Path for the SchemeDispatcher object;

step S720, the SDK stores the Host parameter to a service Host number parameter set, stores the Path parameter to a service Path parameter set, and sends the service Host parameter set and the service Path parameter set to a Host APP;

step 730, the host APP performs null detection on the URL to be identified, and when the URL to be identified is a non-null value, the Protocol type Protocol is extracted from the URL to be identified;

step S740, when the Host APP detects that the Protocol of the URL to be identified accords with the Protocol standard of the SDK service URL, extracting a Host number parameter Host from the URL to be identified;

step S750, the Host APP matches the Host parameter of the URL to be identified with the service Host number parameter set, and when the Host APP detects that the Host parameter exists in the service Host number parameter set, the Host APP extracts a Path parameter Path from the URL to be identified;

step S760, the host APP matches the Path parameter of the URL to be identified with the service Path parameter set, and when the Path parameter is detected to exist in the service Path parameter set, the URL to be identified is determined to be the service URL of the SDK;

step S770, the host APP sends the determined service URL to the SDK;

step S780, the SDK carries out corresponding page jump processing aiming at the service URL.

It can be understood that the URL host APP may be a visit APP platform, the URL to be identified may be a service operation instruction received by the client, for example, a request registration, the visit APP obtains URL data corresponding to the request registration, performs null value detection on the URL data, when the URL data is not null, sequentially extracts a protocol type, a host number parameter, and a path parameter from the URL data to identify, when the protocol type, the host number parameter, and the path parameter in the URL data all satisfy a service URL standard of an SDK in the visit APP, that is, the SDK in the visit APP can implement a function of requesting registration, and then the SDK performs corresponding service processing for the URL, for example, the client presents a page related to the request registration.

In addition, referring to fig. 8, fig. 8 is a structural diagram of a URL-based service processing apparatus according to another embodiment of the present invention, and an embodiment of the present invention further provides a URL-based service processing apparatus, which includes a host APP unit 810 and an SDK unit 820;

the host APP unit 810 is configured to, when the host APP unit 810 acquires the URL to be identified, acquire a first characteristic parameter from the URL to be identified, where the first characteristic parameter is a host number parameter of the URL to be identified;

the SDK unit 820 is configured to send the service host number parameter set and the service path parameter set to the host APP unit 810;

the host APP unit 810 is further configured to perform matching processing on the first feature parameter and the service host number parameter set, and when it is detected that the first feature parameter exists in the service host number parameter set, obtain a second feature parameter from the URL to be identified, where the second feature parameter is a path parameter of the URL to be identified;

the host APP unit 810 is further configured to perform matching processing on the second feature parameter and the service path parameter set, determine, when it is detected that the second feature parameter exists in the service path parameter set, the URL to be identified as a service URL, and send the service URL to the SDK unit 820;

the host APP unit 810 is further configured to obtain a service URL according to the URL to be identified, the service host parameter set, the service path parameter set, and the URL identification policy, and send the service URL to the SDK unit 820;

and the SDK unit 820 is configured to perform page jump according to the service URL.

In addition, referring to fig. 8, in an embodiment of the present application, the host APP unit 810 includes a third feature parameter obtaining unit 811, a service protocol information obtaining unit 812, and a first feature parameter obtaining unit 813;

a third feature parameter obtaining unit 811, configured to obtain a third feature parameter from the URL to be identified, where the third feature parameter is a protocol type of the URL to be identified;

a service protocol information obtaining unit 812, configured to obtain service protocol information;

the first feature parameter obtaining unit 813 is configured to perform matching processing on the third feature parameter and the service protocol information, and when the host APP detects that the third feature parameter and the service protocol information are successfully matched, obtain the first feature parameter from the URL to be identified.

In an embodiment of the present application, the host APP unit 810 further includes a null detection unit 814; the null value detection unit 814 is configured to perform null value detection on the URL to be identified, and when the host APP detects that the URL to be identified does not have a null value, obtain a third feature parameter from the URL to be identified.

In addition, referring to fig. 8, in an embodiment of the present application, the host APP unit 810 further includes a first prompt information generating unit 815, a second prompt information generating unit 816, a third prompt information generating unit 817, and a fourth prompt information generating unit 818;

a first prompt information generating unit 815, configured to generate and send first prompt information when the host APP unit 810 detects that the first feature parameter does not exist in the service host parameter set;

a second prompt information generating unit 816, configured to generate and send second prompt information when the host APP unit 810 detects that the second characteristic parameter does not exist in the service path parameter set;

a third prompt information generating unit 817, configured to generate and send third prompt information when the host APP unit 810 detects that the matching between the third characteristic parameter and the service protocol information fails;

a fourth prompt information generating unit 818, configured to generate and send fourth prompt information when the host APP unit 810 detects that the URL to be identified has a null value.

In addition, referring to fig. 8, in an embodiment of the present application, the SDK unit 820 includes a service object creation unit 821 and a service data transmission unit 822;

a service object creating unit 821, configured to create a service object according to the service URL when the SDK unit 820 acquires a new service URL, where the service object includes a service host number parameter and a service path parameter;

a service data sending unit 822, configured to store the service host parameter into the service host number parameter set, store the service path parameter into the service path parameter set, and send the service host parameter set and the service path parameter set to the host APP unit 810.

In addition, referring to fig. 8, in an embodiment of the present application, the SDK unit 820 further includes a service object re-creation unit 823; a service object re-creation unit 823 for re-creating a new service object in case the SDK unit 820 detects that the service path parameters in the service object already exist in the set of service path parameters.

In addition, referring to fig. 9, fig. 9 is a structural diagram of an electronic device according to another embodiment of the present invention, and an embodiment of the present invention further provides an electronic device 900, where the electronic device 900 includes: memory 910, processor 920, and computer programs stored on memory 910 and operable on processor 920.

The processor 920 and the memory 910 may be connected by a bus or other means.

Non-transitory software programs and instructions required to implement the URL-based service processing method of the above-described embodiment are stored in the memory 910, and when executed by the processor 920, perform the URL-based service processing method of the above-described embodiment, for example, the method steps S110 to S150 in fig. 1, the method steps S210 to S230 in fig. 2, the method step S310 in fig. 3, the method steps S410 to S440 in fig. 4, the method steps S510 to S520 in fig. 5, and the method step S610 in fig. 6, which are described above.

The above-described embodiments of the apparatus are merely illustrative, wherein the units illustrated as separate components may or may not be physically separate, i.e. may be located in one place, or may also be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.

Furthermore, an embodiment of the present invention further provides a storage medium, where the storage medium stores computer-executable instructions, and the computer-executable instructions are executed by a processor 920 or a controller, for example, by a processor 920 in the embodiment of the electronic device 900, so that the processor 920 may execute the URL-based service processing method in the embodiment, for example, execute the method steps S110 to S150 in fig. 1, the method steps S210 to S230 in fig. 2, the method step S310 in fig. 3, the method steps S410 to S440 in fig. 4, the method steps S510 to S520 in fig. 5, and the method step S610 in fig. 6 described above. One of ordinary skill in the art will appreciate that all or some of the steps, systems, and methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as is well known to those of ordinary skill in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by a computer. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.

While the preferred embodiments of the present invention have been described in detail, it will be understood by those skilled in the art that the foregoing and various other changes, omissions and deviations in the form and detail thereof may be made without departing from the scope of this invention.

17页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:数据处理方法、装置、电子设备及存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!