CN114185973A - Parameter calling method, device, equipment and computer readable storage medium - Google Patents

Parameter calling method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN114185973A
CN114185973A CN202111524289.3A CN202111524289A CN114185973A CN 114185973 A CN114185973 A CN 114185973A CN 202111524289 A CN202111524289 A CN 202111524289A CN 114185973 A CN114185973 A CN 114185973A
Authority
CN
China
Prior art keywords
parameter
mapping table
target
name
calling
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111524289.3A
Other languages
Chinese (zh)
Inventor
陈儒
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
OneConnect Financial Technology Co Ltd Shanghai
Original Assignee
OneConnect Financial Technology Co Ltd Shanghai
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by OneConnect Financial Technology Co Ltd Shanghai filed Critical OneConnect Financial Technology Co Ltd Shanghai
Priority to CN202111524289.3A priority Critical patent/CN114185973A/en
Publication of CN114185973A publication Critical patent/CN114185973A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2471Distributed queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Computing Systems (AREA)
  • Stored Programmes (AREA)

Abstract

The application belongs to the field of Internet and provides a parameter calling method, device and equipment and a computer readable storage medium. The method comprises the following steps: receiving a parameter calling request, wherein the parameter calling request comprises position information of a parameter; searching a parameter mapping table corresponding to the target parameter position information and the calling party parameter position information according to a preset corresponding relation table of position information and mapping data; determining a target parameter name corresponding to the calling party parameter name in the searched parameter mapping table; and converting the calling party parameter name into the target parameter name, and calling a target interface according to the converted target parameter name. Therefore, when the parameter names in the server, the service or the interface of the calling party and the target party or the called party are not consistent, the parameter names can be searched and converted through the preset corresponding relation table, the definition of the mapping relation of the parameters is improved, the query analysis of the mapping relation is simplified, and the mapping accuracy is improved.

Description

