WO2020052582A1 - 一种智能调用Dubbo远程服务的方法、装置、设备及介质 - Google Patents

一种智能调用Dubbo远程服务的方法、装置、设备及介质 Download PDF

Info

Publication number
WO2020052582A1
WO2020052582A1 PCT/CN2019/105325 CN2019105325W WO2020052582A1 WO 2020052582 A1 WO2020052582 A1 WO 2020052582A1 CN 2019105325 W CN2019105325 W CN 2019105325W WO 2020052582 A1 WO2020052582 A1 WO 2020052582A1
Authority
WO
WIPO (PCT)
Prior art keywords
type
java
parameter
setting
basic
Prior art date
Application number
PCT/CN2019/105325
Other languages
English (en)
French (fr)
Inventor
辜国强
周国梁
赵鹏
Original Assignee
北京数聚鑫云信息技术有限公司
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 北京数聚鑫云信息技术有限公司 filed Critical 北京数聚鑫云信息技术有限公司
Publication of WO2020052582A1 publication Critical patent/WO2020052582A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/544Remote

Definitions

  • This application relates to, but is not limited to, the field of Internet technologies, and in particular, to a method, a device, a device, and a medium for intelligently calling a Dubbo remote service.
  • Dubbo Open Source Distributed Services Framework
  • RPC high-performance remote procedure call
  • the existing Dubbo remote call provides a direct service interface that calls remote services through the interface.
  • the Dubbo Service Registration Cluster Center is responsible for managing service registration and service request distribution.
  • the calling service first accesses the service registration cluster center through the service interface through the provided Java object input parameters, and the registration center distributes the service implementation corresponding to the service interface. After a successful response, the return result is returned to the calling server according to the original route, and the Java object is obtained. Output results.
  • the present application provides a method and a device for intelligently calling a Dubbo remote service.
  • a method for intelligently calling a Dubbo (Open Source Distributed Service Framework) remote service including:
  • the setting rules for different types of JAVA parameters include at least one of the following methods:
  • Method 1 When the JAVA parameter type is a JAVA basic type or a JAVA object type, the setting rules include: setting a parameter name, setting a basic type class name of the parameter, and setting a parameter value;
  • JAVA basic types include boolean, char, byte, short, int, long, float, double
  • Java basic object types include: Boolean, Character, Byte, Short, Integer, Long, Float, Double, and String;
  • Method 2 When the JAVA parameter type is an array type of JAVA basic type or an array type of JAVA basic object type, the setting rules include: setting a parameter name, setting an array class name used to represent the array object type, and setting an array object The value of each record;
  • Array types of JAVA basic types include: boolean [], char [], byte [], short [], int [], long [], float [], double [], and array types of Java basic object types include: Boolean [], Character [], Byte [], Short [], Integer [], Long [], Float [], Double [] and String [];
  • the setting rules include: setting a parameter name, setting a class name used to represent a JAVA object, and setting a key-value pair for each property in the JAVA object;
  • the setting rules include: setting a parameter name, setting a class name used to indicate the collection type List or Set set object, setting the List list type or Sequence of all record values in the Set object type;
  • the setting rules include: setting a parameter name, setting a class name used to represent the type of the Map mapping object, and setting a key-value pair of each record in the Map mapping object;
  • the setting rules include: setting a parameter name, setting a class name for representing a JAVA date or time, setting a parameter value, and setting a date or time for parsing a parameter value. Format value.
  • the setting rules include: setting a parameter name and setting a parameter value.
  • the conversion rule is: match the JAVA parameter type by the class name to determine whether the parameter value is empty. If it is empty, it is set to the default value. If it is not empty, the basic conversion rule is executed.
  • the basic conversion rule is: when the parameter value is a digital object, the corresponding basic type value is obtained through the digital object; when the parameter value is not a digital object, the corresponding basic type value is passed.
  • the conversion rule is: determine whether the array is an array by the class name, and match the array type by the array type mapping table. The sequence of values respectively executes the basic conversion rules to assemble into an array object of this type;
  • the conversion rule is: when it is determined as a simple JAVA object by the class name, the basic conversion rule is executed for each attribute value of the object;
  • the conversion rule is: when the collection class is determined by the class name, the basic conversion rule is performed on the sequence of values in the List list or Set set object, Finally, it is assembled into a List or Set object;
  • the conversion rule is: When the mapping class is first determined by the class name, the basic conversion rules are performed on the key-value pairs in the Map mapping type object, and finally assembled into The corresponding Map object;
  • the conversion rule is: match the type of the date or time object by the class name, determine whether to set the date or time format, and if set, use the date or time format value to perform the parameter value Parsing and formatting; if not set, the corresponding date or time object class is used for default parsing parameter values.
  • the method further includes: when the return result of the Dubbo remote service interface is a specific value, using the specific value as a call result, and when the return result of the Dubbo remote service interface is an object, using the object JSON serialization technology to The object is serialized into the corresponding JSON string as the result of the call.
  • a device for intelligently calling a Dubbo remote service including:
  • the setting module is set to set setting rules and conversion rules for different JAVA parameter types
  • the configuration module is configured to parameterize the parameters of the Dubbo remote service interface using a standard data exchange format, and set the parameters of the corresponding JAVA parameter type according to the setting rules;
  • a parsing module configured to parse specific content of the parameter configuration into data in units of JAVA parameter types
  • the conversion module is set to use corresponding conversion rules for different JAVA parameter types to obtain the converted JAVA object;
  • a packaging module configured to package all JAVA objects into a parameter list conforming to the standard data exchange format
  • the calling module is configured to call the Dubbo remote service interface using the parameter list.
  • the setting rules for different types of JAVA parameters include at least one of the following methods:
  • Method 1 When the JAVA parameter type is a JAVA basic type or a JAVA object type, the setting rules include: setting a parameter name, setting a basic type class name of the parameter, and setting a parameter value;
  • JAVA basic types include boolean, char, byte, short, int, long, float, double
  • Java basic object types include: Boolean, Character, Byte, Short, Integer, Long, Float, Double, and String;
  • Method 2 When the JAVA parameter type is an array type of JAVA basic type or an array type of JAVA basic object type, the setting rules include: setting a parameter name, setting an array class name used to represent the array object type, and setting an array object The value of each record;
  • Array types of JAVA basic types include: boolean [], char [], byte [], short [], int [], long [], float [], double [], and array types of Java basic object types include: Boolean [], Character [], Byte [], Short [], Integer [], Long [], Float [], Double [] and String [];
  • the setting rules include: setting a parameter name, setting a class name used to represent a JAVA object, and setting a key-value pair for each property in the JAVA object;
  • the setting rules include: setting a parameter name, setting a class name used to indicate the collection type List or Set set object, setting the List list type or Sequence of all record values in the Set object type;
  • the setting rules include: setting a parameter name, setting a class name used to represent the type of the Map mapping object, and setting a key-value pair of each record in the Map mapping object;
  • the setting rules include: setting a parameter name, setting a class name for representing a JAVA date or time, setting a parameter value, and setting a date or time for parsing a parameter value. Format value.
  • the setting rules include: setting a parameter name and setting a parameter value.
  • the conversion rule is: match the JAVA parameter type by the class name to determine whether the parameter value is empty. If it is empty, it is set to the default value. If it is not empty, the basic conversion rule is executed.
  • the basic conversion rule is: when the parameter value is a digital object, the corresponding basic type value is obtained through the digital object; when the parameter value is not a digital object, the corresponding basic type value is passed.
  • the conversion rule is: determine whether the array is an array by the class name, and match the array type by the array type mapping table. The sequence of values respectively executes the basic conversion rules to assemble into an array object of this type;
  • the conversion rule is: when it is determined as a simple JAVA object by the class name, the basic conversion rule is executed for each attribute value of the object;
  • the conversion rule is: when the collection class is determined by the class name, the basic conversion rule is performed on the sequence of values in the List list or Set set object, Finally, it is assembled into a List or Set object;
  • the conversion rule is: When the mapping class is first determined by the class name, the basic conversion rules are performed on the key-value pairs in the Map mapping type object, and finally assembled into The corresponding Map object;
  • the conversion rule is: match the type of the date or time object by the class name, determine whether to set the date or time format, and if set, use the date or time format value to perform the parameter value Parsing and formatting; if not set, the corresponding date or time object class is used for default parsing parameter values.
  • the device further includes a result unifying module configured to set the specific value as a result of the call when the result returned by the Dubbo remote service interface is a specific value, and when the result returned by the Dubbo remote service interface is an object Use the object JSON serialization technology to serialize the object into the corresponding JSON string as the result of the call.
  • a computer device including a memory, a processor, and a computer program stored on the memory and executable on the processor.
  • the processor executes the program, Steps to implement the above method.
  • a computer-readable storage medium is provided.
  • a computer program is stored on the storage medium, and the steps of the foregoing method are implemented when the program is executed by a processor.
  • the invention encapsulates the parsing and mapping of parameters and type conversion accordingly, and does not require any additional encoding operations during use.
  • the input and output parameters use the existing standard format, such as JSON or XML
  • the output of any third-party service can be used as the input parameter, and the output results can also be directly provided to other applications that support JSON or XML input, so It simplifies the difficulty of invoking the service interface and avoids strong dependence on the service interface business.
  • Dubbo technology is a Java-based remote service framework.
  • the invention achieves decoupling from the Java language.
  • Dubbo can be used without the Java language foundation, which greatly reduces the difficulty of use, so that developers pay more attention to the business. , No need to pay attention to a specific programming development language, designed to "focus on the business and weaken programming.”
  • FIG. 1 is a schematic diagram of a method for calling a Dubbo remote service depending on a service interface in the prior art
  • Fig. 2 is a flow chart showing a method for invoking a Dubbo remote service according to an exemplary embodiment
  • Fig. 3 is a flow chart showing another method for intelligently invoking a Dubbo remote service according to an exemplary embodiment
  • Fig. 4 is a block diagram of a device for intelligently invoking a Dubbo remote service according to an exemplary embodiment
  • Fig. 5 is a block diagram of a device for invoking a Dubbo remote service method according to an exemplary embodiment.
  • FIG. 2 is a schematic diagram of a method for calling a Dubbo remote service in an embodiment of the present invention.
  • the embodiment of the present invention does not need to rely on the Dubbo remote service interface.
  • the method for intelligently calling Dubbo remote services includes:
  • Step 301 Set a setting rule and a conversion rule for different types of JAVA parameters.
  • Step 302 Use a standard data exchange format to parameterize the parameters of the Dubbo remote service interface, set the parameters of the corresponding JAVA parameter type according to the setting rules, and parse the specific content of the parameter configuration into data in units of JAVA parameter types.
  • JAVA parameter types are converted using corresponding conversion rules to obtain the converted JAVA objects, and all JAVA objects are encapsulated into a parameter list that conforms to the standard data exchange format;
  • Step 303 Use the parameter list to call the Dubbo remote service interface.
  • the standard data exchange format is a JSON format.
  • setting a setting rule for different types of JAVA parameters includes at least one of the following methods:
  • Method 1 When the JAVA parameter type is a JAVA basic type or a JAVA object type, the setting rules include: setting a parameter name, setting a basic type class name of the parameter, and setting a parameter value.
  • JAVA basic types include boolean, char, byte, short, int, long, float, double
  • JAVA basic object types include: Boolean, Character, Byte, Short, Integer, Long, Float, Double, and String, among which the first eight object types Corresponds to the basic type.
  • Method 2 When the JAVA parameter type is an array type of JAVA basic type or an array type of JAVA basic object type, the setting rules include: setting a parameter name, setting an array class name used to represent the array object type, and setting an array object The value of each record;
  • Array types of JAVA basic types include: boolean [], char [], byte [], short [], int [], long [], float [], double [], and array types of Java basic object types include: Boolean [], Character [], Byte [], Short [], Integer [], Long [], Float [], Double [], and String [].
  • Method 3 When the JAVA parameter type is a JAVA non-basic object type (such as POJO (Plain Old Java Object) object type), the setting rules include: setting the parameter name, setting the class name used to represent the JAVA object, and setting each of the JAVA objects. Key-value pairs of attributes;
  • JAVA non-basic object type such as POJO (Plain Old Java Object) object type
  • the setting rules include: setting a parameter name, setting a class name used to indicate the collection type List or Set set object, setting the List list type or Sequence of all record values in the Set object type;
  • the setting rules include: setting a parameter name, setting a class name used to represent the type of the Map mapping object, and setting a key-value pair of each record in the Map mapping object;
  • the setting rules include: setting a parameter name, setting a class name for representing a JAVA date or time, setting a parameter value, and setting a date or time for parsing a parameter value. Format value.
  • JAVA parameter type is a boolean, int, or double type in the JAVA basic type, or when the JAVA parameter type is a String object type
  • simplified setting rules can also be used, including: setting the parameter name and setting the parameter value.
  • the conversion rules in step 302 are as follows:
  • the conversion rule is: match the JAVA parameter type by the class name to determine whether the parameter value is empty. If it is empty, it is set to the default value. If it is not empty, the basic conversion rule is executed.
  • the basic conversion rule is: when the parameter value is a digital object, the corresponding basic type value is obtained through the digital object; Object to parse parameter values.
  • the class field of the class name must specify the Java object name of the Float object type:
  • the input parameter is a boolean basic type. In addition to the simplified configuration, you can also specify the class name explicitly:
  • the conversion rule is: determine whether the array is an array by the class name, and match the array type through the array type mapping table. The sequence of values in the array respectively performs the basic conversion rules and is assembled into an array object of that type.
  • Java has a unique set of JAVA language internal representations for array type names of basic types. Because this representation is not good for configuration and readability, the invention builds an array type mapping table, such as As shown in Table 1, in order to make it easier for developers to read and understand the representation of the array, the specific mapping table is as follows:
  • an array object of basic type boolean can be configured as:
  • each value is parsed and converted by the basic type by calling the convertSingle method. Type byte, short, int, long, float, double, boolean, etc.), and finally return the entire converted array object to implement the code snippet:
  • the conversion rule is: when it is determined as a simple JAVA object by the class name, the basic conversion rule is executed for each attribute value of the object.
  • the class field specifies the class name of the POJO object, the name field is the parameter name, and the value field is the key-value pair of the property name and value of the POJO object:
  • the conversion rule is: when the collection class is determined by the class name, the basic conversion rules are performed on the sequence of values in the List list or Set object, respectively. Finally, it is assembled into a List or Set object;
  • the conversion rule is: When the mapping class is first determined by the class name, the basic conversion rules are performed on the key-value pairs in the Map mapping type object, and finally assembled into The corresponding Map object;
  • the Map object type is a combination configuration of key / value pairs:
  • the key-value pairs of key and value will be processed one by one, and then the type matching analysis and conversion will be performed by calling the convertSingle method, and finally the converted key-value pairs will be integrated to implement the code snippet:
  • the conversion rule is: match the type of the date or time object by the class name, determine whether to set the date or time format, and if set, use the date or time format value to the parameter The value is parsed and formatted; if not set, the corresponding date or time object class is used for the default parse parameter value.
  • the configuration of the LocalDate date type is:
  • date format field is set. If set, the date format will be used for parsing parameter values, otherwise the default ISO-8601 date format will be used for parsing.
  • the method further includes: when the return result of the Dubbo remote service interface is a specific value, using the specific value as the call result, and when the return result of the Dubbo remote service interface is an object, using the object JSON serialization technology to serialize the object into The corresponding JSON string is used as the result of the call.
  • the service interface can only return a single value or a single object.
  • the specific value is used as the result of the call, such as the return result of type boolean:
  • the existing object JSON serialization technology will be used to serialize the object into the corresponding JSON string as the value of the unified key result, such as the Person object, the returned result is:
  • the device for intelligently calling Dubbo remote services includes:
  • a setting module 401 configured to set setting rules and conversion rules for different types of JAVA parameters
  • the configuration module 402 is configured to parameterize the parameters of the Dubbo remote service interface using a standard data exchange format, and set the parameters of the corresponding JAVA parameter type according to the setting rules;
  • the parsing module 403 is configured to parse the specific content of the parameter configuration into data in units of JAVA parameter types;
  • the conversion module 404 is configured to perform conversion by using corresponding conversion rules for different types of JAVA parameters to obtain a converted JAVA object;
  • the encapsulation module 405 is configured to encapsulate all JAVA objects into a parameter list conforming to a standard data exchange format.
  • the calling module 406 is configured to call the Dubbo remote service interface using a parameter list.
  • Setting rules for different JAVA parameter types include at least one of the following methods:
  • Method 1 When the JAVA parameter type is a JAVA basic type or a JAVA object type, the setting rules include: setting a parameter name, setting a basic type class name of the parameter, and setting a parameter value;
  • JAVA basic types include boolean, char, byte, short, int, long, float, double
  • Java basic object types include: Boolean, Character, Byte, Short, Integer, Long, Float, Double, and String;
  • Method 2 When the JAVA parameter type is an array type of JAVA basic type or an array type of JAVA basic object type, the setting rules include: setting a parameter name, setting an array class name used to represent the array object type, and setting an array object The value of each record;
  • Array types of JAVA basic types include: boolean [], char [], byte [], short [], int [], long [], float [], double [], and array types of Java basic object types include: Boolean [], Character [], Byte [], Short [], Integer [], Long [], Float [], Double [] and String [];
  • the setting rules include: setting a parameter name, setting a class name used to represent a JAVA object, and setting a key-value pair for each property in the JAVA object;
  • the setting rules include: setting a parameter name, setting a class name used to indicate the collection type List or Set set object, setting the List list type or Sequence of all record values in the Set object type;
  • the setting rules include: setting a parameter name, setting a class name used to represent the type of the Map mapping object, and setting a key-value pair of each record in the Map mapping object;
  • the setting rules include: setting a parameter name, setting a class name for representing a JAVA date or time, setting a parameter value, and setting a date or time for parsing a parameter value. Format value.
  • the setting rules include: setting a parameter name and setting a parameter value.
  • the JAVA parameter type is a JAVA basic type, or when it is a JAVA basic type object type, or when it is a String object type, the conversion rule is: match the JAVA parameter type by the class name to determine whether the parameter value is empty, and if it is empty , It is set to the default value. If it is not empty, the basic conversion rule is executed.
  • the basic conversion rule is: when the parameter value is a digital object, the corresponding basic type value is obtained through the digital object, and when the parameter value is not a digital object, the corresponding basic type object is used. Parse parameter values;
  • the conversion rule is: determine whether the array is an array by the class name, and match the array type by the array type mapping table. The sequence of values of each is executed based on the basic conversion rules and assembled into an array object of this type;
  • the conversion rule is: When determined as a simple JAVA object by the class name, the basic conversion rule is executed for each attribute value of the object;
  • the conversion rule is: when the collection class is determined by the class name, the basic conversion rules are performed on the sequence of values in the List list or Set set object, and finally Assemble into a List or Set object;
  • the conversion rule is: When the mapping class is first determined by the class name, the basic conversion rules are performed on the key-value pairs in the Map mapping type object, and finally assembled into the corresponding Map object;
  • the conversion rule is: match the type of the date or time object by the class name, determine whether to set the date or time format, and if set, use the date or time format value to perform the parameter value Parsing and formatting; if not set, the corresponding date or time object class is used for default parsing parameter values.
  • the device also includes a result unified module, which is set to use the specific value as the call result when the return result of the Dubbo remote service interface is a specific value, and use the object JSON serialization technology when the return result of the Dubbo remote service interface is an object.
  • the object is serialized into the corresponding JSON string as the result of the call.
  • the original Dubbo service has the following three interface methods:
  • standard JSON is used to unify the input parameters and output parameters, and encapsulate the call of the remote service interface.
  • the developer only needs to understand the service interface specification, and can process the input in a configurable manner.
  • the parameter configuration needs to specify the class field to specify the Map type and the parameter name and key / value pairs for each record in the map:
  • the unit modules in the method for intelligently calling Dubbo remote services according to the embodiments of the present invention may be combined, divided, and deleted according to actual needs.
  • An embodiment of the present invention further provides a computer device including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes this program, the steps of the foregoing method are implemented.
  • An embodiment of the present invention further provides a computer-readable storage medium.
  • a computer program is stored on the storage medium, and when the program is executed by a processor, the steps of the foregoing method are implemented.
  • Fig. 5 is a block diagram of an apparatus 500 for intelligently invoking a Dubbo remote service method according to an exemplary embodiment.
  • the apparatus 500 may be provided as a server.
  • the device 500 includes a processor 501, and the number of processors may be set to one or more as required.
  • the device 500 also has a memory 502 configured to store instructions executable by the processor 501, such as application programs.
  • the number of memories can be set as required or one or more, and the number of stored applications can be one or more.
  • the processor 501 is configured to execute instructions to perform the method described above.
  • the invention encapsulates the parsing and mapping of parameters and type conversion accordingly, and does not require any additional encoding operations during use.
  • the input and output parameters use the existing standard format, such as JSON or XML
  • the output of any third-party service can be used as the input parameter, and the output results can also be directly provided to other applications that support JSON or XML input, so It simplifies the difficulty of invoking the service interface and avoids strong dependence on the service interface business.
  • Dubbo technology is a Java-based remote service framework.
  • the invention achieves decoupling from the Java language.
  • Dubbo can be used without the Java language foundation, which greatly reduces the difficulty of use, so that developers pay more attention to the business. , No need to pay attention to a specific programming development language, designed to "focus on the business and weaken programming.”
  • the embodiments of the present application may be provided as a method, an apparatus (device), or a computer program product. Therefore, this application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application may take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code therein.
  • Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology used to store information such as computer-readable instructions, data structures, program modules or other data Including, but not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or may be used for Any other medium or the like that stores the desired information and can be accessed by the computer.
  • a communication medium typically contains computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and may include any information delivery medium .
  • These computer program instructions may be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to produce a machine, so that the instructions generated by the processor of the computer or other programmable data processing device are used to generate instructions Means for implementing the functions specified in one or more flowcharts and / or one or more blocks of the block diagrams.
  • These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to work in a particular manner such that the instructions stored in the computer-readable memory produce a manufactured article including an instruction device, the instructions
  • the device implements the functions specified in one or more flowcharts and / or one or more blocks of the block diagram.
  • These computer program instructions can also be loaded on a computer or other programmable data processing device, so that a series of steps can be performed on the computer or other programmable device to produce a computer-implemented process, which can be executed on the computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more flowcharts and / or one or more blocks of the block diagrams.
  • the terms "including”, “comprising”, or any other variation thereof are intended to encompass non-exclusive inclusion, such that an article or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed Elements, or elements that are inherent to such articles or equipment. Without more restrictions, the elements defined by the sentence “including " do not exclude the existence of other identical elements in the articles or equipment including the elements.
  • the method and device for intelligently calling the Dubbo remote service in this article can call the remote service by only specifying the service interface name and the dynamic configuration information of the parameters, so that the service interface is not required without writing any code related to the service interface. It does not need to consider the compatibility of parameter types and programming languages, nor does it need to pay attention to the types of parameters, nor does it need to maintain uncertain output results.
  • the output results of remote service calls will eventually be uniformly output in the standard JSON format. To achieve a solution to simplify remote calls and unified output.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Devices For Executing Special Programs (AREA)
  • Stored Programmes (AREA)

