Interface request processing method, server, system and storage medium
By dynamically adjusting the domain name and path matching of interface requests, the problem of code redundancy in the communication between the vehicle-mounted client and the server is solved, and access efficiency is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- PATEO CONNECT (NANJING) CO LTD
- Filing Date
- 2022-09-06
- Publication Date
- 2026-04-24
AI Technical Summary
When the vehicle infotainment client communicates with the server, existing technologies suffer from code redundancy due to differences in the domain names and paths of interface requests under different functional environments, which affects access efficiency.
By receiving interface requests from the vehicle's infotainment system client, the system dynamically adjusts the matching of request domain names and paths to generate new interface requests, thereby reducing code redundancy.
By reducing the differences in domain names and paths for interface requests under different functional environments, the efficiency of vehicle-mounted client accessing the server is improved.
Smart Images

Figure CN115442441B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and more specifically, to an interface request processing method, server, system, and storage medium. Background Technology
[0002] An API request is a crucial condition for accessing the server. It allows us to obtain the desired response after entering the corresponding API request in the vehicle's infotainment system client. An API request includes the domain name and the API path. Typically, the pre-deployed API paths on the server are the same; different API requests only differ in their domain names.
[0003] However, when different interface paths need to be pre-deployed in the server according to different functional environments, different interface requests will have different domain names and interface paths, which will result in a lot of code redundancy and affect the access efficiency of the vehicle's client. Summary of the Invention
[0004] The first aspect of this application is to provide an interface request processing method. When an interface request is received from a vehicle infotainment client, the method dynamically adjusts the matching request interface path according to the request domain name in the interface request to re-form a new interface request corresponding to the request domain name. This allows the vehicle infotainment client to form interface requests for accessing different functional environments in the server without having to form interface requests with different domain names and interface paths, thus reducing code redundancy.
[0005] To achieve the above objectives, the interface request processing method provided in this application includes: in response to receiving an interface request sent by the vehicle-mounted client, determining the request domain name and request interface path in the interface request; determining the target interface path that matches the request domain name based on the request domain name; and in response to determining that the request interface path is different from the target interface path, regenerating the interface request based on the request domain name and the target interface path; or, in response to determining that the request interface path is the same as the target interface path, returning the response content of the interface request.
[0006] A second aspect of this application provides a server, comprising: a processor; and a memory communicatively connected to the processor. The memory stores a program executable by the processor, which, when executed by the processor, performs the following steps: in response to receiving an interface request sent by a vehicle-mounted client, determining the request domain name and request interface path in the interface request; determining a target interface path matching the request domain name based on the request domain name; and in response to determining that the request interface path is different from the target interface path, regenerating the interface request based on the request domain name and the target interface path; or, in response to determining that the request interface path is the same as the target interface path, returning the response content of the interface request.
[0007] A third aspect of this application is to provide an interface request processing system, comprising: a server provided according to a second aspect of this application; and a vehicle-mounted client, wherein the vehicle-mounted client is communicatively connected to the server, and the vehicle-mounted client is configured to form interface requests for different target environments based on request domain names for different target environments and the same request interface path, and send the interface requests to the server.
[0008] A fourth aspect of this application is to provide a readable storage medium storing a computer program, which, when executed by a processor, implements the following steps: in response to receiving an interface request sent by a vehicle-mounted client, determining the request domain name and the request interface path in the interface request; determining the target interface path matching the request domain name based on the request domain name; and in response to determining that the request interface path is different from the target interface path, regenerating the interface request based on the request domain name and the target interface path; or, in response to determining that the request interface path is the same as the target interface path, returning the response content of the interface request. Attached Figure Description
[0009] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings. Wherein:
[0010] Figure 1 This is a schematic diagram of a system architecture applicable to the interface request processing method according to the embodiments of this application;
[0011] Figure 2 This is a flowchart illustrating the interface request processing method according to an embodiment of this application;
[0012] Figure 3 This is a flowchart illustrating step S210 according to an embodiment of this application;
[0013] Figure 4 This is a flowchart illustrating step S220 according to an embodiment of this application;
[0014] Figure 5 This is a flowchart illustrating step S230 according to an embodiment of this application;
[0015] Figure 6 This is a flowchart illustrating step S233 of embodiment one of this application;
[0016] Figure 7 This is a flowchart illustrating step S233 of embodiment two of this application; and
[0017] Figure 8 This is a schematic diagram of the server structure according to an exemplary embodiment of this application. Detailed Implementation
[0018] To better understand this application, various aspects of this application will be described in more detail with reference to the accompanying drawings. It should be understood that these detailed descriptions are merely illustrative of exemplary embodiments of this application and are not intended to limit the scope of this application in any way. Throughout the specification, the same reference numerals refer to the same elements. The expression "and / or" includes any and all combinations of one or more of the associated listed items.
[0019] It should also be understood that expressions such as "comprising," "including," "having," "containing," and / or "comprising" are open-ended rather than closed-ended expressions in this specification, indicating the presence of the stated features but not excluding the presence of one or more other features and / or combinations thereof. Furthermore, when describing embodiments of this application, the word "may" is used to mean "one or more embodiments of this application." And the term "exemplary" is intended to refer to examples or illustrations.
[0020] Unless otherwise specified, all terms used herein (including engineering and technical terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. It should also be understood that, unless expressly stated herein, terms defined in common dictionaries shall be interpreted as having the meaning consistent with their meaning in the context of the relevant art, and not as having an idealized or overly formalized meaning.
[0021] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. Furthermore, unless explicitly limited or contradicted by the context, the specific steps included in the methods described in this application are not limited to the order in which they are described, but can be performed in any order or in parallel. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0022] An exemplary embodiment of this application proposes an interface request processing method, including: in response to receiving an interface request sent by a vehicle-mounted client, determining the request domain name and request interface path in the interface request; determining a target interface path matching the request domain name based on the request domain name; and in response to determining that the request interface path is different from the target interface path, regenerating the interface request based on the request domain name and the target interface path; or, in response to determining that the request interface path is the same as the target interface path, returning the response content of the interface request. Through this scheme, when an interface request is received from a vehicle-mounted client, the matching request interface path is dynamically adjusted according to the request domain name in the interface request to regenerate a new interface request corresponding to the request domain name. This avoids generating interface requests with different domain names and interface paths when the vehicle-mounted client generates interface requests for accessing different functional environments in the server, reducing code redundancy.
[0023] In the following sections, specific examples of this solution will be described in more detail with reference to the accompanying drawings.
[0024] Figure 1 An exemplary system architecture 100 suitable for applying the interface request processing method according to an exemplary embodiment of this application is shown. System architecture 100 includes a server 110 and a vehicle-mounted client 120, which is communicatively connected to the server 110. Before implementing the interface request processing method of this application, relevant parameters of the vehicle-mounted client 120 and the server 110 should be deployed. The following is an exemplary description of the deployment of relevant parameters of the vehicle-mounted client 120 and the server 110.
[0025] Server 110 Deployment
[0026] Normally, different environments on server 110 only differ in domain name; the interface paths are the same. However, due to differences in deployed services or the specific requirements of third-party services, the interface paths deployed in different environments may also differ.
[0027] As an example,
[0028] Test environment domain: https: / / uat.xxx.com.cn;
[0029] Test environment function interface path: / push / test;
[0030] Deployment environment domain: https: / / pro.xxx.com.cn;
[0031] The path to the deployment environment's functional interface is: / api / push / test.
[0032] As can be seen, the domain name is different in different environments. However, for the same functional interface, the interface path deployed in the production environment is also different from that deployed in the test environment. The interface path deployed in the production environment adds " / api" compared to the interface path deployed in the test environment.
[0033] For network interface design, the test environment functional interface and the release environment functional interface mentioned above are different interfaces with different functions. However, in actual scenarios, their functions are the same.
[0034] It should be noted that the above are only exemplary embodiments of the domain names and interface paths of different services provided by server 110. It is understood that other domain names and interface paths may also be deployed in server 110 according to actual needs.
[0035] Vehicle-mounted client 120 deployment
[0036] To address the scenario where the interface paths in server 110 differ depending on the environment, the vehicle client 120 is deployed accordingly to support dynamic adjustment of the interface paths in different environments.
[0037] First, the request domain names for the vehicle-mounted client 120 to access the server 110 in different environments (test environment and release environment) are defined as request domain name 1 and request domain name 2, respectively.
[0038] Request domain 1: https: / / uat.xxx.com.cn.
[0039] Request domain 2: https: / / pro.xxx.com.cn.
[0040] Then, define the request interface paths for the vehicle infotainment client 120 to access the server 110 in different environments (test environment and release environment).
[0041] To reduce code redundancy, this application defines only one request interface path in the vehicle infotainment client 120.
[0042] As a first example, the request interface path can be uniformly deployed as / api / push / test.
[0043] As a second example, the request interface path can be uniformly deployed as / push / test.
[0044] The vehicle-mounted infotainment client generates an interface request 120.
[0045] When the vehicle-mounted client 120 accesses different environment interfaces of the server 110 via HTTP, it will generate interface requests.
[0046] As an example, an interface request is generated by directly concatenating the request domain name and the request interface path.
[0047] Based on the first example of the vehicle-mounted client 120 deploying the request interface path, when accessing the test environment function interface and the release environment function interface of server 110, the following two types of request links will be generated:
[0048] Interface request for accessing the test environment functional interfaces:
[0049] https: / / uat.xxx.com.cn / api / push / test.
[0050] Interface request to access the publishing environment functionality interface:
[0051] https: / / pro.xxx.com.cn / api / push / test.
[0052] Based on the second example of the vehicle-mounted client 120's deployment of request interface paths, when accessing the test environment function interface and the release environment function interface of server 110, the following two types of request links will be generated:
[0053] Interface request for accessing the test environment functional interfaces:
[0054] https: / / uat.xxx.com.cn / push / test.
[0055] Interface request to access the publishing environment functionality interface:
[0056] https: / / pro.xxx.com.cn / push / test.
[0057] When the vehicle-mounted client 120 sends the aforementioned interface request to the server 110 to obtain the corresponding response content, the server 110 processes the aforementioned interface request according to the interface request processing method 200 provided in the exemplary embodiment of this application.
[0058] Figure 2 A flowchart of an interface request processing method 200 according to an embodiment of this application is shown. The interface request processing method 200 can... Figure 1 This is executed in server 110 as shown. Figure 2 As shown, the execution of interface request processing method 200 includes the following steps:
[0059] S210. In response to receiving an interface request sent by the vehicle-mounted client, determine the request domain name and request interface path in the interface request;
[0060] S220. Determine the target interface path that matches the requested domain name based on the requested domain name; and
[0061] S230. In response to determining that the requested interface path is different from the target interface path, regenerate the interface request based on the request domain name and the target interface path; or, in response to determining that the requested interface path is the same as the target interface path, return the response content of the interface request.
[0062] It should be understood that the steps shown in the interface request processing method 200 are not exclusive, and the method 200 may also include additional steps not shown and / or the steps shown may be omitted, and the scope of this application is not limited in this respect.
[0063] The following reference Figures 1 to 7 Steps S210 to S230 are described in detail using a first example of deployment based on the request interface path of the vehicle-mounted client 120.
[0064] S210
[0065] After the server 110 receives the interface request sent by the vehicle-mounted client 120, it determines the request domain name and request interface path in the interface request.
[0066] In some implementations, such as Figure 3 As shown, the steps to determine the request domain name and request interface path in an interface request include:
[0067] S211. Determine the rules for forming interface requests; and
[0068] S212. Based on the rules, parse the interface request to determine the request domain name and request interface path in the interface request.
[0069] The rules for forming the interface request in step S211 are pre-deployed in the vehicle-mounted client 120. For example, the interface request can be formed by directly concatenating the request domain name and the request interface path, or by encrypting the request domain name and / or the request interface path. The vehicle-mounted client 120 should send the pre-deployed rules for forming the interface request to the client so that the client can parse the interface request in step S212 to obtain the request domain name and request interface path in the interface request.
[0070] As an example, when server 110 receives an interface request from vehicle client 120 for https: / / uat.xxx.com.cn / api / push / test, and the rule for the interface request determined in step S211 is that the request domain name and the request interface path are directly concatenated, then in step S212, the request domain name in the interface request can be determined to be https: / / uat.xxx.com.cn / , and the request interface path can be determined to be api / push / test.
[0071] When server 110 receives an interface request from vehicle client 120 for https: / / pro.xxx.com.cn / api / push / test, and the rule for the interface request determined in step S211 is that the request domain name and the request interface path are directly concatenated, then in step S212, the request domain name in the interface request can be determined to be https: / / pro.xxx.com.cn / , and the request interface path can be determined to be api / push / test.
[0072] S220
[0073] After the request domain name in the interface request is determined in step S210, the target interface path that matches the request domain name is determined in step S220.
[0074] In some implementations, such as Figure 4 As shown, step S220 includes:
[0075] S221. Determine the target environment for the outgoing interface request based on the requested domain name; and
[0076] S222. Determine the target interface path from the pre-set configuration file based on the target environment.
[0077] As described above, server 110 pre-deploys domain names for different environments and their corresponding interface paths. Optionally, the pre-deployed domain names for multiple environments and their corresponding interface paths are stored in a configuration file. When server 110 receives an interface request sent by vehicle client 120 and determines the request domain name in the interface request, it can determine the target environment of the interface request in step S221, and then query the target interface path corresponding to the target environment from the configuration file in step S222.
[0078] As an example, when the request domain name in the interface request is determined to be https: / / uat.xxx.com.cn / in step S210, the target environment of the interface request is determined to be the test environment in step S221, and then the target interface path corresponding to the test environment is determined to be / push / test in step S222.
[0079] When the request domain name in the interface request is determined to be https: / / pro.xxx.com.cn / in step S210, the target environment of the interface request is determined to be the test environment in step S221, and then the target interface path corresponding to the test environment is determined to be / api / push / test in step S222.
[0080] S230
[0081] After determining the request domain name and request interface path in the interface request in step S210, and determining the target interface path corresponding to the request domain name pre-deployed in server 110 in step S220, the following steps are performed in step S230, referring to... Figure 5 As shown:
[0082] S231. Determine whether the request interface path in the interface request is the same as the determined target interface path. If they are the same, proceed to step S232; if they are not the same, proceed to step S233.
[0083] S232, Return the response content of the interface request; and
[0084] S233. Regenerate a new interface request based on the request domain name and the target interface path, and return the response content of the new interface request.
[0085] If the server 110 determines in step S231 that the requested interface path in the interface request is the same as the determined target interface path, then in step S232, it returns the response content to the vehicle client 120 according to the interface request.
[0086] As an example, when server 110 determines in step S210 that the request domain name in the interface request is https: / / pro.xxx.com.cn / , the request interface path is api / push / test, and in step S220 determines that the target interface path is api / push / test, and in step S231 determines that the request interface path and the target interface path are the same, then server 110 knows from the interface request that the interface request is to access the relevant content of the publishing environment, and in step S232 returns the relevant content of the publishing environment to the vehicle client 120.
[0087] If the server 110 determines in step S231 that the requested interface path in the interface request is different from the determined target interface path, the interface request should be dynamically adjusted so that the server 110 can return the response content. In step S233, the interface request is regenerated based on the request domain name and the target interface path.
[0088] This application provides two exemplary implementations of the method for regenerating the interface request based on the request domain name and the target interface path in step S233.
[0089] Method 1
[0090] like Figure 6 As shown, step S233, which involves regenerating a new interface request based on the request domain name and the target interface path, includes:
[0091] S2331, Obtain the rules for concatenating the requested domain name and the target interface path; and
[0092] S2332. According to the concatenation rules, concatenate the request domain name and the target interface path to obtain a new interface request.
[0093] Optionally, when the server 110 obtains in step S2331 that the concatenation rule of the request domain name and the target interface path is direct concatenation, it can combine the request domain name and the target interface path to form a new interface request in step S2332.
[0094] When server 110 determines in step S210 that the request domain name in the interface request is https: / / uat.xxx.com.cn / and the request interface path is api / push / test, and in step S220 determines that the target interface path is / push / test, and in step S231 it determines that the request interface path and the target interface path are different, then in step S2332, the request domain name "https: / / uat.xxx.com.cn / " and the target interface path " / push / test" are directly concatenated to form a new interface request "https: / / uat.xxx.com.cn / push / test". Based on the new interface request, server 110 knows that the interface request is for accessing relevant content of the test environment and returns the relevant content of the test environment to the vehicle-mounted client 120.
[0095] Alternatively, if the concatenation rule of the request domain name and the target interface path obtained in step S2331 is to encrypt them before concatenation, the request domain name and / or the target interface path can be encrypted according to a preset encryption method in step S2332 and then combined to form a new interface request.
[0096] The encryption method can be any technique known in the art, and this application will not elaborate on it further.
[0097] Method 2
[0098] like Figure 7 As shown, step S233, which involves regenerating a new interface request based on the request domain name and the target interface path, includes:
[0099] S2331' Determine the difference between the requested interface path and the target interface path; and
[0100] S2332' Modify the interface request based on the differences to obtain a new interface request.
[0101] As an example, when server 110 determines in step S210 that the request domain name in the interface request is https: / / uat.xxx.com.cn / and the request interface path is api / push / test, and in step S220 determines that the target interface path is / push / test, and in step S231 it is determined that the request interface path and the target interface path are different, then in S2331' it is determined that the difference between the request interface path and the target interface path is the addition of "api / " to the request interface path. At this time, in step S2332', "api / " is deleted from the original interface request "https: / / uat.xxx.com.cn / api / push / test" to generate a new interface request "https: / / uat.xxx.com.cn / push / test". Server 110 knows from the new interface request that the interface request is to access the relevant content of the test environment, and returns the relevant content of the test environment to the vehicle client 120.
[0102] It should be noted that the above deletion of "api / " is only an example of the interface path deployed on server 110. When the interface path deployed on server 110 is in other forms, it should be modified to other paths according to the actual needs.
[0103] Refer to the following again Figures 1 to 7 Steps S210 to S230 are described in detail using a second example of deployment based on the request interface path of the vehicle-mounted client 120.
[0104] S210
[0105] After the server 110 receives the interface request sent by the vehicle-mounted client 120, it determines the request domain name and request interface path in the interface request.
[0106] In some implementations, such as Figure 3As shown, the steps to determine the request domain name and request interface path in an interface request include:
[0107] S211. Determine the rules for forming interface requests; and
[0108] S212. Based on the rules, parse the interface request to determine the request domain name and request interface path in the interface request.
[0109] The rules for forming the interface request in step S211 are pre-deployed in the vehicle-mounted client 120. For example, the interface request can be formed by directly concatenating the request domain name and the request interface path, or by encrypting the request domain name and / or the request interface path. The vehicle-mounted client 120 should send the pre-deployed rules for forming the interface request to the client so that the client can parse the interface request in step S212 to obtain the request domain name and request interface path in the interface request.
[0110] As an example, when server 110 receives an interface request from vehicle-mounted client 120 for https: / / uat.xxx.com.cn / push / test, and the rule for the interface request determined in step S211 is that the request domain name and the request interface path are directly concatenated, then in step S212, the request domain name in this interface request can be determined to be https: / / uat.xxx.com.cn / , and the request interface path to be push / test.
[0111] When server 110 receives an interface request from vehicle-mounted client 120 for https: / / pro.xxx.com.cn / api / push / test, and the interface request rule determined in step S211 is that the request domain name and the request interface path are directly concatenated, then in step S212, the request domain name in this interface request can be determined to be https: / / pro.xxx.com.cn / , and the request interface path to be push / test.
[0112] S220
[0113] After the request domain name in the interface request is determined in step S210, the target interface path that matches the request domain name is determined in step S220.
[0114] In some implementations, such as Figure 4 As shown, step S220 includes:
[0115] S221. Determine the target environment for the outgoing interface request based on the requested domain name; and
[0116] S222. Determine the target interface path from the pre-set configuration file based on the target environment.
[0117] As described above, server 110 pre-deploys domain names for different environments and their corresponding interface paths. Optionally, the pre-deployed domain names for multiple environments and their corresponding interface paths are stored in a configuration file. When server 110 receives an interface request sent by vehicle client 120 and determines the request domain name in the interface request, it can determine the target environment of the interface request in step S221, and then query the target interface path corresponding to the target environment from the configuration file in step S222.
[0118] As an example, when the request domain name in the interface request is determined to be https: / / uat.xxx.com.cn / in step S210, the target environment of the interface request is determined to be the test environment in step S221, and then the target interface path corresponding to the test environment is determined to be / push / test in step S222.
[0119] When the request domain name in the interface request is determined to be https: / / pro.xxx.com.cn / in step S210, the target environment of the interface request is determined to be the test environment in step S221, and then the target interface path corresponding to the test environment is determined to be / api / push / test in step S222.
[0120] S230
[0121] After determining the request domain name and request interface path in the interface request in step S210, and determining the target interface path corresponding to the request domain name pre-deployed in server 110 in step S220, the following steps are performed in step S230, referring to... Figure 5 As shown:
[0122] S231. Determine whether the request interface path in the interface request is the same as the determined target interface path. If they are the same, proceed to step S232; if they are not the same, proceed to step S233.
[0123] S232. Return the response content of the interface request;
[0124] S233. Regenerate a new interface request based on the request domain name and the target interface path, and return the response content of the new interface request.
[0125] If the server 110 determines in step S231 that the requested interface path in the interface request is the same as the determined target interface path, then in step S232, it returns the response content to the vehicle client 120 according to the interface request.
[0126] As an example, when server 110 determines in step S210 that the request domain name in the interface request is https: / / uat.xxx.com.cn / and the request interface path is push / test, and in step S220 determines that the target interface path is / push / test, and in step S231 determines that the request interface path and the target interface path are the same, then in step S232, it sends the response content to the vehicle client 120.
[0127] If the server 110 determines in step S231 that the requested interface path in the interface request is different from the determined target interface path, the interface request should be dynamically adjusted so that the server 110 can return the response content. In step S233, the interface request is regenerated based on the request domain name and the target interface path.
[0128] This application provides two exemplary implementations of the method for regenerating the interface request based on the request domain name and the target interface path in step S233.
[0129] Method 1
[0130] like Figure 6 As shown, step S233, which involves regenerating a new interface request based on the request domain name and the target interface path, includes:
[0131] S2331, Obtain the rules for concatenating the requested domain name and the target interface path; and
[0132] S2332. According to the concatenation rules, concatenate the request domain name and the target interface path to obtain a new interface request.
[0133] Optionally, if the server 110 obtains the concatenation rule of the request domain name and the target interface path in step S2331 as a direct concatenation method, the request domain name and the target interface path can be combined to form a new interface request in step S2332.
[0134] When server 110 determines in step S210 that the request domain name in the interface request is https: / / pro.xxx.com.cn / and the request interface path is push / test, and in step S220 determines that the target interface path is / api / push / test, and in step S231 determines that the request interface path and the target interface path are different, then in step S2332, the request domain name "https: / / pro.xxx.com.cn / " and the target interface path " / api / push / test" are directly concatenated to form a new interface request "https: / / pro.xxx.com.cn / api / push / test". Based on the new interface request, server 110 knows that the interface request is a request to access the relevant content of the publishing environment, and returns the relevant content of the publishing environment to the vehicle client 120.
[0135] Alternatively, if the concatenation rule of the request domain name and the target interface path obtained in step S2331 is to encrypt them before concatenation, the request domain name and / or the target interface path can be encrypted according to a preset encryption method in step S2332 and then combined to form a new interface request.
[0136] Method 2
[0137] like Figure 7 As shown, step S233, which involves regenerating a new interface request based on the request domain name and the target interface path, includes:
[0138] S2331' Determine the difference between the requested interface path and the target interface path; and
[0139] S2332' Modify the interface request based on the differences to obtain a new interface request.
[0140] As an example, when server 110 determines in step S210 that the request domain name in the interface request is https: / / pro.xxx.com.cn / and the request interface path is push / test, and in step S220 determines that the target interface path is api / push / test, and in step S231 it determines that the request interface path and the target interface path are different, then in S2331' it is determined that the difference between the request interface path and the target interface path is the removal of "api / " from the target interface path. At this time, in step S2332', "api / " is added to the original interface request "https: / / pro.xxx.com.cn / push / test" to generate a new interface request "https: / / pro.xxx.com.cn / api / push / test". Server 110 knows from the new interface request that the interface request is to access the relevant content of the publishing environment, and returns the relevant content of the publishing environment to the vehicle client 120.
[0141] also, Figure 8 A block diagram schematically illustrates a server suitable for implementing exemplary embodiments of this application. Server 110 may be used to implement execution... Figure 2 The devices for the various methods described herein.
[0142] like Figure 8 As shown, server 110 includes processor 111, which can execute various appropriate steps and processes according to computer program instructions stored in read-only memory (ROM) 112 or loaded from memory 118 into random access memory (RAM) 113. RAM 113 may also store various programs and data required for the operation of server 110. Processor 111, ROM 112, and RAM 113 are interconnected via bus 114. Input / output (I / O) interface 115 is also connected to bus 114.
[0143] Server 110 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, and other suitable computers. The server may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present application described and / or claimed herein.
[0144] Multiple components in server 110 are connected to I / O interface 115, including: input unit 116, such as keyboard, stylus, etc.; output unit 117, such as various types of displays, speakers, etc.; memory 118, such as disk, external hard drive, etc.; and communication unit 119, such as network card, modem, wireless transceiver, etc. Communication unit 119 allows server 110 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0145] Processor 111 can be a variety of general-purpose and / or special-purpose processing units with processing and computing capabilities. Some examples of processor 111 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 111 can perform the various methods and processes described above, such as performing method 200. For example, in some embodiments, method 200 can be implemented as a computer software program stored in a machine-readable medium, such as memory 118. In some embodiments, part or all of the computer program can be loaded and / or installed on server 110 via ROM 112 and / or communication unit 119. When the computer program is loaded into RAM 113 and executed by processor 111, one or more steps of method 200 described above can be performed. Alternatively, in other embodiments, processor 111 can be configured to perform one or more steps of method 200 by any other suitable means (e.g., by means of firmware).
[0146] It should be further noted that this application may include methods, apparatus, systems, and / or computer program products. A computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of this application.
[0147] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example, but not limited to, electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination thereof. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.
[0148] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to computer-readable storage media within the respective computing / processing device.
[0149] The computer program instructions used to perform the operations of this application may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as C or similar languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuits, such as programmable logic circuits, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), are personalized by utilizing the status information of the computer-readable program instructions. These electronic circuits can execute the computer-readable program instructions to implement various aspects of this application.
[0150] Various aspects of this application are described herein with reference to flowchart illustrations and / or timing diagrams of methods, apparatus (systems), and computer program products according to exemplary embodiments of this application. It should be understood that each step of the flowchart illustrations and / or timing diagrams, as well as combinations of steps in the flowchart illustrations and / or timing diagrams, can be implemented by computer-readable program instructions.
[0151] These computer-readable program instructions can be provided to a processor in a voice interaction device, a general-purpose computer, a special-purpose computer, or a processing unit of another programmable data processing device, thereby producing a machine such that, when executed by the processing unit of the computer or other programmable data processing device, these instructions create means for implementing the functions / steps specified in one or more steps of a flowchart and / or timing diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing device, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / steps specified in one or more steps of a flowchart and / or timing diagram.
[0152] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / steps specified in one or more steps of a flowchart and / or timing diagram.
[0153] The flowcharts and timing diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of devices, methods, and computer program products according to various embodiments of this application. In this regard, each step in a flowchart or timing diagram may represent a module, segment, or part of an instruction that contains one or more executable instructions for implementing a specified logical function. In some alternative embodiments, the functions indicated in the steps may occur in a different order than those indicated in the drawings. For example, two consecutive steps may actually be performed substantially in parallel, and they may sometimes be performed in reverse order, depending on the functions involved. It should also be noted that each step in a timing diagram and / or flowchart, and combinations of steps in timing diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0154] The above description is merely a preferred embodiment of this application and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in this application is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the inventive concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this application.
[0155] The above description is merely an illustration of the embodiments of this application and the technical principles employed. Those skilled in the art should understand that the scope of protection involved in this application is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the technical concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions disclosed in this application.
Claims
1. An interface request processing method, characterized in that, The method includes: In response to receiving an interface request from the vehicle infotainment client, the request domain name and request interface path in the interface request are determined; Retrieve the configuration file; wherein the configuration file includes multiple target interface paths, and each of the multiple target interface paths corresponds to a multiple target environment; Based on the requested domain name, determine the target interface path that matches the requested domain name; and In response to determining that the requested interface path is different from the target interface path, the interface request is regenerated based on the request domain name and the target interface path; The step of regenerating a new interface request based on the request domain name and the target interface path includes: Obtain the concatenation rules for the requested domain name and the target interface path; and The request domain name and the target interface path are concatenated according to the concatenation rules to obtain a new interface request; or, Determine the difference between the requested interface path and the target interface path; and Modify the interface request based on the differences to obtain a new interface request.
2. The method according to claim 1, wherein, The steps for determining the request domain name and request interface path in the interface request include: Determine the rules that form the interface request; and The interface request is parsed based on the rules to determine the request domain name and request interface path in the interface request.
3. The method according to claim 1, wherein, The steps for determining the target interface path that matches the request domain name include: The target environment for the interface request is determined based on the requested domain name; and The target interface path is determined from the pre-set configuration file based on the target environment.
4. The method according to claim 1, wherein, The multiple target environments include at least a test environment and a release environment, and the multiple target interface paths include a test environment function interface corresponding to the test environment and a release environment function interface corresponding to the release environment.
5. A server, characterized in that, include: processor; as well as The memory is communicatively connected to the processor. The memory stores a program that can be executed by a processor. When the program is executed by the processor, the processor is able to execute the interface request processing method according to any one of claims 1 to 4.
6. An interface request processing system, characterized in that, include: The server according to claim 5; as well as The vehicle-mounted client is connected to the server. The vehicle-mounted client is configured to generate interface requests for different target environments based on request domain names for different target environments and the same request interface path, and send the interface requests to the server.
7. A readable storage medium, characterized in that, A computer program is stored on a readable storage medium, which, when executed by a processor, implements the interface request processing method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Access request processing method and related equipment
CN109088764A