Application configuration methods, devices, computer equipment, and storage media
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-14
- Publication Date
- 2026-08-14
AI Technical Summary
[0003]而当应用B存在多个版本号,比如B存在1.1.1、1.0.2等版本,但并不存在1.0.5版本,当应用A请求时如果选择了1.0.5版本时,网关就会出现路由不到的情况,就会出现请求报错,从而使得应用程序的配置请求失败
[0046]上述应用程序的配置方法、装置、计算机设备和存储介质,通过获取请求信息,并在网关内存中,查询所述请求信息对应的网关配置信息;在所述网关内存中不存在所述请求信息对应的网关配置信息时,识别所述请求信息对应的版本信息,并基于所述版本信息,通过版本适配策略,查询所述请求信息需求的应用程序适配的目标版本的网关配置信息;执行所述网关配置信息对应的网关流程。本方案通过语义网关调整策略,在请求信息无法匹配到对应的网关配置信息时,适配适用当前版本的版本信息对应额网关配置信息,从而配置所述请求信息对应的网关应用程序,从而确保请求信息不会因为版本不匹配的问题进行报错,导致应用程序配置失败的问题,从而提升了应用程序的配置请求的成功率。
Smart Images

Figure CN118337622B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of unified gateway technology, and in particular to a method, apparatus, computer device, and storage medium for configuring an application. Background Technology
[0002] After receiving a request message, the gateway engine selects the corresponding route selector based on the request path, request method, and version number of the current request message. The route selector then routes the request to the corresponding downstream application. For example, when application A requests application B, application A sends the request path, request method, and version number of application B. The gateway then finds the corresponding route selector based on the request path, request method, and version number, and directly calls application B according to the route selector.
[0003] If application B has multiple version numbers, such as versions 1.1.1 and 1.0.2, but not version 1.0.5, and application A selects version 1.0.5 when making a request, the gateway will be unable to route the request, resulting in a request error and causing the application's configuration request to fail. Summary of the Invention
[0004] Therefore, it is necessary to provide an application configuration method, apparatus, computer device, computer-readable storage medium, and computer program product to address the aforementioned technical problems.
[0005] Firstly, this application provides a method for configuring an application. The method includes:
[0006] Obtain the request information and query the gateway configuration information corresponding to the request information in the gateway memory;
[0007] When the gateway configuration information corresponding to the request information does not exist in the gateway memory, the version information corresponding to the request information is identified, and based on the version information, the gateway configuration information of the target version that the application required by the request information is adapted to is queried through the version adaptation strategy.
[0008] Execute the gateway process corresponding to the gateway configuration information to obtain the target application required by the request information.
[0009] Optionally, before querying the gateway configuration information corresponding to the request information in the gateway memory, the method further includes:
[0010] Extract the request method, request path, and application version number required by the request information;
[0011] Based on the request method, the request path, and the application version number, construct the query information corresponding to the request information.
[0012] Optionally, querying the gateway configuration information corresponding to the request information in the gateway memory includes:
[0013] Based on the query information, the cache information corresponding to the request information is matched in the gateway memory;
[0014] When cached information corresponding to the request information exists in the gateway memory, the gateway configuration information corresponding to the cached information is identified, and the gateway configuration information is used as the gateway configuration information corresponding to the request information.
[0015] Optionally, identifying the version information corresponding to the request information includes:
[0016] Based on the application version number of the requested information requirement, identify the major version number, minor version number, revision version number, and current version number of the requested information requirement.
[0017] Based on the values of the major version number, the minor version number, the revision version number, and the current version number, the major version number, the minor version number, the revision version number, and the current version number are sorted to obtain a version number sequence.
[0018] Based on the values of the major version number, the minor version number, the revision version number, the current version number, and the version number sequence, the version information corresponding to the request information is determined.
[0019] Optionally, based on the version information, the step of querying the gateway configuration information of the target version of the application required by the request information through a version adaptation strategy includes...
[0020] Determine whether the major version number, the minor version number, and the revision version number are the same. If the major version number, the minor version number, and the revision version number are the same, filter the configuration information corresponding to the version number with the lower value in the version number sequence as the gateway configuration information of the target version of the application required by the request information.
[0021] When the major version number, the minor version number, and the revision version number are different, the priority level of each version number is identified, and the configuration information corresponding to the version number with the highest priority level is selected as the gateway configuration information for the target version of the application required by the request information.
[0022] Optionally, if gateway configuration information corresponding to the request information exists in the gateway memory, the method further includes:
[0023] Identify the configuration process corresponding to the gateway configuration information and the configuration content of the gateway configuration information, and based on the configuration content, execute the gateway configuration process corresponding to the request information through the configuration process to obtain the target application corresponding to the request information.
[0024] Secondly, this application also provides an application configuration device. The device includes:
[0025] The acquisition module is used to acquire request information and query the gateway configuration information corresponding to the request information in the gateway memory;
[0026] The query module is used to identify the version information corresponding to the request information when the gateway configuration information corresponding to the request information does not exist in the gateway memory, and based on the version information, query the gateway configuration information of the target version that the application required by the request information is adapted to through a version adaptation strategy.
[0027] The execution module is used to execute the gateway process corresponding to the gateway configuration information to obtain the target application required by the request information.
[0028] Optionally, the device further includes:
[0029] The extraction module is used to extract the request method, the request path, and the application version number required by the request information.
[0030] The construction module is used to construct query information corresponding to the request information based on the request method, the request path, and the application version number.
[0031] Optionally, the acquisition module is specifically used for:
[0032] Based on the query information, the cache information corresponding to the request information is matched in the gateway memory;
[0033] When cached information corresponding to the request information exists in the gateway memory, the gateway configuration information corresponding to the cached information is identified, and the gateway configuration information is used as the gateway configuration information corresponding to the request information.
[0034] Optionally, the query module is specifically used for:
[0035] Based on the application version number of the requested information requirement, identify the major version number, minor version number, revision version number, and current version number of the requested information requirement.
[0036] Based on the values of the major version number, the minor version number, the revision version number, and the current version number, the major version number, the minor version number, the revision version number, and the current version number are sorted to obtain a version number sequence.
[0037] Based on the values of the major version number, the minor version number, the revision version number, the current version number, and the version number sequence, the version information corresponding to the request information is determined.
[0038] Optionally, the query module is specifically used for:
[0039] Determine whether the major version number, the minor version number, and the revision version number are the same. If the major version number, the minor version number, and the revision version number are the same, filter the configuration information corresponding to the version number with the lower value in the version number sequence as the gateway configuration information of the target version of the application required by the request information.
[0040] When the major version number, the minor version number, and the revision version number are different, the priority level of each version number is identified, and the configuration information corresponding to the version number with the highest priority level is selected as the gateway configuration information for the target version of the application required by the request information.
[0041] Optionally, the device further includes:
[0042] The identification module is used to identify the configuration process corresponding to the gateway configuration information and the configuration content of the gateway configuration information, and based on the configuration content, execute the gateway configuration process corresponding to the request information through the configuration process to obtain the target application corresponding to the request information.
[0043] Thirdly, this application provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the method described in any of the first aspects.
[0044] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method of any one of the first aspects.
[0045] Fifthly, this application provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the steps of the method of any one of the first aspects.
[0046] The aforementioned application configuration method, apparatus, computer device, and storage medium acquire request information and query the gateway configuration information corresponding to the request information in the gateway memory. If the gateway configuration information corresponding to the request information does not exist in the gateway memory, the version information corresponding to the request information is identified, and based on the version information, a version adaptation strategy is used to query the gateway configuration information for the target version of the application required by the request information. The gateway process corresponding to the gateway configuration information is then executed. This solution, through a semantic gateway adjustment strategy, adapts the gateway configuration information corresponding to the current version when the request information cannot be matched with the corresponding gateway configuration information. This configures the gateway application corresponding to the request information, ensuring that the request information does not report errors due to version mismatch, thus preventing application configuration failure and improving the success rate of application configuration requests. Attached Figure Description
[0047] Figure 1 This is a flowchart illustrating an application configuration method in one embodiment;
[0048] Figure 2 This is a flowchart illustrating an example of application configuration in one embodiment;
[0049] Figure 3 This is a structural block diagram of an application configuration device in one embodiment;
[0050] Figure 4 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0051] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0052] The application configuration method provided in this application embodiment can be applied to, for example, Figure 1The application environment shown is illustrated. This method can be applied to terminals, servers, and systems including both terminals and servers, and is implemented through interaction between the terminal and the server. The terminal can be, but is not limited to, various personal computers, laptops, smartphones, tablets, etc. The terminal, through a semantic gateway adjustment strategy, adapts to the gateway configuration information corresponding to the current version when the requested information cannot match the corresponding gateway configuration information. This configures the gateway application corresponding to the requested information, ensuring that the requested information does not report errors due to version mismatch, thus preventing application configuration failures and improving the success rate of application configuration requests.
[0053] In one embodiment, such as Figure 1 As shown, a method for configuring an application is provided. Taking the application of this method to a terminal as an example, the method includes the following steps:
[0054] Step S101: Obtain the request information and query the gateway configuration information corresponding to the request information in the gateway memory.
[0055] In this embodiment, the terminal receives a user's gateway configuration operation transmitted from the gateway engine container, obtaining request information for the application that the user needs to configure. This request information includes the user's request method, request path, and the version number of the requested application. Then, the terminal combines the request method, request path, and application version number from the request information to generate query information. Based on this query information, the terminal queries the gateway configuration information corresponding to the request information in the gateway's memory. This gateway configuration information contains the configuration content for the application requested by the request.
[0056] Step S102: When the gateway configuration information corresponding to the request information does not exist in the gateway memory, identify the version information corresponding to the request information, and based on the version information, query the gateway configuration information of the target version that the application required by the request information is adapted to through the version adaptation strategy.
[0057] In this embodiment, when the terminal does not have the gateway configuration information corresponding to the request information in the gateway memory, it identifies the version information corresponding to the request information and, based on the version information, queries the gateway configuration information of the target version of the application required by the request information through a version adaptation strategy. The version information consists of the version numbers of the application required by the request information, including major version number, minor version number, revision number, and current version number. The version information also includes a version number sequence sorted by the numerical values of each version number. For example, the numerical values of the major version number, minor version number, and revision number are: 1.1.0 < 1.1.1 < 2.1.0 < 2.1.1, where smaller values indicate earlier version numbers and larger values indicate later version numbers. The semantic gateway adjustment strategy is based on a semantic versioning algorithm to adjust application version information. This algorithm compares the major version number, minor version number, and revision version number, selecting the application version with a lower number than the current version. The major version number corresponds to the version number corresponding to incompatible API modifications made by the user; the minor version number corresponds to the version number corresponding to backward-compatible functional additions made by the user; and the revision version number corresponds to the version number corresponding to backward-compatible bug fixes made by the user. For example, if application B has multiple version numbers, such as 1.1.1, 1.0.2, etc., but not 1.0.5, when application A requests and selects to call application B's 1.0.5 version, the terminal first checks the cached information of version 1.0.5 (i.e., the gateway configuration information). If the cached information is not found, the terminal then uses the semantic versioning algorithm to find the appropriate version, such as 1.0.2, thereby ensuring that the engine request can be executed successfully. The specific execution process of the semantic gateway adjustment strategy will be explained in detail later.
[0058] Step S103: Execute the gateway process corresponding to the gateway configuration information to obtain the target application required by the request information.
[0059] In this embodiment, the terminal executes the gateway process corresponding to the gateway configuration information to obtain the target application required by the request information.
[0060] Based on the above solution, by adjusting the semantic gateway strategy, when the request information cannot match the corresponding gateway configuration information, the gateway configuration information corresponding to the current version information is adapted to configure the gateway application corresponding to the request information. This ensures that the request information will not report an error due to version mismatch, thus preventing application configuration failure and improving the success rate of application configuration requests.
[0061] Optionally, before querying the gateway configuration information corresponding to the request information in the gateway memory, the following steps are also included: extracting the request method, request path, and application version number of the request information; and constructing the query information corresponding to the request information based on the request method, request path, and application version number.
[0062] In this embodiment, the terminal extracts the request method, request path, and application version number of the requested information. Then, based on the request method, request path, and application version number, the terminal constructs the query information corresponding to the requested information.
[0063] Based on the above solution, by extracting the request method, request path, and application version number to construct query information, the accuracy and comprehensiveness of the gateway configuration information corresponding to the query request information are improved.
[0064] Optionally, in the gateway memory, query the gateway configuration information corresponding to the request information, including: based on the query information, matching the cache information corresponding to the request information in the gateway memory; if the cache information corresponding to the request information exists in the gateway memory, identifying the gateway configuration information corresponding to the cache information, and using the gateway configuration information as the gateway configuration information corresponding to the request information.
[0065] In this embodiment, the terminal, based on the query information, matches the cached information corresponding to the request information in the gateway memory. This cached information consists of gateway configuration information for multiple applications cached in the gateway memory. Each cached information corresponds to a request method, a request flow, and an application version number. If the terminal finds cached information corresponding to the request information in the gateway memory, it identifies the corresponding gateway configuration information and uses it as the gateway configuration information for the request information. If the terminal does not find cached information corresponding to the request information in the gateway memory, it proceeds to the next step.
[0066] In this solution, the accuracy of querying gateway configuration information corresponding to the query request information is improved by matching the query request information with the gateway configuration information.
[0067] Optionally, identifying the version information corresponding to the request information includes: based on the application version number of the request information requirement, identifying the major version number, minor version number, revision number, and current version number of the request information requirement; sorting the major version number, minor version number, revision number, and current version number based on the values of the major version number, minor version number, revision number, and current version number to obtain a version number sequence; and determining the version information corresponding to the request information based on the values of the major version number, minor version number, revision number, current version number, and version number sequence.
[0068] In this embodiment, the terminal identifies the major version number, minor version number, revision number, and current version number of the requested information based on the application version number of the requested information. Then, the terminal sorts these versions according to their numerical values to obtain a version number sequence. This version number sequence is obtained by arranging the version numbers in ascending order of their numerical values. Based on the values of the major version number, minor version number, revision number, current version number, and the version number sequence, the terminal determines the version information corresponding to the requested information.
[0069] Based on the above scheme, the comprehensiveness of version information analysis is improved by sorting the version information after splitting it.
[0070] Optionally, based on version information, a version adaptation strategy is used to query the gateway configuration information of the target version of the application requesting information. This includes: determining whether the major version number, minor version number, and revision version number are the same; if they are the same, the configuration information corresponding to the version number with the lowest value is selected from the version number sequence and used as the gateway configuration information of the target version of the application requesting information; if they are different, the priority level of each version number is identified, and the configuration information corresponding to the version number with the highest priority level is selected as the gateway configuration information of the target version of the application requesting information.
[0071] In this embodiment, the terminal determines whether the major version number, minor version number, and revision version number are the same. If they are the same, the terminal filters the configuration information corresponding to the lower-value version number in the version number sequence as the gateway configuration information for the target version adapted by the application requesting information. Then, if the major version number, minor version number, and revision version number are different, the terminal identifies the priority level of each version number and filters the configuration information corresponding to the version number with the highest priority level as the gateway configuration information for the target version adapted by the application requesting information.
[0072] Specifically, when the major version number, minor version number, and revision number are all the same, the current version number with the lowest priority is used to determine the priority. For example: 1.0.0-alpha < 1.0.0.
[0073] When two current version numbers have the same major version number, minor version number, and revision number, their priority must be compared through each period-separated identifier from left to right until a difference is found to determine the priority:
[0074] In this comparison, identifiers containing only numbers are compared numerically from highest to lowest. Identifiers containing letters or hyphens are compared character-by-character according to ASCII order. Numeric identifiers have lower priority than non-numeric identifiers. If the initial identifiers are identical, the current version number with more fields has higher priority.
[0075] For example: 1.0.0-ash<1.0.0-ash.1<1.0.0-ash.beta<1.0.0-beta<1.0.0-beta.2<1.0.0-beta.11<1.0.0.
[0076] Based on the above solution, the version information of the application is adjusted by semantic algorithm to avoid the problem of application configuration failure due to the inability to find the version, thereby improving the configuration success rate of application configuration based on request information.
[0077] Optionally, if gateway configuration information corresponding to the request information exists in the gateway memory, the method further includes: identifying the configuration process corresponding to the gateway configuration information and the configuration content of the gateway configuration information, and based on the configuration content, executing the gateway configuration process corresponding to the request information through the configuration process to obtain the target application corresponding to the request information.
[0078] In this embodiment, the terminal identifies the configuration process corresponding to the gateway configuration information and the configuration content of the gateway configuration information. Based on the configuration content, the terminal executes the gateway configuration process corresponding to the request information through the configuration process to obtain the target application corresponding to the request information.
[0079] Based on the above solution, when gateway configuration content exists, the gateway configuration process is performed directly to obtain the target application corresponding to the request information, avoiding the process of semantic version adjustment for each request information and improving configuration efficiency.
[0080] This application also provides a configuration example for an application, such as Figure 2 As shown, the specific processing procedure includes the following steps:
[0081] Step S201: Obtain request information.
[0082] Step S202: Based on the query information, match the cached information corresponding to the request information in the gateway memory.
[0083] Step S203: If cached information corresponding to the request information exists in the gateway memory, identify the gateway configuration information corresponding to the cached information and use the gateway configuration information as the gateway configuration information corresponding to the request information.
[0084] Step S204: Based on the query information, match the cached information corresponding to the request information in the gateway memory.
[0085] Step S205: If cached information corresponding to the request information exists in the gateway memory, identify the gateway configuration information corresponding to the cached information and use the gateway configuration information as the gateway configuration information corresponding to the request information.
[0086] Step S206: When the gateway configuration information corresponding to the request information does not exist in the gateway memory, the major version number, minor version number, revision version number, and current version number of the request information are identified based on the application version number of the request information requirement.
[0087] Step S207: Based on the values of the major version number, minor version number, revision number, and current version number, sort the major version number, minor version number, revision number, and current version number to obtain a version number sequence.
[0088] Step S208: Based on the values of the major version number, minor version number, revision version number, current version number, and version number sequence, determine the version information corresponding to the request information.
[0089] Step S209: Determine whether the major version number, minor version number, and revision version number are the same. If the major version number, minor version number, and revision version number are the same, filter the configuration information corresponding to the lower value version number in the version number sequence as the gateway configuration information for the target version of the application that requests the information.
[0090] Step S210: When the major version number, minor version number, and revision version number are different, identify the priority level of each version number and filter the configuration information corresponding to the version number with the highest priority level as the gateway configuration information for the target version of the application that requests the information.
[0091] Step S211: Execute the gateway process corresponding to the gateway configuration information to obtain the target application of the request information requirements.
[0092] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0093] Based on the same inventive concept, this application also provides an application configuration apparatus for implementing the application configuration method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations of the one or more application configuration apparatus embodiments provided below can be found in the limitations of the application configuration method described above, and will not be repeated here.
[0094] In one embodiment, such as Figure 3 As shown, an application configuration device is provided, including: an acquisition module 310, a query module 320, and an execution module 330, wherein:
[0095] The acquisition module 310 is used to acquire request information and query the gateway configuration information corresponding to the request information in the gateway memory;
[0096] The query module 320 is used to identify the version information corresponding to the request information when the gateway configuration information corresponding to the request information does not exist in the gateway memory, and based on the version information, query the gateway configuration information of the target version that the application required by the request information is adapted to through a version adaptation strategy.
[0097] The execution module 330 is used to execute the gateway process corresponding to the gateway configuration information to obtain the target application required by the request information.
[0098] Optionally, the device further includes:
[0099] The extraction module is used to extract the request method, the request path, and the application version number required by the request information.
[0100] The construction module is used to construct query information corresponding to the request information based on the request method, the request path, and the application version number.
[0101] Optionally, the acquisition module 310 is specifically used for:
[0102] Based on the query information, the cache information corresponding to the request information is matched in the gateway memory;
[0103] When cached information corresponding to the request information exists in the gateway memory, the gateway configuration information corresponding to the cached information is identified, and the gateway configuration information is used as the gateway configuration information corresponding to the request information.
[0104] Optionally, the query module 320 is specifically used for:
[0105] Based on the application version number of the requested information requirement, identify the major version number, minor version number, revision version number, and current version number of the requested information requirement.
[0106] Based on the values of the major version number, the minor version number, the revision version number, and the current version number, the major version number, the minor version number, the revision version number, and the current version number are sorted to obtain a version number sequence.
[0107] The values of the major version number, the minor version number, the revision version number, the current version number, and the version number sequence are used as the version information corresponding to the request information.
[0108] Optionally, the query module 330 is specifically used for:
[0109] Determine whether the major version number, the minor version number, and the revision version number are the same. If the major version number, the minor version number, and the revision version number are the same, filter the configuration information corresponding to the version number with the lower value in the version number sequence as the gateway configuration information of the target version of the application required by the request information.
[0110] When the major version number, the minor version number, and the revision version number are different, the priority level of each version number is identified, and the configuration information corresponding to the version number with the highest priority level is selected as the gateway configuration information for the target version of the application required by the request information.
[0111] Optionally, the device further includes:
[0112] The identification module is used to identify the configuration process corresponding to the gateway configuration information and the configuration content of the gateway configuration information, and based on the configuration content, execute the gateway configuration process corresponding to the request information through the configuration process to obtain the target application corresponding to the request information.
[0113] The modules in the configuration device of the aforementioned application can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of the computer device as software, so that the processor can invoke and execute the operations corresponding to each module.
[0114] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 4 As shown, the computer device includes a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a configuration method for an application. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.
[0115] Those skilled in the art will understand that Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0116] In one embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the steps of the method of any of the first aspects.
[0117] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the method of any of the first aspects.
[0118] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of the method of any one of the first aspects.
[0119] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0120] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0121] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0122] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for configuring an application, characterized in that, The method includes: Obtain the request information and query the gateway configuration information corresponding to the request information in the gateway memory; When the gateway configuration information corresponding to the request information does not exist in the gateway memory; Based on the application version number of the requested information requirement, identify the major version number, minor version number, revision version number, and current version number of the requested information requirement. Based on the values of the major version number, the minor version number, the revision version number, and the current version number, the major version number, the minor version number, the revision version number, and the current version number are sorted to obtain a version number sequence. Based on the value of the major version number, the value of the minor version number, the value of the revision version number, the value of the current version number, and the version number sequence, the version information corresponding to the request information is determined; Determine whether the major version number, the minor version number, and the revision version number are the same. If the major version number, the minor version number, and the revision version number are the same, filter the configuration information corresponding to the version number with the lower value in the version number sequence as the gateway configuration information of the target version of the application required by the request information. When the major version number, the minor version number, and the revision version number are different, the priority level of each version number is identified, and the configuration information corresponding to the version number with the highest priority level is selected as the gateway configuration information for the target version of the application to which the requested information is adapted. Execute the gateway process corresponding to the gateway configuration information to obtain the target application required by the request information.
2. The method according to claim 1, characterized in that, Before querying the gateway configuration information corresponding to the request information in the gateway memory, the process further includes: Extract the request method, request path, and application version number required by the request information; Based on the request method, the request path, and the application version number, construct the query information corresponding to the request information.
3. The method according to claim 2, characterized in that, The step of querying the gateway configuration information corresponding to the request information in the gateway memory includes: Based on the query information, the cache information corresponding to the request information is matched in the gateway memory; When cached information corresponding to the request information exists in the gateway memory, the gateway configuration information corresponding to the cached information is identified, and the gateway configuration information is used as the gateway configuration information corresponding to the request information.
4. The method according to claim 1, characterized in that, When the gateway configuration information corresponding to the request information exists in the gateway memory, the method further includes: Identify the configuration process corresponding to the gateway configuration information and the configuration content of the gateway configuration information, and based on the configuration content, execute the gateway configuration process corresponding to the request information through the configuration process to obtain the target application corresponding to the request information.
5. A configuration device for an application, characterized in that, The device includes: The acquisition module is used to acquire request information and query the gateway configuration information corresponding to the request information in the gateway memory; The query module is configured to: when the gateway configuration information corresponding to the requested information does not exist in the gateway memory; identify the major version number, minor version number, revision number, and current version number of the requested information based on the application version number of the requested information; sort the major version number, minor version number, revision number, and current version number based on the values of the major version number, minor version number, revision number, and current version number to obtain a version number sequence; and sort the major version number, minor version number, revision number, and current version number based on the values of the major version number, minor version number, revision number, and current version number. The system uses the numerical value and the version number sequence to determine the version information corresponding to the request information; it determines whether the major version number, the minor version number, and the revision version number are the same, and if they are the same, it filters the configuration information corresponding to the version number with the lower numerical value in the version number sequence as the gateway configuration information for the target version of the application required by the request information; if they are not the same, it identifies the priority level of each version number and filters the configuration information corresponding to the version number with the highest priority level as the gateway configuration information for the target version of the application required by the request information. The execution module is used to execute the gateway process corresponding to the gateway configuration information to obtain the target application required by the request information.
6. The apparatus according to claim 5, characterized in that, The device further includes: The extraction module is used to extract the request method, the request path, and the application version number required by the request information. The construction module is used to construct query information corresponding to the request information based on the request method, the request path, and the application version number.
7. The apparatus according to claim 6, characterized in that, The acquisition module is specifically used for: Based on the query information, the cache information corresponding to the request information is matched in the gateway memory; When cached information corresponding to the request information exists in the gateway memory, the gateway configuration information corresponding to the cached information is identified, and the gateway configuration information is used as the gateway configuration information corresponding to the request information.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 4.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 4.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Version compatibility method, device and equipment and computer readable storage medium
CN118012500A