Abstract

本申请公开了一种智能调用Dubbo远程服务的方法、装置、设备及介质,此方法包括:设置针对不同JAVA参数类型的设置规则和转换规则;使用标准数据交换格式对Dubbo远程服务接口的参数进行参数配置,根据设置规则设置相应JAVA参数类型的参数,将所述参数配置的具体内容解析为以JAVA参数类型为单元的数据,针对不同的JAVA参数类型采用相应的转换规则进行转换,获得转换后的JAVA对象,将所有JAVA对象封装成符合所述标准数据交换格式的参数列表,使用所述参数列表调用所述Dubbo远程服务接口。本发明实施例在通过仅需指定服务接口名字和参数的动态配置信息即可智能调用远程服务,大大简化调用复杂度。

Description

一种智能调用Dubbo远程服务的方法、装置、设备及介质
本申请要求在2018年09月14日提交中国专利局、申请号为201811076788.9,发明名称为“智能调用Dubbo远程服务的方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及但不限于互联网技术领域,尤其涉及一种智能调用Dubbo远程服务的方法、装置、设备及介质。
背景技术
Dubbo(开源分布式服务框架)技术是阿里巴巴开源的一个通过高性能的远程过程调用(RPC)实现输出和输入功能的Java远程服务框架。
现有的Dubbo远程调用提供了一种直接依赖服务接口,通过接口来调用远程服务,如图1所示,Dubbo服务注册集群中心负责管理服务的注册和服务请求的分发。调用服务首先由提供的Java对象输入参数通过服务接口访问服务注册集群中心,由注册中心分发服务接口所对应的服务实现,成功响应后,按原路返回返回结果给调用服务端,获得Java对象的输出结果。
现有的上述方式中,需要通过编写Java代码明确指定调用方式以及接口输入参数相应的细节,比如参数类型、参数顺序、参数值。最后还需要编写相应的代码来处理输出结果对象,输出结果由关联服务接口决定,由于服务接口业务的多样性,导致输出结果的不确定性,并增加了编写代码难度。
发明内容
为克服相关技术中存在的问题,本申请提供了一种智能调用Dubbo远程服务的方法及装置。
根据本申请的一方面,提供一种智能调用Dubbo(开源分布式服务框架)远程服务的方法,包括:
设置针对不同JAVA参数类型的设置规则和转换规则;
使用标准数据交换格式对Dubbo远程服务接口的参数进行参数配置,根据设置规则设置相应JAVA参数类型的参数,将所述参数配置的具体内容解析为以JAVA参数类型为单元的数据,针对不同的JAVA参数类型采用相应的转换规则进行转换,获得转换后的JAVA对象,将所有JAVA对象封装成符合所述标准数据交换格式的参数列表,使用所述参数列表调用所述Dubbo远程服务接口。
其中,设置针对不同JAVA参数类型的设置规则包括以下方式中的至少一种:
方式一,JAVA参数类型是JAVA基本类型,或者,是JAVA对象类型时,设置规则包括:设置参数名称,设置参数的基本类型类名,设置参数值;
JAVA基本类型包括boolean,char,byte,short,int,long,float,double,JAVA基本对象类型包括:Boolean,Character,Byte,Short,Integer,Long,Float,Double和String;
方式二,JAVA参数类型是JAVA基本类型的数组类型,或者,是JAVA基本对象类型的数组类型时,设置规则包括:设置参数名称,设置用于表示数组对象类型的数组类名,设置数组对象中的每条记录值;
JAVA基本类型的数组类型包括:boolean[],char[],byte[],short[],int[],long[],float[],double[],JAVA基本对象类型的数组类型包括:Boolean[],Character[],Byte[],Short[],Integer[],Long[],Float[],Double[]和String[];
方式三,JAVA参数类型是JAVA非基本对象类型(例如POJO对象类型)时,设置规则包括:设置参数名称,设置用于表示JAVA对象的类名,设置JAVA对象中每个属性的键值对;
方式四,JAVA参数类型是JAVA集合类的List列表类型或Set集对象类型时,设置规则包括:设置参数名称,设置用于表示该集合类型List或Set集对象的类名,设置List列表类型或Set集对象类型中所有记录值序列;
方式五,JAVA参数类型是JAVA集合类的Map映射对象类型时,设置规则包括:设置参数名称,设置用于表示Map映射对象类型的类名,设置Map映 射对象中每条记录的键值对;
方式六,输入参数的类型是JAVA日期类型或JAVA时间类型时,设置规则包括:设置参数名称,设置用于表示JAVA日期或时间的类名,设置参数值,设置解析参数值的日期或时间的格式值。
其中,JAVA参数类型是JAVA基本类型中的boolean、int或double类型时,或者JAVA参数类型是String对象类型时,设置规则包括:设置参数名称,设置参数值。
其中,JAVA参数类型是JAVA基本类型,或者,是JAVA基本类型的对象类型时,或者,是String对象类型时,转换规则是:通过类名进行JAVA参数类型匹配,确定参数值是否是空,如果为空,则设置为默认值,如果不为空,执行基础转换规则,所述基础转换规则为:参数值是数字对象时通过数字对象获取相应的基本类型值,参数值不是数字对象时通过相应基本类型对象来解析参数值;
JAVA参数类型是JAVA基本类型的数组对象,或者,是JAVA基本类型对象的数组对象类型时,转换规则是:通过类名来确定是否为数组,并通过数组类型映射表匹配数组类型,对数组中的值序列分别执行所述基础转换规则,组装成该类型的数组对象;
JAVA参数类型是简单的JAVA对象类型时,转换规则是:通过类名确定为简单的JAVA对象时,分别对对象的每个属性值执行所述基础转换规则;
JAVA参数类型是JAVA集合类的List列表或Set集类型时,转换规则是:通过类名来确定为集合类时,对List列表或Set集对象中的值序列分别进行执行所述基础转换规则,最后再组装成List列表或Set集对象;
JAVA参数类型是JAVA集合类的Map映射类型时,转换规则是:首先通过类名来确定为映射类时,对Map映射类型对象中的键值对分别执行所述基础转换规则,最后再组装成相应的Map对象;
JAVA参数类型是JAVA日期或时间类型时,转换规则是:通过类名进行日期或时间对象的类型匹配,确定是否设置日期或时间格式,如果设置,则采用该日期或时间格式值对参数值进行解析和格式化;如果未设置,则采用相应的 日期或时间对象类来进行默认的解析参数值。
其中,所述方法还包括:所述Dubbo远程服务接口的返回结果为具体值时,将此具体值作为调用结果,所述Dubbo远程服务接口的返回结果为对象时,使用对象JSON序列化技术将对象序列化成相应的JSON串作为调用结果。
根据本申请的另一方面,提供一种智能调用Dubbo远程服务的装置,包括:
设置模块,被设置为设置针对不同JAVA参数类型的设置规则和转换规则;
配置模块,被设置为使用标准数据交换格式对Dubbo远程服务接口的参数进行参数配置,根据设置规则设置相应JAVA参数类型的参数;
解析模块,被设置为将所述参数配置的具体内容解析为以JAVA参数类型为单元的数据;
转换模块,被设置为针对不同的JAVA参数类型采用相应的转换规则进行转换,获得转换后的JAVA对象;
封装模块,被设置为将所有JAVA对象封装成符合所述标准数据交换格式的参数列表,
调用模块,被设置为使用所述参数列表调用所述Dubbo远程服务接口。
其中,设置针对不同JAVA参数类型的设置规则包括以下方式中的至少一种:
方式一,JAVA参数类型是JAVA基本类型,或者,是JAVA对象类型时,设置规则包括:设置参数名称,设置参数的基本类型类名,设置参数值;
JAVA基本类型包括boolean,char,byte,short,int,long,float,double,JAVA基本对象类型包括:Boolean,Character,Byte,Short,Integer,Long,Float,Double和String;
方式二,JAVA参数类型是JAVA基本类型的数组类型,或者,是JAVA基本对象类型的数组类型时,设置规则包括:设置参数名称,设置用于表示数组对象类型的数组类名,设置数组对象中的每条记录值;
JAVA基本类型的数组类型包括:boolean[],char[],byte[],short[],int[],long[],float[],double[],JAVA基本对象类型的数组类型包括:Boolean[], Character[],Byte[],Short[],Integer[],Long[],Float[],Double[]和String[];
方式三,JAVA参数类型是JAVA非基本对象类型(例如POJO对象类型)时,设置规则包括:设置参数名称,设置用于表示JAVA对象的类名,设置JAVA对象中每个属性的键值对;
方式四,JAVA参数类型是JAVA集合类的List列表类型或Set集对象类型时,设置规则包括:设置参数名称,设置用于表示该集合类型List或Set集对象的类名,设置List列表类型或Set集对象类型中所有记录值序列;
方式五,JAVA参数类型是JAVA集合类的Map映射对象类型时,设置规则包括:设置参数名称,设置用于表示Map映射对象类型的类名,设置Map映射对象中每条记录的键值对;
方式六,输入参数的类型是JAVA日期类型或JAVA时间类型时,设置规则包括:设置参数名称,设置用于表示JAVA日期或时间的类名,设置参数值,设置解析参数值的日期或时间的格式值。
其中,JAVA参数类型是JAVA基本类型中的boolean、int或double类型时,或者JAVA参数类型是String对象类型时,设置规则包括:设置参数名称,设置参数值。
其中,JAVA参数类型是JAVA基本类型,或者,是JAVA基本类型的对象类型时,或者,是String对象类型时,转换规则是:通过类名进行JAVA参数类型匹配,确定参数值是否是空,如果为空,则设置为默认值,如果不为空,执行基础转换规则,所述基础转换规则为:参数值是数字对象时通过数字对象获取相应的基本类型值,参数值不是数字对象时通过相应基本类型对象来解析参数值;
JAVA参数类型是JAVA基本类型的数组对象,或者,是JAVA基本类型对象的数组对象类型时,转换规则是:通过类名来确定是否为数组,并通过数组类型映射表匹配数组类型,对数组中的值序列分别执行所述基础转换规则,组装成该类型的数组对象;
JAVA参数类型是简单的JAVA对象类型时,转换规则是:通过类名确定为简单的JAVA对象时,分别对对象的每个属性值执行所述基础转换规则;
JAVA参数类型是JAVA集合类的List列表或Set集类型时,转换规则是:通过类名来确定为集合类时,对List列表或Set集对象中的值序列分别进行执行所述基础转换规则,最后再组装成List列表或Set集对象;
JAVA参数类型是JAVA集合类的Map映射类型时,转换规则是:首先通过类名来确定为映射类时,对Map映射类型对象中的键值对分别执行所述基础转换规则,最后再组装成相应的Map对象;
JAVA参数类型是JAVA日期或时间类型时,转换规则是:通过类名进行日期或时间对象的类型匹配,确定是否设置日期或时间格式,如果设置,则采用该日期或时间格式值对参数值进行解析和格式化;如果未设置,则采用相应的日期或时间对象类来进行默认的解析参数值。
其中,所述装置还包括结果统一模块,被设置为在所述Dubbo远程服务接口的返回结果为具体值时,将此具体值作为调用结果,在所述Dubbo远程服务接口的返回结果为对象时,使用对象JSON序列化技术将对象序列化成相应的JSON串作为调用结果。
本发明实施例的另一方面,提供了一种计算机设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述程序时实现上述方法的步骤。
本发明实施例的另一方面,提供了一种计算机可读存储介质,所述存储介质上存储有计算机程序,所述程序被处理器执行时实现上述方法的步骤。
本发明实施例中的智能调用Dubbo远程服务的方法及装置,可以实现以下
有益效果:
1)无需依赖服务接口,实现与服务依赖的解耦。
2)通过统一标准化的配置,来设置Dubbo服务相应的输入参数,该发明的将参数的解析和映射以及类型转换进行了相应的封装,使用过程中不需要任何额外的编码操作。
3)针对具体业务相关的服务接口所返回数据对象的不确定性,并需要通过编码来实现具体业务返回数据的解析和抽取工作,通过该发明实现了输出结果的统一化和标准化。
4)由于输入输出参数皆使用现有标准格式,比如JSON或XML,任何第三方服务的输出均可作为该输入参数,输出结果也可直接提供给其他支持JSON或XML输入的应用程序使用,从而简化了服务接口调用的难度,避免了对服务接口业务的强依赖性。
5)Dubbo技术是基于Java语言的远程服务框架,该发明实现了与Java语言的解耦,无需Java语言基础也可以使用Dubbo,大大的降低了使用难度,从而使开发人员更多的关注于业务,无需关注具体的某种编程开发语言,旨在“专注业务,弱化编程”。
附图说明
构成本申请的一部分的附图用来提供对本申请的进一步理解,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:
图1是现有技术中依赖服务接口的调用Dubbo远程服务的方法示意图;
图2是根据一示例性实施例示出的一种调用Dubbo远程服务的方法的流程图;
图3是根据一示例性实施例示出的另一种智能调用Dubbo远程服务的方法的流程图;
图4是根据一示例性实施例示出的一种智能调用Dubbo远程服务的装置的框图;
图5是根据一示例性实施例示出的一种用于调用Dubbo远程服务方法的装置的框图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。需要说明的是, 在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。
图2是本发明实施例中调用Dubbo远程服务的方法示意图,本发明实施例无需依赖Dubbo远程服务接口。
如图3所示,智能调用Dubbo远程服务的方法,包括:
步骤301,设置针对不同JAVA参数类型的设置规则和转换规则;
步骤302,使用标准数据交换格式对Dubbo远程服务接口的参数进行参数配置,根据设置规则设置相应JAVA参数类型的参数,将参数配置的具体内容解析为以JAVA参数类型为单元的数据,针对不同的JAVA参数类型采用相应的转换规则进行转换,获得转换后的JAVA对象,将所有JAVA对象封装成符合标准数据交换格式的参数列表;
步骤303,使用参数列表调用Dubbo远程服务接口。
步骤301中,标准数据交换格式为JSON格式。
步骤302中,设置针对不同JAVA参数类型的设置规则包括以下方式中的至少一种:
方式一,JAVA参数类型是JAVA基本类型,或者,是JAVA对象类型时,设置规则包括:设置参数名称,设置参数的基本类型类名,设置参数值。
JAVA基本类型包括boolean,char,byte,short,int,long,float,double,JAVA基本对象类型包括:Boolean,Character,Byte,Short,Integer,Long,Float,Double和String,其中前八个对象类型是与基本类型相对应的。
方式二,JAVA参数类型是JAVA基本类型的数组类型,或者,是JAVA基本对象类型的数组类型时,设置规则包括:设置参数名称,设置用于表示数组对象类型的数组类名,设置数组对象中的每条记录值;
JAVA基本类型的数组类型包括:boolean[],char[],byte[],short[],int[],long[],float[],double[],JAVA基本对象类型的数组类型包括:Boolean[],Character[],Byte[],Short[],Integer[],Long[],Float[],Double[]和String[]。
方式三,JAVA参数类型是JAVA非基本对象类型(例如POJO(Plain Old Java Object)对象类型)时,设置规则包括:设置参数名称,设置用于表示JAVA对象的类名,设置JAVA对象中每个属性的键值对;
方式四,JAVA参数类型是JAVA集合类的List列表类型或Set集对象类型 时,设置规则包括:设置参数名称,设置用于表示该集合类型List或Set集对象的类名,设置List列表类型或Set集对象类型中所有记录值序列;
方式五,JAVA参数类型是JAVA集合类的Map映射对象类型时,设置规则包括:设置参数名称,设置用于表示Map映射对象类型的类名,设置Map映射对象中每条记录的键值对;
方式六,输入参数的类型是JAVA日期类型或JAVA时间类型时,设置规则包括:设置参数名称,设置用于表示JAVA日期或时间的类名,设置参数值,设置解析参数值的日期或时间的格式值。
其中,
JAVA参数类型是JAVA基本类型中的boolean、int或double类型时,或者JAVA参数类型是String对象类型时,还可以使用简化的设置规则,包括:设置参数名称,设置参数值。
步骤302中转换规则具体如下:
1)JAVA参数类型是JAVA基本类型,或者,是JAVA基本类型的对象类型时,或者,是String对象类型时,转换规则是:通过类名进行JAVA参数类型匹配,确定参数值是否是空,如果为空,则设置为默认值,如果不为空,执行基础转换规则,基础转换规则为:参数值是数字对象时通过数字对象获取相应的基本类型值,参数值不是数字对象时通过相应基本类型对象来解析参数值。
例如:float数字基本类型作为输入参数时,需明确设置参数名称name字段,类名class字段及值value字段:
Figure PCTCN2019105325-appb-000001
如果输入参数为对应的基本类型Float对象类型,则类名class字段需指定Float对象类型的Java对象名:
Figure PCTCN2019105325-appb-000002
Figure PCTCN2019105325-appb-000003
如下为基本类型匹配解析和转换的convertSingle方法中针对Float对象类型的代码实现片段:
Figure PCTCN2019105325-appb-000004
例如:byte数字基本类型,通过Byte对象进行解析和转换的convertSingle方法片段:
Figure PCTCN2019105325-appb-000005
Figure PCTCN2019105325-appb-000006
输入参数是boolean基本类型,除可采用简省格式配置外,也可明确指定类名class:
Figure PCTCN2019105325-appb-000007
如果是Boolean对象类型,必须明确指定class字段为Boolean类名:
Figure PCTCN2019105325-appb-000008
针对boolean基本类型和Boolean对象类型进行统一的匹配解析,如下为基本类型匹配解析和转换的convertSingle方法中针对Boolean对象类型的代码实现片段:
Figure PCTCN2019105325-appb-000009
2)JAVA参数类型是JAVA基本类型的数组对象,或者,是JAVA基本类型对象的数组对象类型时,转换规则是:通过类名来确定是否为数组,并通过数组类型映射表匹配数组类型,对数组中的值序列分别执行基础转换规则,组装成该类型的数组对象。
对于基本类型数组以及对应的对象数组,Java针对基本类型的数组类名有一套独特JAVA语言内部表示法,由于该表示法不利于配置和可读性,该发明构建一张数组类型映射表,如表1所示,为了方便开发人员易于阅读和理解数组的表示,具体映射表如下:
表1
数组表示 Java数组类名
boolean[] [Z
char[] [C
byte[] [B
short[] [S
int[] [I
long[] [J
float[] [F
double[] [D
String[] [Ljava.lang.String;
比如基本类型boolean的数组对象,则可配置为:
Figure PCTCN2019105325-appb-000010
匹配解析时,先通过映射表TYPE_MAPPING获得与配置相同class字段值,匹配数组对象后,针对数组中的值序列,将每个值通过调用convertSingle方法进行基本类型的匹配解析和转换(比如数字类基本类型byte、short、int、long、float、double和boolean类型等),最后返回整个转换后的数组对象,实现代码片段:
Figure PCTCN2019105325-appb-000011
3)JAVA参数类型是POJO对象类型时,转换规则是:通过类名确定为简单的JAVA对象时,分别对对象的每个属性值执行基础转换规则。
例如:
class字段来指定POJO对象的类名,name字段为参数名字,value字段为该POJO对象的属性名与值的键值对:
Figure PCTCN2019105325-appb-000012
4)JAVA参数类型是JAVA集合类的List列表或Set集类型时,转换规则是:通过类名来确定为集合类时,对List列表或Set集对象中的值序列分别进行执行基础转换规则,最后再组装成List列表或Set集对象;
5)JAVA参数类型是JAVA集合类的Map映射类型时,转换规则是:首先通过类名来确定为映射类时,对Map映射类型对象中的键值对分别执行基础转 换规则,最后再组装成相应的Map对象;
Map对象类型是key/value键值对的组合配置:
Figure PCTCN2019105325-appb-000013
匹配解析时,将逐条处理key和value的键值对,然后分别通过调用convertSingle方法进行类型匹配解析和转换,最后将转换后的键值对进行整合的实现代码片段:
Figure PCTCN2019105325-appb-000014
Figure PCTCN2019105325-appb-000015
6)JAVA参数类型是JAVA日期或时间类型时,转换规则是:通过类名进行日期或时间对象的类型匹配,确定是否设置日期或时间格式,如果设置,则采用该日期或时间格式值对参数值进行解析和格式化;如果未设置,则采用相应的日期或时间对象类来进行默认的解析参数值。
例如:LocalDate日期类型的配置为:
Figure PCTCN2019105325-appb-000016
默认为ISO-8601日期格式,即“uuuu-MM-dd”格式。如果需指定其他日期格式,则需提供“pattern”字段指定解析格式:
Figure PCTCN2019105325-appb-000017
Figure PCTCN2019105325-appb-000018
首先检查是否设置了日期格式字段,如果设置,则使用该日期格式进行解析参数值,否则将采用默认的ISO-8601日期格式来解析
Figure PCTCN2019105325-appb-000019
步骤303后,本方法还包括:Dubbo远程服务接口的返回结果为具体值时,将此具体值作为调用结果,Dubbo远程服务接口的返回结果为对象时,使用对象JSON序列化技术将对象序列化成相应的JSON串作为调用结果。
由于Java语言的限制,服务接口仅能返回单个值或单个对象,为了统一返回结果,Dubbo远程服务接口的返回结果为具体值时,将此具体值作为调用结果,比如boolean类型的返回结果:
Figure PCTCN2019105325-appb-000020
如果返回结果为对象,将通过现有的对象JSON序列化技术,将对象序列化成相应的JSON串,作为统一键result的值,比如Person对象,则返回结果为:
Figure PCTCN2019105325-appb-000021
Figure PCTCN2019105325-appb-000022
如图4所示,智能调用Dubbo远程服务的装置,包括:
设置模块401,被设置为设置针对不同JAVA参数类型的设置规则和转换规则;
配置模块402,被设置为使用标准数据交换格式对Dubbo远程服务接口的参数进行参数配置,根据设置规则设置相应JAVA参数类型的参数;
解析模块403,被设置为将参数配置的具体内容解析为以JAVA参数类型为单元的数据;
转换模块404,被设置为针对不同的JAVA参数类型采用相应的转换规则进行转换,获得转换后的JAVA对象;
封装模块405,被设置为将所有JAVA对象封装成符合标准数据交换格式的参数列表,
调用模块406,被设置为使用参数列表调用Dubbo远程服务接口。
其中,
设置针对不同JAVA参数类型的设置规则包括以下方式中的至少一种:
方式一,JAVA参数类型是JAVA基本类型,或者,是JAVA对象类型时,设置规则包括:设置参数名称,设置参数的基本类型类名,设置参数值;
JAVA基本类型包括boolean,char,byte,short,int,long,float,double,JAVA基本对象类型包括:Boolean,Character,Byte,Short,Integer,Long, Float,Double和String;
方式二,JAVA参数类型是JAVA基本类型的数组类型,或者,是JAVA基本对象类型的数组类型时,设置规则包括:设置参数名称,设置用于表示数组对象类型的数组类名,设置数组对象中的每条记录值;
JAVA基本类型的数组类型包括:boolean[],char[],byte[],short[],int[],long[],float[],double[],JAVA基本对象类型的数组类型包括:Boolean[],Character[],Byte[],Short[],Integer[],Long[],Float[],Double[]和String[];
方式三,JAVA参数类型是JAVA非基本对象类型(例如POJO对象类型)时,设置规则包括:设置参数名称,设置用于表示JAVA对象的类名,设置JAVA对象中每个属性的键值对;
方式四,JAVA参数类型是JAVA集合类的List列表类型或Set集对象类型时,设置规则包括:设置参数名称,设置用于表示该集合类型List或Set集对象的类名,设置List列表类型或Set集对象类型中所有记录值序列;
方式五,JAVA参数类型是JAVA集合类的Map映射对象类型时,设置规则包括:设置参数名称,设置用于表示Map映射对象类型的类名,设置Map映射对象中每条记录的键值对;
方式六,输入参数的类型是JAVA日期类型或JAVA时间类型时,设置规则包括:设置参数名称,设置用于表示JAVA日期或时间的类名,设置参数值,设置解析参数值的日期或时间的格式值。
JAVA参数类型是JAVA基本类型中的boolean、int或double类型时,或者JAVA参数类型是String对象类型时,设置规则包括:设置参数名称,设置参数值。
JAVA参数类型是JAVA基本类型,或者,是JAVA基本类型的对象类型时,或者,是String对象类型时,转换规则是:通过类名进行JAVA参数类型匹配,确定参数值是否是空,如果为空,则设置为默认值,如果不为空,执行基础转换规则,基础转换规则为:参数值是数字对象时通过数字对象获取相应的基本类型值,参数值不是数字对象时通过相应基本类型对象来解析参数值;
JAVA参数类型是JAVA基本类型的数组对象,或者,是JAVA基本类型对 象的数组对象类型时,转换规则是:通过类名来确定是否为数组,并通过数组类型映射表匹配数组类型,对数组中的值序列分别执行基础转换规则,组装成该类型的数组对象;
JAVA参数类型是简单的JAVA对象类型时,转换规则是:通过类名确定为简单的JAVA对象时,分别对对象的每个属性值执行基础转换规则;
JAVA参数类型是JAVA集合类的List列表或Set集类型时,转换规则是:通过类名来确定为集合类时,对List列表或Set集对象中的值序列分别进行执行基础转换规则,最后再组装成List列表或Set集对象;
JAVA参数类型是JAVA集合类的Map映射类型时,转换规则是:首先通过类名来确定为映射类时,对Map映射类型对象中的键值对分别执行基础转换规则,最后再组装成相应的Map对象;
JAVA参数类型是JAVA日期或时间类型时,转换规则是:通过类名进行日期或时间对象的类型匹配,确定是否设置日期或时间格式,如果设置,则采用该日期或时间格式值对参数值进行解析和格式化;如果未设置,则采用相应的日期或时间对象类来进行默认的解析参数值。
本装置还包括结果统一模块,被设置为在Dubbo远程服务接口的返回结果为具体值时,将此具体值作为调用结果,在Dubbo远程服务接口的返回结果为对象时,使用对象JSON序列化技术将对象序列化成相应的JSON串作为调用结果。
下面通过具体实施例说明本申请。
具体实施例:
原Dubbo服务有如下三个接口方法:
Figure PCTCN2019105325-appb-000023
由于参数类型、参数个数,参数对象都与业务紧密相关,现有技术中的方式针对不同的业务背景,每个接口方法的调用都需要单独实现与自身接口方法 的业务紧密相关的一套代码来处理,针对不同的Java类型或对象的输入参数设置和输出参数,复杂度由此可见,势必增大开发人员的开发与后期维护成本。
本实施例中选用标准的JSON来统一输入参数和输出参数,并对远程服务接口的调用进行封装,开发人员在使用过程中,只需要了解服务接口规范,即可通过可配置的方式来处理输入参数,并调用该发明实现好的封装程序来进行远程调用,比如参数配置:
1)第一个服务接口的输入参数的JSON配置,即为参数名字和参数值的键值对:
Figure PCTCN2019105325-appb-000024
如果参数为Java的三种基本类型的int,double,boolean和String对象,则可采用以上的简省格式配置,即参数名字与参数值的键值对,而无需额外的其他字段。这是由于JSON基本数据类型(string,number,boolean)的限制,所以只支持Java的这三种基本类型和一种String对象类型。
2)对于第二种Map类型的服务接口,参数的配置需指定class字段指明Map类型以及参数名字name和map内的每条记录的键值key/value对:
Figure PCTCN2019105325-appb-000025
Figure PCTCN2019105325-appb-000026
本发明实施例的方法中的步骤可以根据实际需要进行顺序调整、合并和删减。
本发明实施例的智能调用Dubbo远程服务的方法中的单元模块可以根据实际需要进行合并、划分和删减。
本发明实施例还提供了一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,处理器执行此程序时实现上述方法的步骤。
本发明实施例还提供了一种计算机可读存储介质,此存储介质上存储有计算机程序,所述程序被处理器执行时实现上述方法的步骤。
图5是根据一示例性实施例示出的一种用于智能调用Dubbo远程服务方法的装置500的框图。例如,装置500可以被提供为一服务器。参照图5,装置 500包括处理器501,处理器的个数可以根据需要设置为一个或者多个。装置500还存储器502,设置为存储可由处理器501执行的指令,例如应用程序。存储器的个数可以根据需要设置一个或者多个,其存储的应用程序可以为一个或者多个。处理器501被设置为执行指令,以执行上述方法。
本发明实施例中的智能调用Dubbo远程服务的方法及装置,可以实现以下有益效果:
1)无需依赖服务接口,实现与服务依赖的解耦。
2)通过统一标准化的配置,来设置Dubbo服务相应的输入参数,该发明的将参数的解析和映射以及类型转换进行了相应的封装,使用过程中不需要任何额外的编码操作。
3)针对具体业务相关的服务接口所返回数据对象的不确定性,并需要通过编码来实现具体业务返回数据的解析和抽取工作,通过该发明实现了输出结果的统一化和标准化。
4)由于输入输出参数皆使用现有标准格式,比如JSON或XML,任何第三方服务的输出均可作为该输入参数,输出结果也可直接提供给其他支持JSON或XML输入的应用程序使用,从而简化了服务接口调用的难度,避免了对服务接口业务的强依赖性。
5)Dubbo技术是基于Java语言的远程服务框架,该发明实现了与Java语言的解耦,无需Java语言基础也可以使用Dubbo,大大的降低了使用难度,从而使开发人员更多的关注于业务,无需关注具体的某种编程开发语言,旨在“专注业务,弱化编程”。
本领域技术人员应明白,本申请的实施例可提供为方法、装置(设备)、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质上实施的计算机程序产品的形式。计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质,包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访 问的任何其他的介质等。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。
本申请是参照根据本发明实施例的方法、装置(设备)和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括……”限定的要素,并不排除在包括所述要素的物品或者设备中还存在另外的相同要素。
尽管已描述了本申请的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本申请范围的所有变更和修改。
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请的意图也包含这些改动和变型在内。
工业实用性
本文中的智能调用Dubbo远程服务的方法及装置,在通过仅需指定服务接口名字和参数的动态配置信息即可调用远程服务,实现在不编写任何与服务接口相关代码的前提下,无需服务接口的依赖,不必考虑参数类型与编程语言相关的兼容性问题,也不用关注参数的类型,也不需要维护不确定性的输出结果,远程服务调用的输出结果最终将以标准JSON格式进行统一输出,来达到简化远程调用和统一输出的解决方法。