Parameter calling method, device, equipment and computer readable storage medium
Technical Field
The present application belongs to the field of internet, and in particular, to a parameter calling method, apparatus, device, and computer-readable storage medium.
Background
With the development of internet technology, distributed services and micro services are more and more common. Often there are parameters that need to be forwarded or parameters that need to be passed through between different servers, different services on the servers, and different interfaces in the services. Since naming standards of different services are different, names defined by parameters with the same meaning in different interfaces are different. For example, in the parameter transferring process, the name of the parameter received by the upstream interface is parameter a, and when the parameter is transferred to the downstream interface, the name of the parameter having the same meaning as the parameter in the downstream interface is parameter B. In order to enable the downstream interface to use the parameter effectively, a hard-coded manner is usually adopted to hard-code the parameter a received by the upstream interface into the parameter B, so that the downstream interface calls.
By means of hard coding, the problem that parameter names in interfaces of different services are different can be solved. However, under the condition of many servers, services and interfaces, a large amount of hard coding work needs to be performed, that is, the name of the parameter received by the upstream interface and the name of the parameter with the same meaning in the downstream interface are subjected to hard coding processing and then the parameter is transmitted. Under the conditions that the number of servers, services and interfaces of the services is large, and the services have multiple versions, the mapping relation of parameters is unclear, the query and analysis of the mapping relation are troublesome, and mapping errors are easily caused.
Disclosure of Invention
In view of this, embodiments of the present application provide a parameter calling method, an apparatus, a device, and a computer-readable storage medium, so as to solve the problems in the prior art that, when a number of servers, services, and interfaces of the services are large, and a plurality of versions of the services exist, a mapping relationship of parameters is unclear, query and analysis of the mapping relationship is troublesome, and a mapping error is easily caused.
A first aspect of an embodiment of the present application provides a parameter calling method, where the method includes:
receiving a parameter calling request, wherein the parameter calling request comprises target parameter position information and calling party parameter position information;
searching a parameter mapping table corresponding to the target parameter position information and the calling party parameter position information according to a preset corresponding relation table of position information and mapping data;
determining a target parameter name corresponding to the calling party parameter name in the searched parameter mapping table;
and converting the calling party parameter name into the target parameter name, and calling a target interface according to the converted target parameter name.
With reference to the first aspect, in a first possible implementation manner of the first aspect, searching for a parameter mapping table corresponding to the target parameter location information and the caller parameter location information includes:
and searching a corresponding parameter mapping table according to the server identifier, the service identifier, the interface identifier and/or the version identifier where the target parameter and the calling party parameter are located.
With reference to the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, searching for a corresponding parameter mapping table according to the identifier of the server, the identifier of the service, the identifier of the interface, and/or the identifier of the version where the target parameter and the parameter of the caller are located includes:
determining a second-level mapping table ID corresponding to the server identifier of the target parameter and the calling party parameter according to the corresponding relation between the server identifier in a preset first-level mapping table and the second-level mapping table;
determining a third-level mapping table ID corresponding to the target parameter and the caller parameter according to a service identifier in a preset second-level mapping table and a corresponding relation between the second-level mapping table and the third-level mapping table;
determining a fourth-level mapping table ID corresponding to the target parameter and the calling party parameter according to an interface identifier, a version identifier, and a corresponding relationship between a third-level mapping table and a fourth-level mapping table in a preset third-level mapping table;
and determining a parameter mapping table corresponding to the parameter calling request according to the fourth-level mapping table ID.
With reference to the second possible implementation manner of the first aspect, in a third possible implementation manner of the first aspect, the method further includes:
when the parameter information is changed, determining a parameter mapping table corresponding to the parameter name before the change according to the position information of the parameter;
and updating the change information of the parameter information to the parameter mapping table.
With reference to the third possible implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, when the parameter information is changed, determining, according to the location information of the parameter, a parameter mapping table corresponding to a parameter name before the change, includes:
when the changed parameter information is a calling party parameter name, searching a parameter mapping table according to the position information of the calling party parameter and the calling party parameter name;
and when the changed parameter information is the target parameter name, searching a parameter mapping table according to the position information of the target parameter and the target parameter name.
With reference to the fourth possible implementation manner of the first aspect, in a fifth possible implementation manner of the first aspect, the searching for the parameter mapping table according to the location information of the caller parameter and the name of the caller parameter includes:
searching the position information of the calling party parameter, and searching a first parameter mapping table set meeting the requirement in the corresponding relation table;
and screening in the first parameter mapping table set according to the calling party parameter name to obtain one or more parameter mapping tables.
With reference to the second possible implementation manner of the first aspect, in a sixth possible implementation manner of the first aspect, the method further includes:
when the server identifier, the service identifier, the interface identifier or the version identifier where the parameter is located is changed, the corresponding relationship between the server identifier and the mapping table is updated according to the changed position information of the parameter, or the corresponding relationship between the service identifier and the mapping table is updated, or the corresponding relationship between the interface and the mapping table is updated, or the corresponding relationship between the version identifier and the mapping table is updated.
A second aspect of an embodiment of the present application provides a parameter calling apparatus, including:
the system comprises a request receiving unit, a parameter calling unit and a parameter processing unit, wherein the request receiving unit is used for receiving a parameter calling request, and the parameter calling request comprises target parameter position information and calling party parameter position information;
the data table searching unit is used for searching a parameter mapping table corresponding to the target parameter position information and the calling party parameter position information according to a preset corresponding relation table of the position information and the mapping data;
the target parameter name determining unit is used for determining a target parameter name corresponding to the calling party parameter name in the searched parameter mapping table;
and the conversion calling unit is used for converting the calling party parameter name into the target parameter name and calling a target interface according to the converted target parameter name.
A third aspect of embodiments of the present application provides a parameter invocation device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the method according to any one of the first aspect when executing the computer program.
A fourth aspect of embodiments of the present application provides a computer-readable storage medium, in which a computer program is stored, which, when executed by a processor, performs the steps of the method according to any one of the first aspect.
Compared with the prior art, the embodiment of the application has the advantages that: according to the method, the parameter mapping table corresponding to the parameter calling request is determined according to the position of the parameter in the parameter calling request when the parameter calling request is received through the preset corresponding relation table of the position information of the parameter and the mapping data, the target parameter name is searched in the determined parameter mapping table according to the parameter name of the calling party, and the target interface is called according to the searched target parameter name, so that when the parameter names in the server, the service or the interface of the calling party and the target party or the called party are inconsistent, the preset corresponding relation table is used for searching and converting, the definition of the mapping relation of the parameter is improved, the query analysis of the mapping relation is simplified, and the mapping accuracy is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic diagram of a parameter invocation implementation scenario provided in an embodiment of the present application;
fig. 2 is a schematic diagram of an implementation flow of a parameter calling method according to an embodiment of the present application;
FIG. 3 is a diagram illustrating a parameter calling process according to an embodiment of the present application;
FIG. 4 is a diagram illustrating a parameter calling apparatus according to an embodiment of the present application;
fig. 5 is a schematic diagram of a parameter invocation device according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
In order to explain the technical solution described in the present application, the following description will be given by way of specific examples.
At present, distributed services or micro services are more and more common, and there are often some requirements for parameter forwarding and parameter transparent transmission between different servers, different services on the servers, and different interfaces in the services. Parameter names with the same meaning often differ in interface definition due to different standards for each service.
In the parameter transferring process, the parameter name received by the upstream interface or the caller may be paramA, and when the parameter name is transferred to the downstream interface, that is, the target or the callee, the parameter name possibly defined in the downstream interface with the same meaning is paramB. Therefore, the downstream interface needs to be called after hard-coded into paramB in the upstream interface. This approach has the following disadvantages:
1. under the condition that the server, the service, the interface and the service version are more, a large amount of hard coding work needs to be carried out, and the parameters received by the interface are transmitted after being hard coded according to the parameter name definition of the downstream interface.
2. The mapping relation of parameters with the same meaning in each server, service or interface is easy to be confused, and the mapping relation is not easy to inquire and analyze because the services and the interfaces have a plurality of versions.
3. After defining the parameter name of the downstream interface in a hard coding mode, if parameters need to be added, modified or deleted, dynamic operation cannot be realized, and services need to be redeployed after hard coding is modified.
Based on this, the embodiment of the present application provides a parameter calling method to solve the above problems. Fig. 1 is a schematic view of an implementation scenario of a parameter calling method according to an embodiment of the present application. As shown in fig. 1, the implementation scenario includes a caller server, a target server, and a parameter mapping query server. The caller server can receive the parameter calling request, and can determine the position information of the caller parameter and the target parameter according to the parameters in the parameter calling request. In a scenario where there are multiple different versions, the parameter invocation request may further include a version identification determined based on the parameter invocation request. In the parameter mapping query server, the corresponding relation between the position information and the mapping data is stored, and the corresponding parameter mapping table can be queried based on the position information of the target parameter and the calling party parameter. Or, the parameter mapping table meeting the requirement may be queried based on the location information of the calling party parameter or the location information of the target parameter, and the target parameter name corresponding to the calling party parameter name may be determined based on the obtained parameter mapping table. The caller server can initiate a query service to the parameter mapping query server according to the parameter call request, so that the query service returns to the parameter mapping table or returns to the target parameter name corresponding to the caller parameter name. The calling party server can perform parameter conversion on calling party parameters according to the determined target parameter names and can initiate parameter calling to the target party according to the converted parameter names.
Fig. 2 is a schematic diagram of an implementation flow of a parameter calling method provided in an embodiment of the present application, and as shown in fig. 2, the method includes:
in S201, a parameter invocation request is received, where the parameter invocation request includes target parameter location information and caller parameter location information.
In the embodiment of the application, the parameter mapping query server may be separately set, and after the caller server receives the parameter calling request, the query request may be sent to the parameter mapping query server based on the location information and the like determined by the caller. Alternatively, the parameter mapping query server may receive the parameter invocation request sent by the caller server directly, and determine the location information of the caller parameter and the target parameter based on the received parameter invocation request.
In the embodiment of the application, the same interface in the service of the same server may perform data interaction with multiple services. In order to accurately transmit the parameters, accurate position information of the parameters needs to be determined. The location information of the parameter can be determined by the server where the parameter is located, the service where the parameter is located, the interface used for transmitting the parameter, and the version of the service where the parameter is located.
For example, the same interface may be associated with multiple different services of the same server, or interfaces of the same type (with the same interface name) may be associated with multiple services of different servers. When multiple services of different servers are associated by the same interface, there may be multiple identical services associated by the same interface. For example, server a, server B are associated with interface X1. And service a1 in server a may communicate over interface X1 and service a1 in server B may communicate over interface X1. Service a1 in server a is a service with the same name as service a1 in server B.
The services connected by the same interface may include different versions of the same service in the same server. For example, server a has service a1 connected to it. The interface may be different from the version of service a1 in connected server a at different time periods. The name of the same parameter in different versions may also change. For example, in version V1.0, the parameter is named paramA. In other versions, such as version V2.0, the same parameter is named paramB.
Parameter transfer between two services may exist between the same service of different servers, or between different services of different servers.
When the parameters are transmitted, in order to accurately transmit the calling party parameters to the target party, the method and the device can determine the mapping relation of the parameters based on the determined position information by determining the position information of the calling party parameters and the position information of the target parameters.
The calling party parameter position information is the position information of the calling party parameter. The location information of the caller parameter may include a server transmitting the caller parameter, a service transmitting the caller parameter, and an interface transmitting the caller parameter, or may further include version information of the service transmitting the caller parameter, and the like. Similarly, the target parameter location information may be location information of a parameter of the target party. The location information of the parameter of the target party may include a server receiving the target parameter, a service receiving the target parameter, an interface of the service receiving the target parameter, or may further include a version of the service receiving the target parameter, and the like.
For example, the location information of the parameter with the parameter name paramA may include: and transmitting and receiving the position information of the parameters, such as server identification, service identification, interface identification, service version identification and the like. By determining the server identifier, the service identifier, the interface identifier and the version identifier of the service or the interface for transmitting or receiving the parameters, the position information of the transmitted parameters can be accurately determined, so that the mapping relation of the called parameters can be conveniently determined according to the position information, and the reliability and the stability of the program operation are improved.
In S202, a parameter mapping table corresponding to the target parameter location information and the caller parameter location information is searched according to a preset correspondence table between location information and mapping data.
In this embodiment, the target parameter location information may include a server identifier, a service identifier, and an interface identifier for receiving the target parameter, or may further include a version identifier of a service or an interface for receiving the target parameter, and the like. The caller parameter location information may include a server identification, a service identification, an interface identification of the caller parameter, or may also include a version identification of the service or interface that transmitted the target parameter, etc.
In the embodiment of the present application, a correspondence relationship between the position information and the mapping data is preset. The position information comprises target parameter position information and calling party parameter position information. And determining a parameter mapping table corresponding to the position information by combining the target parameter position information and the calling party parameter position information with a preset corresponding relation table of the position information and the mapping data.
For example, the target parameter location information is a, the caller parameter location information is B, and according to the target parameter location information being a and the caller parameter location information being B, a corresponding parameter mapping table C can be found and obtained in a preset corresponding relationship. The parameter mapping table records the corresponding relation between the calling party parameter and the target parameter of the parameter transmitted from the calling party parameter position to the target parameter position.
In the embodiment of the present application, in order to improve the efficiency of searching for mapping data, as shown in fig. 3, a multi-level mapping table may be established in the parameter mapping query server, and according to the established multi-level mapping table, a parameter mapping table corresponding to the parameter invocation request is accurately searched in a step-by-step searching manner.
The multi-level mapping table may include a first-level mapping table, a second-level mapping table, a third-level mapping table, and a fourth-level mapping table, where each level of mapping table includes a plurality of mapping tables, which may be distinguished by different ID identifiers.
The first-level mapping table can be used for recording the mapping relation between the server identifier and the second-level mapping table, the second-level mapping table can be used for recording the mapping relation between the service identifier and the second-level mapping table, the third-level mapping table can be used for recording the mapping relation between the interface identifier and the third-level mapping table, and the fourth-level mapping table can be used for recording the corresponding relation between the mapping calling party parameter name and the target parameter name, namely the corresponding relation between the calling parameter name and the target parameter name with the same meaning, and the like.
In order to facilitate rapid determination of the mapping relationship between the caller parameter and the target parameter, the first-level mapping table stores a corresponding relationship between the server identifier and the second-level mapping table. The second mapping table ID may be determined in the first mapping table based on the identity of the caller server and the identity of the target server.
For example, in the first level mapping table, a second level mapping table record ID, a caller server identification, and a target server identification may be stored. When parameters are transmitted between servers, firstly, according to the identifier of a calling party server and the identifier of a target server, the corresponding ID of a second-level mapping table is found in a first-level mapping table.
In the second-level mapping table, a correspondence relationship between the second-level mapping table, the third-level mapping table, the caller service identifier, and the target service identifier may be stored. When the parameter is transmitted between services, the ID of the third-level mapping table can be determined according to the ID of the second-level mapping table determined by the server, and by combining the caller service identifier and the target service identifier of the transmission parameter.
And the third-level mapping table stores the corresponding relation among the third-level mapping table, the fourth-level mapping table, the caller interface identifier, the target interface identifier and the version identifier. When the parameters are transmitted between the interfaces, the fourth-level mapping table ID corresponding to the interface can be determined according to the service connected to the interface and the server where the service is located.
In the fourth-level mapping table, a correspondence relationship between the fourth mapping table ID, the calling party parameter name, and the target parameter name is stored. When parameters are transmitted between interfaces, a fourth-level mapping table ID corresponding to the parameters is determined according to server identification, service identification and interface identification of the transmitted parameters, or also according to version identification of the interfaces or the services. And determining a parameter mapping table corresponding to the fourth-level mapping table ID in the fourth-level mapping table.
The corresponding relation table can be independently arranged in the parameter mapping query server, and when the parameter name in the calling server or the target service is changed, the parameter name in the service is changed, or the interface is changed, or the version of the service or the interface is changed, the hard coding operation is not required to be modified, and only the corresponding relation table in the parameter mapping query server needs to be adjusted.
The correspondence may be modified in the mapping table of the corresponding level according to the modified content.
For example, when the server where the transfer parameter is located changes, only the corresponding relationship between the caller server identifier, the target server identifier, and the second-level mapping table ID in the first-level mapping table needs to be adjusted.
When the service where the transmission parameter is located changes, the second-level mapping table ID associated with the service where the parameter is transmitted may be determined according to the server associated with the service. And correspondingly adjusting the corresponding relation among the service identifier in the caller server, the service identifier in the target server, the second-level mapping table ID and the third-level mapping table ID in the parameter mapping table corresponding to the determined second-level mapping table ID.
When the interface for transferring the parameter changes, or the service or the interface for transmitting the parameter changes, the third-level mapping table ID corresponding to the changed interface may be determined according to the server and the service associated with the changed interface. And correspondingly adjusting the corresponding relation among the caller interface identifier, the target interface identifier, the third-level mapping table ID and the fourth-level mapping table ID in the parameter mapping table corresponding to the determined third-level mapping table ID.
When the transmitted parameter name is changed, the searching can be carried out step by step according to the position information of the changed parameter name, namely, the second-level mapping table ID is determined according to the server associated with the changed parameter, the third-level mapping table ID is determined according to the service associated with the parameter, and the fourth-level mapping table ID is determined according to the associated interface or version information. And correspondingly adjusting the corresponding relation between the calling party parameter name and the target parameter name in the parameter mapping table corresponding to the determined fourth mapping table ID.
When the transferred parameter name is changed, the parameter that may be changed is the caller parameter name, or may also be the target (callee) parameter name. When the parameter name of one of the parties is changed, one or more fourth-level mapping table IDs can be determined according to the location information of the changed parameter, and one or more locations including the parameter before the change are searched in the determined fourth-level mapping table IDs and replaced with the changed parameter name.
In S203, a target parameter name corresponding to the calling party parameter name is determined in the searched parameter mapping table.
And the parameter mapping table stores the mapping relation between the calling party parameter name and the target parameter name. That is, if the parameter name used by the caller is paramA and the parameter name having the same meaning as the target is paramB, the parameter mapping table stores the mapping relationship between the parameter name paramA and the parameter name paramB. Therefore, when the parameter calling request is received, the target parameter name can be quickly determined according to the calling party parameter name included in the parameter calling request.
In the embodiment of the present application, the mapping relationship between the calling party parameter name and the target parameter name corresponds to the fourth-level mapping table ID. Namely, the mapping relation between each calling party parameter name and the target parameter name corresponds to a fourth-level mapping table ID. According to a fourth-level mapping table ID, the corresponding relation between one or more calling party parameters and the target parameter can be found.
In S204, the calling party parameter name is converted into the target parameter name, and a target interface is called according to the converted target parameter name.
After the target parameter name corresponding to the calling party parameter name is determined according to the preset corresponding relation table of the position information and the mapping data, the calling party parameter name can be converted into the target parameter name, so that the target parameter is called according to the converted target parameter name, and the parameter calling with the target parameter name inconsistent with the calling party parameter name can be effectively adapted.
And through presetting a corresponding relation table of position information and mapping data of parameters, when a parameter calling request is received, determining a parameter mapping table corresponding to the parameter calling request according to the position of the parameter in the parameter calling request, searching a target parameter name in the determined parameter mapping table according to the parameter name of a calling party, and calling a target interface according to the searched target parameter name, so that when the parameter names in a server, a service or an interface of the calling party and a target party or a called party are inconsistent, the definition of the mapping relation of the parameters is improved, the query analysis of the mapping relation is simplified, and the mapping accuracy is improved.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Fig. 4 is a schematic diagram of a parameter calling apparatus according to an embodiment of the present application, as shown in fig. 4, the apparatus includes:
a request receiving unit 401, configured to receive a parameter invocation request, where the parameter invocation request includes target parameter location information and caller parameter location information;
a data table searching unit 402, configured to search a parameter mapping table corresponding to the target parameter location information and the caller parameter location information according to a preset correspondence table between location information and mapping data;
a target parameter name determining unit 403, configured to determine a target parameter name corresponding to the calling party parameter name in the searched parameter mapping table;
and a conversion calling unit 404, configured to convert the calling party parameter name into the target parameter name, and call a target interface according to the converted target parameter name.
The parameter calling apparatus shown in fig. 4 corresponds to the parameter calling method shown in fig. 2.
Fig. 5 is a schematic diagram of a parameter invocation device according to an embodiment of the present application. As shown in fig. 5, the parameter calling device 5 of this embodiment includes: a processor 50, a memory 51 and a computer program 52, such as a parameter invocation program, stored in said memory 51 and operable on said processor 50. The processor 50, when executing the computer program 52, implements the steps in the various parameter call method embodiments described above. Alternatively, the processor 50 implements the functions of the modules/units in the above-described device embodiments when executing the computer program 52.
Illustratively, the computer program 52 may be partitioned into one or more modules/units, which are stored in the memory 51 and executed by the processor 50 to accomplish the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program 52 in the parameter invocation device 5.
The parameter calling device 5 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The parameter invoking device may include, but is not limited to, a processor 50, a memory 51. It will be understood by those skilled in the art that fig. 5 is only an example of the parameter invocation device 5, and does not constitute a limitation to the parameter invocation device 5, and may include more or less components than those shown, or combine some components, or different components, for example, the parameter invocation device may also include an input-output device, a network access device, a bus, etc.
The Processor 50 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 51 may be an internal storage unit of the parameter invocation device 5, such as a hard disk or a memory of the parameter invocation device 5. The memory 51 may also be an external storage device of the parameter invocation device 5, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, provided on the parameter invocation device 5. Further, the memory 51 may also include both an internal storage unit of the parameter invocation device 5 and an external storage device. The memory 51 is used for storing the computer program and other programs and data required by the parameter invocation device. The memory 51 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, which can be stored in a computer readable storage medium, and when the computer program is executed by a processor, the steps of the methods described above can be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain other components which may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media which may not include electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. A method for parameter invocation, characterized in that the method comprises:
receiving a parameter calling request, wherein the parameter calling request comprises target parameter position information and calling party parameter position information;
searching a parameter mapping table corresponding to the target parameter position information and the calling party parameter position information according to a preset corresponding relation table of position information and mapping data;
determining a target parameter name corresponding to the calling party parameter name in the searched parameter mapping table;
and converting the calling party parameter name into the target parameter name, and calling a target interface according to the converted target parameter name.
2. The method of claim 1, wherein searching for the parameter mapping table corresponding to the target parameter location information and the caller parameter location information comprises:
and searching a corresponding parameter mapping table according to the server identifier, the service identifier, the interface identifier and/or the version identifier where the target parameter and the calling party parameter are located.
3. The method according to claim 2, wherein searching for the corresponding parameter mapping table according to the server identifier, the service identifier, the interface identifier, and/or the version identifier where the target parameter and the caller parameter are located comprises:
determining a second-level mapping table ID corresponding to the server identifier of the target parameter and the calling party parameter according to the corresponding relation between the server identifier in a preset first-level mapping table and the second-level mapping table;
determining a third-level mapping table ID corresponding to the target parameter and the caller parameter according to a service identifier in a preset second-level mapping table and a corresponding relation between the second-level mapping table and the third-level mapping table;
determining a fourth-level mapping table ID corresponding to the target parameter and the calling party parameter according to an interface identifier, a version identifier, and a corresponding relationship between a third-level mapping table and a fourth-level mapping table in a preset third-level mapping table;
and determining a parameter mapping table corresponding to the parameter calling request according to the fourth-level mapping table ID.
4. The method of claim 3, further comprising:
when the parameter information is changed, determining a parameter mapping table corresponding to the parameter name before the change according to the position information of the parameter;
and updating the change information of the parameter information to the parameter mapping table.
5. The method of claim 4, wherein when the parameter information is changed, determining a parameter mapping table corresponding to a parameter name before the change according to the location information of the parameter comprises:
when the changed parameter information is a calling party parameter name, searching a parameter mapping table according to the position information of the calling party parameter and the calling party parameter name;
and when the changed parameter information is the target parameter name, searching a parameter mapping table according to the position information of the target parameter and the target parameter name.
6. The method of claim 5, wherein searching a parameter mapping table according to the location information of the caller parameter and the caller parameter name comprises:
searching the position information of the calling party parameter, and searching a first parameter mapping table set meeting the requirement in the corresponding relation table;
and screening in the first parameter mapping table set according to the calling party parameter name to obtain one or more parameter mapping tables.
7. The method of claim 3, further comprising:
when the server identifier, the service identifier, the interface identifier or the version identifier where the parameter is located is changed, the corresponding relationship between the server identifier and the mapping table is updated according to the changed position information of the parameter, or the corresponding relationship between the service identifier and the mapping table is updated, or the corresponding relationship between the interface and the mapping table is updated, or the corresponding relationship between the version identifier and the mapping table is updated.
8. An apparatus for parameter invocation, characterized in that said apparatus comprises:
the system comprises a request receiving unit, a parameter calling unit and a parameter processing unit, wherein the request receiving unit is used for receiving a parameter calling request, and the parameter calling request comprises target parameter position information and calling party parameter position information;
the data table searching unit is used for searching a parameter mapping table corresponding to the target parameter position information and the calling party parameter position information according to a preset corresponding relation table of the position information and the mapping data;
the target parameter name determining unit is used for determining a target parameter name corresponding to the calling party parameter name in the searched parameter mapping table;
and the conversion calling unit is used for converting the calling party parameter name into the target parameter name and calling a target interface according to the converted target parameter name.
9. A parameter invocation device comprising a memory, a processor and a computer program stored in said memory and executable on said processor, characterized in that said processor, when executing said computer program, implements the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
CN202111524289.3A 2021-12-14 2021-12-14 Parameter calling method, device, equipment and computer readable storage medium Pending CN114185973A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111524289.3A CN114185973A (en) 2021-12-14 2021-12-14 Parameter calling method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111524289.3A CN114185973A (en) 2021-12-14 2021-12-14 Parameter calling method, device, equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN114185973A true CN114185973A (en) 2022-03-15