Claims (12)

  1. 一种智能调用开源分布式服务框架Dubbo远程服务的方法,包括:
    设置针对不同JAVA参数类型的设置规则和转换规则;
    使用标准数据交换格式对Dubbo远程服务接口的参数进行参数配置,根据设置规则设置相应JAVA参数类型的参数,将所述参数配置的具体内容解析为以JAVA参数类型为单元的数据,针对不同的JAVA参数类型采用相应的转换规则进行转换,获得转换后的JAVA对象,将所有JAVA对象封装成符合所述标准数据交换格式的参数列表,使用所述参数列表调用所述Dubbo远程服务接口。
  2. 如权利要求1所述的智能调用Dubbo远程服务的方法,其中,
    设置针对不同JAVA参数类型的设置规则包括以下方式中的至少一种:
    方式一,JAVA参数类型是JAVA基本类型,或者,是JAVA对象类型时,设置规则包括:设置参数名称,设置参数的基本类型类名,设置参数值;
    JAVA基本类型包括boolean,char,byte,short,int,long,float,double,JAVA基本对象类型包括:Boolean,Character,Byte,Short,Integer,Long,Float,Double和String;
    方式二,JAVA参数类型是JAVA基本类型的数组类型,或者,是JAVA基本对象类型的数组类型时,设置规则包括:设置参数名称,设置用于表示数组对象类型的数组类名,设置数组对象中的每条记录值;
    JAVA基本类型的数组类型包括:boolean[],char[],byte[],short[],int[],long[],float[],double[],JAVA基本对象类型的数组类型包括:Boolean[],Character[],Byte[],Short[],Integer[],Long[],Float[],Double[]和String[];
    方式三,JAVA参数类型是JAVA非基本对象类型时,设置规则包括:设置参数名称,设置用于表示JAVA对象的类名,设置JAVA对象中每个属性的键值对;
    方式四,JAVA参数类型是JAVA集合类的List列表类型或Set集对象类型 时,设置规则包括:设置参数名称,设置用于表示该集合类型List或Set集对象的类名,设置List列表类型或Set集对象类型中所有记录值序列;
    方式五,JAVA参数类型是JAVA集合类的Map映射对象类型时,设置规则包括:设置参数名称,设置用于表示Map映射对象类型的类名,设置Map映射对象中每条记录的键值对;
    方式六,输入参数的类型是JAVA日期类型或JAVA时间类型时,设置规则包括:设置参数名称,设置用于表示JAVA日期或时间的类名,设置参数值,设置解析参数值的日期或时间的格式值。
  3. 如权利要求1所述的智能调用Dubbo远程服务的方法,其中,
    JAVA参数类型是JAVA基本类型中的boolean、int或double类型时,或者JAVA参数类型是String对象类型时,设置规则包括:设置参数名称,设置参数值。
  4. 如权利要求1所述的智能调用Dubbo远程服务的方法,其中,
    JAVA参数类型是JAVA基本类型,或者,是JAVA基本类型的对象类型时,或者,是String对象类型时,转换规则是:通过类名进行JAVA参数类型匹配,确定参数值是否是空,如果为空,则设置为默认值,如果不为空,执行基础转换规则,所述基础转换规则为:参数值是数字对象时通过数字对象获取相应的基本类型值,参数值不是数字对象时通过相应基本类型对象来解析参数值;
    JAVA参数类型是JAVA基本类型的数组对象,或者,是JAVA基本类型对象的数组对象类型时,转换规则是:通过类名来确定是否为数组,并通过数组类型映射表匹配数组类型,对数组中的值序列分别执行所述基础转换规则,组装成该类型的数组对象;
    JAVA参数类型是简单的JAVA对象类型时,转换规则是:通过类名确定为简单的JAVA对象时,分别对对象的每个属性值执行所述基础转换规则;
    JAVA参数类型是JAVA集合类的List列表或Set集类型时,转换规则是:通过类名来确定为集合类时,对List列表或Set集对象中的值序列分别进行执行所述基础转换规则,最后再组装成List列表或Set集对象;
    JAVA参数类型是JAVA集合类的Map映射类型时,转换规则是:首先通 过类名来确定为映射类时,对Map映射类型对象中的键值对分别执行所述基础转换规则,最后再组装成相应的Map对象;
    JAVA参数类型是JAVA日期或时间类型时,转换规则是:通过类名进行日期或时间对象的类型匹配,确定是否设置日期或时间格式,如果设置,则采用该日期或时间格式值对参数值进行解析和格式化;如果未设置,则采用相应的日期或时间对象类来进行默认的解析参数值。
  5. 如权利要求1所述的智能调用Dubbo远程服务的方法,还包括:
    所述Dubbo远程服务接口的返回结果为具体值时,将此具体值作为调用结果,所述Dubbo远程服务接口的返回结果为对象时,使用对象JSON序列化技术将对象序列化成相应的JSON串作为调用结果。
  6. 一种智能调用Dubbo远程服务的装置,包括:
    设置模块,被设置为设置针对不同JAVA参数类型的设置规则和转换规则;
    配置模块,被设置为使用标准数据交换格式对Dubbo远程服务接口的参数进行参数配置,根据设置规则设置相应JAVA参数类型的参数;
    解析模块,被设置为将所述参数配置的具体内容解析为以JAVA参数类型为单元的数据;
    转换模块,被设置为针对不同的JAVA参数类型采用相应的转换规则进行转换,获得转换后的JAVA对象;
    封装模块,被设置为将所有JAVA对象封装成符合所述标准数据交换格式的参数列表,
    调用模块,被设置为使用所述参数列表调用所述Dubbo远程服务接口。
  7. 如权利要求6所述的智能调用Dubbo远程服务的装置,其中,
    设置针对不同JAVA参数类型的设置规则包括以下方式中的至少一种:
    方式一,JAVA参数类型是JAVA基本类型,或者,是JAVA对象类型时,设置规则包括:设置参数名称,设置参数的基本类型类名,设置参数值;
    JAVA基本类型包括boolean,char,byte,short,int,long,float,double,JAVA基本对象类型包括:Boolean,Character,Byte,Short,Integer,Long,Float,Double和String;
    方式二,JAVA参数类型是JAVA基本类型的数组类型,或者,是JAVA基本对象类型的数组类型时,设置规则包括:设置参数名称,设置用于表示数组对象类型的数组类名,设置数组对象中的每条记录值;
    JAVA基本类型的数组类型包括:boolean[],char[],byte[],short[],int[],long[],float[],double[],JAVA基本对象类型的数组类型包括:Boolean[],Character[],Byte[],Short[],Integer[],Long[],Float[],Double[]和String[];
    方式三,JAVA参数类型是JAVA非基本对象类型时,设置规则包括:设置参数名称,设置用于表示JAVA对象的类名,设置JAVA对象中每个属性的键值对;
    方式四,JAVA参数类型是JAVA集合类的List列表类型或Set集对象类型时,设置规则包括:设置参数名称,设置用于表示该集合类型List或Set集对象的类名,设置List列表类型或Set集对象类型中所有记录值序列;
    方式五,JAVA参数类型是JAVA集合类的Map映射对象类型时,设置规则包括:设置参数名称,设置用于表示Map映射对象类型的类名,设置Map映射对象中每条记录的键值对;
    方式六,输入参数的类型是JAVA日期类型或JAVA时间类型时,设置规则包括:设置参数名称,设置用于表示JAVA日期或时间的类名,设置参数值,设置解析参数值的日期或时间的格式值。
  8. 如权利要求6所述的智能调用Dubbo远程服务的装置,其中,
    JAVA参数类型是JAVA基本类型中的boolean、int或double类型时,或者JAVA参数类型是String对象类型时,设置规则包括:设置参数名称,设置参数值。
  9. 如权利要求6所述的智能调用Dubbo远程服务的装置,其中,
    JAVA参数类型是JAVA基本类型,或者,是JAVA基本类型的对象类型时,或者,是String对象类型时,转换规则是:通过类名进行JAVA参数类型匹配,确定参数值是否是空,如果为空,则设置为默认值,如果不为空,执行基础转换规则,所述基础转换规则为:参数值是数字对象时通过数字对象获取相应的基本类型值,参数值不是数字对象时通过相应基本类型对象来解析参数值;
    JAVA参数类型是JAVA基本类型的数组对象,或者,是JAVA基本类型对象的数组对象类型时,转换规则是:通过类名来确定是否为数组,并通过数组类型映射表匹配数组类型,对数组中的值序列分别执行所述基础转换规则,组装成该类型的数组对象;
    JAVA参数类型是简单的JAVA对象类型时,转换规则是:通过类名确定为简单的JAVA对象时,分别对对象的每个属性值执行所述基础转换规则;
    JAVA参数类型是JAVA集合类的List列表或Set集类型时,转换规则是:通过类名来确定为集合类时,对List列表或Set集对象中的值序列分别进行执行所述基础转换规则,最后再组装成List列表或Set集对象;
    JAVA参数类型是JAVA集合类的Map映射类型时,转换规则是:首先通过类名来确定为映射类时,对Map映射类型对象中的键值对分别执行所述基础转换规则,最后再组装成相应的Map对象;
    JAVA参数类型是JAVA日期或时间类型时,转换规则是:通过类名进行日期或时间对象的类型匹配,确定是否设置日期或时间格式,如果设置,则采用该日期或时间格式值对参数值进行解析和格式化;如果未设置,则采用相应的日期或时间对象类来进行默认的解析参数值。
  10. 如权利要求6所述的智能调用Dubbo远程服务的装置,还包括:
    结果统一模块,被设置为在所述Dubbo远程服务接口的返回结果为具体值时,将此具体值作为调用结果,在所述Dubbo远程服务接口的返回结果为对象时,使用对象JSON序列化技术将对象序列化成相应的JSON串作为调用结果。
  11. 一种计算机设备,包括处理器、存储器和存储于所述存储器上的计算机程序,所述处理器执行所述计算机程序时实现如权利要求1-5中任意一项所述方法的步骤。
  12. 一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被执行时实现如权利要求1-5中任意一项所述方法的步骤。
PCT/CN2019/105325 2018-09-14 2019-09-11 一种智能调用Dubbo远程服务的方法、装置、设备及介质 WO2020052582A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811076788.9 2018-09-14
CN201811076788.9A CN109298954B (zh) 2018-09-14 2018-09-14 一种智能调用Dubbo远程服务的方法及装置

Publications (1)

Publication Number Publication Date
WO2020052582A1 true WO2020052582A1 (zh) 2020-03-19

Family

ID=65163211

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/105325 WO2020052582A1 (zh) 2018-09-14 2019-09-11 一种智能调用Dubbo远程服务的方法、装置、设备及介质

Country Status (2)

Country Link
CN (1) CN109298954B (zh)
WO (1) WO2020052582A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112333270A (zh) * 2020-11-04 2021-02-05 中国电力财务有限公司 一种微服务动态路由的方法及系统

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109298954B (zh) * 2018-09-14 2019-10-25 北京数聚鑫云信息技术有限公司 一种智能调用Dubbo远程服务的方法及装置
CN111756779B (zh) * 2019-03-26 2022-07-26 阿里巴巴集团控股有限公司 数据序列化处理方法、装置及计算机系统
CN112084046B (zh) * 2020-09-12 2021-12-21 深圳市艾可思信息技术有限公司 一种分布式计算中泛化接口调用方法及装置
CN114116067B (zh) * 2021-12-02 2024-02-27 多点生活(武汉)科技有限公司 内外系统的信息配置方法、装置、电子设备和可读存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103136095A (zh) * 2011-11-28 2013-06-05 阿里巴巴集团控股有限公司 一种测试应用程序接口的方法、装置及系统
CN105117938A (zh) * 2015-08-19 2015-12-02 江苏农牧人电子商务股份有限公司 一种基于模型视图控制器的电商构架请求数据分析方法
US20160188301A1 (en) * 2014-12-29 2016-06-30 Yan Zang Source code editor
CN105787128A (zh) * 2016-03-29 2016-07-20 四川秘无痕信息安全技术有限责任公司 一种恢复Java序列化文件数据的方法
CN107229474A (zh) * 2017-05-31 2017-10-03 成都药王科技股份有限公司 基于可视化界面快速配置Java接口和图表服务的方法及装置
CN109298954A (zh) * 2018-09-14 2019-02-01 北京数聚鑫云信息技术有限公司 一种智能调用Dubbo远程服务的方法及装置

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101216760A (zh) * 2007-12-28 2008-07-09 北京方正国际软件系统有限公司 一种动态映射接口调用系统及方法
CN101697139B (zh) * 2009-11-06 2013-04-17 金蝶软件(中国)有限公司 一种远程过程调用方法、装置和注册库
CN103391294A (zh) * 2013-07-24 2013-11-13 佳都新太科技股份有限公司 一种基于服务描述的远程方法调用
CN105068854B (zh) * 2015-08-07 2018-04-06 杭州古北电子科技有限公司 一种使用相同规则实现对不同产品的控制的方法
CN106411933B (zh) * 2016-11-15 2019-09-10 深圳市彬讯科技有限公司 一种可进行服务治理与语言调用的轻量级rpc系统
CN107908541B (zh) * 2017-07-26 2020-10-30 平安壹钱包电子商务有限公司 接口测试方法、装置、计算机设备及存储介质
CN108255615B (zh) * 2017-11-30 2022-03-01 平安科技(深圳)有限公司 跨语言调用方法、服务器及存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103136095A (zh) * 2011-11-28 2013-06-05 阿里巴巴集团控股有限公司 一种测试应用程序接口的方法、装置及系统
US20160188301A1 (en) * 2014-12-29 2016-06-30 Yan Zang Source code editor
CN105117938A (zh) * 2015-08-19 2015-12-02 江苏农牧人电子商务股份有限公司 一种基于模型视图控制器的电商构架请求数据分析方法
CN105787128A (zh) * 2016-03-29 2016-07-20 四川秘无痕信息安全技术有限责任公司 一种恢复Java序列化文件数据的方法
CN107229474A (zh) * 2017-05-31 2017-10-03 成都药王科技股份有限公司 基于可视化界面快速配置Java接口和图表服务的方法及装置
CN109298954A (zh) * 2018-09-14 2019-02-01 北京数聚鑫云信息技术有限公司 一种智能调用Dubbo远程服务的方法及装置

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112333270A (zh) * 2020-11-04 2021-02-05 中国电力财务有限公司 一种微服务动态路由的方法及系统
CN112333270B (zh) * 2020-11-04 2024-05-03 中国电力财务有限公司 一种微服务动态路由的方法及系统

Also Published As

Publication number Publication date
CN109298954A (zh) 2019-02-01
CN109298954B (zh) 2019-10-25

Similar Documents

Publication Publication Date Title
WO2020052582A1 (zh) 一种智能调用Dubbo远程服务的方法、装置、设备及介质
CN108228166B (zh) 一种基于模板的后端代码生成方法及系统
US9804837B2 (en) System and method for creating, managing, and reusing schema type definitions in services oriented architecture services, grouped in the form of libraries
US8418142B2 (en) Architecture for data validation
US7350184B2 (en) System and method for enterprise application interactions
US20190129734A1 (en) Data collection workflow extension
US20090276784A1 (en) Resource management method
US10558653B2 (en) Dynamic, variable-data attribute data service
CN108427550B (zh) 一种Web服务生成方法、装置及设备
US20150046902A1 (en) Execution semantics for sub-processes in bpel
US20230046582A1 (en) Cloud-based api metadata management method and system for integrated api management
US20220179651A1 (en) Smart contract client program generation method, system and device, and medium
US20180307692A1 (en) Software application interface for mediating access to services of a centralized data store
US8135757B2 (en) Generating references to reusable code in a schema
CN112650526B (zh) 版本一致性的检测方法、装置、电子设备和介质
US7346889B1 (en) Method and system for building message instances
CN112134900A (zh) 数据报文处理方法及装置
CN111966704A (zh) Orm框架实现方法、系统、计算机设备和存储介质
US8930960B2 (en) Methods and systems for object interpretation within a shared object space
US11803786B2 (en) Enterprise integration platform
CN116149666A (zh) Sql语句的语法检查方法、系统、电子设备及可读存储介质
CA2777656A1 (en) Maintaining data integrity across execution environments
CN113342399A (zh) 应用项目的结构配置方法、装置及可读存储介质
US11966719B2 (en) Event consumption for high-level programing language platform
CN111198899A (zh) 应用程序中实体渲染的开发系统及方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19859903

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 240621)

122 Ep: pct application non-entry in european phase

Ref document number: 19859903

Country of ref document: EP

Kind code of ref document: A1