Family

ID=80543606

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111524289.3A Pending CN114185973A (en) 2021-12-14 2021-12-14 Parameter calling method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN114185973A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115190011A (en) * 2022-07-05 2022-10-14 中电金信软件有限公司 Message processing method and device, electronic equipment and storage medium
CN117349483A (en) * 2023-12-05 2024-01-05 杭州行芯科技有限公司 Parasitic parameter searching method and device, electronic equipment and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115190011A (en) * 2022-07-05 2022-10-14 中电金信软件有限公司 Message processing method and device, electronic equipment and storage medium
CN115190011B (en) * 2022-07-05 2024-02-27 中电金信软件有限公司 Message processing method and device, electronic equipment and storage medium
CN117349483A (en) * 2023-12-05 2024-01-05 杭州行芯科技有限公司 Parasitic parameter searching method and device, electronic equipment and storage medium
CN117349483B (en) * 2023-12-05 2024-04-09 杭州行芯科技有限公司 Parasitic parameter searching method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN107798038B (en) Data response method and data response equipment
CN110601880B (en) Cloud platform, service processing method, command interface and computer equipment
CN114185973A (en) Parameter calling method, device, equipment and computer readable storage medium
CN113364853B (en) Business service system, business request method and gateway equipment
CN107360261A (en) A kind of HTTP request processing method, device and electronic equipment
CN109491857B (en) Data monitoring method and system based on rule engine and terminal equipment
CN109669980B (en) Cross-database access method and device for data
CN110928874A (en) Information processing method, device and system, electronic equipment and storage medium
CN109299173B (en) Data transmission method, device and storage medium
CN110716738A (en) Data processing method and device, cloud platform, electronic equipment and storage medium
CN112732982A (en) Fault code storage method and device, terminal equipment and readable storage medium
CN109933595B (en) Internet of things equipment information sharing system and device and terminal equipment
CN113177015B (en) Frame header-based serial port communication method and serial port chip
CN108255950B (en) Data storage method and terminal equipment
CN112597192A (en) Data query method, device, server and medium
CN113132522A (en) Test method, device, server and medium
CN105763541B (en) A kind of multiple methods using Dropbox intercommunication in same system
CN108647139B (en) System test method, device, storage medium and electronic device
CN115390939B (en) Service processing method and system
CN110753082B (en) Service calling method and terminal equipment
WO2021121175A1 (en) Sim card allocation method and apparatus, and server and computer-readable storage medium
CN112953677A (en) Method and device for adding link identification to request message data
CN113032820A (en) File storage method, access method, device, equipment and storage medium
CN110858201A (en) Data processing method and system, processor and storage medium
CN117850753B (en) Method, device, equipment and medium for generating interface code based on someip matrix

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination