CN109274731A - Deployment, call method and the device of web services based on multi-tenant technology - Google Patents

Deployment, call method and the device of web services based on multi-tenant technology Download PDF

Info

Publication number
CN109274731A
CN109274731A CN201811025208.3A CN201811025208A CN109274731A CN 109274731 A CN109274731 A CN 109274731A CN 201811025208 A CN201811025208 A CN 201811025208A CN 109274731 A CN109274731 A CN 109274731A
Authority
CN
China
Prior art keywords
tenant
authorization check
operation system
request
web services
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.)
Granted
Application number
CN201811025208.3A
Other languages
Chinese (zh)
Other versions
CN109274731B (en
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.)
JD Digital Technology Holdings Co Ltd
Jingdong Technology Holding Co Ltd
Original Assignee
Beijing Jingdong Financial Technology Holding Co Ltd
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 Beijing Jingdong Financial Technology Holding Co Ltd filed Critical Beijing Jingdong Financial Technology Holding Co Ltd
Priority to CN201811025208.3A priority Critical patent/CN109274731B/en
Publication of CN109274731A publication Critical patent/CN109274731A/en
Priority to PCT/CN2019/103532 priority patent/WO2020048391A1/en
Application granted granted Critical
Publication of CN109274731B publication Critical patent/CN109274731B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/133Protocols for remote procedure calls [RPC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/04Protocols for data compression, e.g. ROHC
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Abstract

The invention discloses deployment, call method and the devices of a kind of web services based on multi-tenant technology, are related to field of computer technology.A no less than operation system is deployed to web service platform by the dispositions method in the form of tenant, and one specific embodiment includes: the tenant's registration request for obtaining operation system, and tenant's registration request includes the configuration file and executable class file of operation system;Configuration file is parsed, and generates authorization check rule, and the class file that load is executable for private method therein;Port is distributed for operation system and is issued as web services.Multiple operation systems can be deployed in the same web service platform to realize that business service is isolated by the embodiment in the form of tenant, so, local calling can be converted by cross-domain remote procedure call, to save the expense of network communication, interaction etc., improve response efficiency.

Description

Deployment, call method and the device of web services based on multi-tenant technology
Technical field
The present invention relates to field of computer technology more particularly to a kind of deployment of the web services based on multi-tenant technology, adjust Use method and apparatus.
Background technique
Multi-tenant technology (multi-tenancy technology) or multiple leasing techniques are a kind of software architecture skills Art, it inquires into and realizes how to share identical operation system or program assembly in the environment of multi-user, and still can ensure that The isolation of data between each user.
Existing multi-tenant technology refers to that an individual srvice instance can be multiple tissues or system clothes in simple terms Business, the srvice instance are the system that can support multi-tenant technology, this multiple tissue or system constitute this srvice instance Multiple tenants, they share the data center of the srvice instance.In order to ensure the data isolation between multiple tenants, the support The srvice instance of multi-tenant technology needs to carry out virtual partition to its data and configuration in design, to make the srvice instance Each tenant can use an individual system example, and each tenant can be according to their own needs to rental System example carry out individual cultivation.
The core of existing multi-tenant technology is to carry out the data for the srvice instance for supporting multi-tenant technology and configuration Virtual partition.For using Java as programming language, the implementation of existing multi-tenant technology be mostly based on Hibernate come It realizes the data of srvice instance and the virtual partition of configuration, srvice instance is then deployed in JVM (Java Virtual Machine, Java Virtual Machine) on to realizing multi-tenant system.Since thread is the main side of JVM work in Java language Formula, so the multi-tenant system being deployed on JVM is generally basede on thread to carry out business processing, by keeping for each tenant distribution Thread is protected, the accessible same object of multi-tenant is made, so that the ability for making program have concurrent processing, plays to greatest extent The operational capability of multi-core processor at present.Wherein, Hibernate is Object Relation Mapping frame, is mainly used to customer service Data Layer entity object in system is mapped with database table.The realization of multi-tenant technology based on Hibernate can be with An independent data source is established for each tenant, is equivalent to and has isolated several word banks in the database.
The calling process of the existing multi-tenant system being deployed on JVM realized based on Hibernate is as follows:
1, public private framework schema is configured for multi-tenant system (effect of framework is define a document legal The constraint rule that component groups or system execute), respectively correspond shared region and privately owned area, and by the framework schema of configuration It is saved in different data sources;
2, web (World Wide Web, i.e. global wide area network, also referred to as WWW) is intercepted by Request Interceptor to ask It asks, and is transmitted to tenant's resolver;
3, tenant's resolver parses corresponding tenant identification ID (identification) from web request, and will rent Family mark ID is sent to multi-tenant Link Manager;
4, multi-tenant Link Manager obtains the corresponding schema of the tenant, binds the data source of the tenant to data source capsule Reason person;
5, web controller takes corresponding data source processing business from data source manager and requests and return to corresponding knot Fruit;
6, step 2-5 is repeated.
In realizing process of the present invention, at least there are the following problems in the prior art for inventor's discovery:
1, when there is cross-domain request (such as: remote procedure call request), existing multi-tenant system carry out across Can there are problems that network overhead when domain browsing;
2, with the increase of private type tenant, the data source established for private type tenant also be will increase, and lead to data Base resource expense can increase rapidly;
3, the prior art is to carry out business processing based on thread, therefore can have the following problems: limitation request type, if tenant The service request of initiation is not atom request, and when needing multiple sub thread collaborative process, existing multi-tenant system can not be efficient Processing;Even without any service request, there is still a need for safeguard that a certain amount of thread is (every for existing multi-tenant system The daemon thread of a tenant);Thread in obstruction can not handle new request, and the readjustment expense of thread is very big, in readjustment front Cheng Wufa receives new task;The problems such as creation of thread, maintenance cost are too high, need to consider obstruction, synchronization, deadlock.
Summary of the invention
In view of this, the embodiment of the present invention provide the deployment of web services based on multi-tenant technology a kind of, call method and Device, multiple operation systems can be deployed in the form of tenant in the same web service platform with realize business service every From, in this way, local calling can be converted by cross-domain remote procedure call, so that the expense of network communication, interaction etc. is saved, Improve response efficiency.
To achieve the above object, according to an aspect of an embodiment of the present invention, it provides a kind of based on multi-tenant technology The dispositions method of web services.
A kind of dispositions method of the web services based on multi-tenant technology, by a no less than operation system with the shape of tenant Formula is deployed to web service platform, which comprises obtains tenant's registration request of operation system, tenant's registration request Configuration file and executable class file including the operation system;The configuration file is parsed, and is privately owned side therein Method generates authorization check rule, and the load executable class file;Port is distributed for the operation system and is sent out Cloth is web services.
Optionally, if the private method has dependence method, the authorization check rule is added to the dependence In the note of method.
Optionally, after the tenant's registration request for obtaining operation system, further includes: by the executable of the operation system The needs stated in class file are marked using the method for association's journey processing, and by the executable class file of the operation system Class file after being updated to label.
Optionally, loading the executable class file includes: to parse to the executable class file, by into The pause and wake-up for intervening code to realize general thread are woven into the method for line flag.
Optionally, after the tenant's registration request for obtaining operation system, further includes: pass through the executable class file It is saved in database or disk after serializing and compression processing.
Optionally, if being saved in database, the compression processing includes: by the executable class file after serializing Byte processing is carried out to be converted to bytecode;The bytecode is encoded based on Base64 coding mode;By each word After the front two of corresponding 8 binary codes of section code is cut away, the binary code of all bytecodes is spliced;It is obtained to after splicing To binary code be split according to every 8 for one section, and will turn after the every section of binary code decimal system obtained after segmentation Byte is changed to carry out compression processing.
Optionally, if being saved in disk, the compression processing includes: that establish a longitudinal axis be the seat that 54 horizontal axis are 20 Parameter, and horizontal, axis of ordinates crosspoint indicates a Chinese character symbol with each unit;By the executable class after serializing File carries out byte processing to be converted to bytecode, and is based on Base64 coding mode to the bytecode and encodes;Root According to the corresponding relationship of preset coding and the coordinate value in reference axis, the corresponding horizontal, ordinate value of the coding is obtained, and will be right The Chinese character symbol of the crosspoint of the longitudinal axis and horizontal axis answered is as compressed file.
According to another aspect of an embodiment of the present invention, a kind of deployment dress of web services based on multi-tenant technology is provided It sets.
A kind of deployment device of the web services based on multi-tenant technology, by a no less than operation system with the shape of tenant Formula is deployed to web service platform, and described device includes: request module, for obtaining tenant's registration request of operation system, Tenant's registration request includes the configuration file and executable class file of the operation system;Loading module is parsed, is used for The configuration file is parsed, and generates authorization check rule, and the load executable class text for private method therein Part;Release module is serviced, for distributing port for the operation system and being issued as web services.
Optionally, if the private method has dependence method, the authorization check rule is added to the dependence In the note of method.
Optionally, further include mark module, be used for: after the tenant's registration request for obtaining operation system, by the industry The needs stated in the executable class file of business system are marked using the method for association's journey processing, and by the operation system Executable class file be updated to label after class file.
Optionally, the parsing loading module is also used to: being parsed, will have been marked to the executable class file The pause and wake-up for intervening code to realize general thread are woven into the method for note.
Optionally, further include file preserving module, be used for: after the tenant's registration request for obtaining operation system, by institute Executable class file is stated to be saved in after serializing and compression processing in database or disk.
Optionally, if being saved in database, the compression processing includes: by the executable class file after serializing Byte processing is carried out to be converted to bytecode;The bytecode is encoded based on Base64 coding mode;By each word After the front two of corresponding 8 binary codes of section code is cut away, the binary code of all bytecodes is spliced;It is obtained to after splicing To binary code be split according to every 8 for one section, and will turn after the every section of binary code decimal system obtained after segmentation Byte is changed to carry out compression processing.
Optionally, if being saved in disk, the compression processing includes: that establish a longitudinal axis be the seat that 54 horizontal axis are 20 Parameter, and horizontal, axis of ordinates crosspoint indicates a Chinese character symbol with each unit;By the executable class after serializing File carries out byte processing to be converted to bytecode, and is based on Base64 coding mode to the bytecode and encodes;Root According to the corresponding relationship of preset coding and the coordinate value in reference axis, the corresponding horizontal, ordinate value of the coding is obtained, and will be right The Chinese character symbol of the crosspoint of the longitudinal axis and horizontal axis answered is as compressed file.
Another aspect according to an embodiment of the present invention provides a kind of called side of web services based on multi-tenant technology Method.
A kind of call method of the web services based on multi-tenant technology, the web services are according to such as embodiment of the present invention institute The dispositions method of the web services based on multi-tenant technology provided is disposed, and the call method includes: to obtain user to initiate Web services call request request type;When the request type is privately owned request, permission school is carried out to the user It tests;When authorization check passes through, the web services call request is responded.
Optionally, carrying out authorization check to the user includes: to obtain the corresponding private method of the privately owned request;According to The authorization check rule of the private method carries out authorization check to the user.
Optionally, carrying out authorization check to the user includes: to obtain the corresponding private method of the privately owned request;If institute Private method is stated with dependence method, then obtains the authorization check rule from the note of the dependence method;According to described Authorization check rule carries out authorization check to the user.
Another aspect according to an embodiment of the present invention provides a kind of calling dress of web services based on multi-tenant technology It sets.
A kind of calling device of the web services based on multi-tenant technology, the web services are according to such as embodiment of the present invention institute The dispositions method of the web services based on multi-tenant technology provided is disposed, and the calling device includes: that type obtains mould Block, for obtaining the request type of Client-initiated web services call request;Authorization check module, for working as the request class When type is privately owned request, authorization check is carried out to the user;Ask respond module, for responding when authorization check passes through The web services call request.
Optionally, the authorization check module is also used to: obtaining the corresponding private method of the privately owned request;According to described The authorization check rule of private method carries out authorization check to the user.
Optionally, the authorization check module is also used to: obtaining the corresponding private method of the privately owned request;If the private There is method that there is dependence method, then obtains the authorization check rule from the note of the dependence method;According to the permission Verification rule carries out authorization check to the user.
Another aspect according to an embodiment of the present invention, provides a kind of electronic equipment.
A kind of electronic equipment, comprising: one or more processors;Storage device, for storing one or more programs, when One or more of programs are executed by one or more of processors, so that one or more of processors realize this hair The deployment of web services based on multi-tenant technology provided by bright embodiment, call method.
It is according to an embodiment of the present invention in another aspect, providing a kind of computer-readable medium.
A kind of computer-readable medium is stored thereon with computer program, realizes this when described program is executed by processor The deployment of web services based on multi-tenant technology provided by inventive embodiments, call method.
One embodiment in foregoing invention has the following advantages that or the utility model has the advantages that is infused by the tenant for obtaining operation system Volume request, and parsing is carried out to the configuration file of operation system and thinks that private method generates authorization check rule, and load industry After the executable class file of business system, port is distributed for operation system and is issued as web services, is realized based on multi-tenant Multiple operation systems are deployed in by the dispositions method of the web services of technology, the technical know-how based on multi-tenant in the form of tenant To realize that business service is isolated in the same web service platform, in this way, local can be converted by cross-domain remote procedure call It calls, to save the expense of network communication, interaction etc., improves response efficiency.In addition, the present invention can also use the side of association's journey Formula carries out business processing, assists for journey relative thread, and switching mode is more flexible, and can save the creation of thread, maintenance Expense improves the handling capacity under distributed high concurrent;At the same time it can also which the executable class file of operation system is saved in It in the corresponding database of the working space of web service platform or disk, and is not to be loaded directly into JVM, only when the industry When business system is called, the dynamically load and execution of class file just will do it, and i.e. release resource after the completion of business processing, The dynamically load and unloading of class are realized, to improve the effective rate of utilization of JVM.
Further effect possessed by above-mentioned non-usual optional way adds hereinafter in conjunction with specific embodiment With explanation.
Detailed description of the invention
Attached drawing for a better understanding of the present invention, does not constitute an undue limitation on the present invention.Wherein:
Fig. 1 is that the key step of the dispositions method of the web services according to an embodiment of the present invention based on multi-tenant technology is shown It is intended to;
Fig. 2 is the system architecture diagram of the embodiment of the present invention;
Fig. 3 is the deployment flow diagram of the web services of the embodiment of the present invention;
Fig. 4 is that the main modular of the deployment device of the web services according to an embodiment of the present invention based on multi-tenant technology is shown It is intended to;
Fig. 5 is the call flow schematic diagram of the web services of the embodiment of the present invention;
Fig. 6 is that the embodiment of the present invention can be applied to exemplary system architecture figure therein;
Fig. 7 is adapted for the structural representation of the computer system for the terminal device or server of realizing the embodiment of the present invention Figure.
Specific embodiment
Below in conjunction with attached drawing, an exemplary embodiment of the present invention will be described, including the various of the embodiment of the present invention Details should think them only exemplary to help understanding.Therefore, those of ordinary skill in the art should recognize It arrives, it can be with various changes and modifications are made to the embodiments described herein, without departing from scope and spirit of the present invention.Together Sample, for clarity and conciseness, descriptions of well-known functions and structures are omitted from the following description.
Existing multi-tenant system is mostly empty by the data of the srvice instance to support multi-tenant technology and configuration progress Intend subregion to realize data and configuration isolation, but can not accomplish service isolation, so can have net when there is cross-domain access The problem of network expense.In order to solve this technical problem, the present invention provides a kind of dispositions methods of web services, are rented based on more Multiple operation systems are deployed in the same web service platform to realize business service by family technical know-how in the form of tenant Isolation, in this way, local calling can be converted by cross-domain remote procedure call, to save opening for network communication, interaction etc. Pin improves response efficiency.
The present invention by embedded web server as web service platform, and using the operation system example of outside as tenant It is registered to web service platform, to realize the multi-tenant system of business service isolation.Specifically, operation system is being received After exemplary tenant's registration request, a tenant identification is distributed for the tenant first;Later business can be obtained according to tenant identification The corresponding configuration information of system, to parse service alias that the tenant externally provides, (or the domain name of the tenant, other tenant can To access the tenant by the service alias), it is private services interface (only allow the tenant oneself call method), public Service interface (method that all tenants can share), call external system service alias (i.e. current tenant needs to access Other systems service alias), service interface (not distinguishing publicly-owned and privately owned), data source burst information etc.;Then, according to rent The executable class file that family mark obtains operation system is simultaneously loaded into JVM, and when specific implementation need to be loaded based on the class of Java Mechanism, due to the executable resource packet of tenant be in the load of java class loader less than place, therefore need voluntarily to load, add The resource file of the tenant can also be woven into during load and (section is connected to other Application Types or object On, and an object being notified is created, and such behavior is called weaving) it identifies, i.e., add in the byte code files after compiling Add the tenant identification tenantId for not influencing program operation, stamp is carried out to tenant to realize;Finally, operation system example is sent out Cloth is web services and is different from other web services with port.Wherein, when the configuration information to operation system parses, It can also be private services interface configuration lock, so that the tenant for holding the lock could access the privately owned side of the operation system example Method.
With reference to the accompanying drawing and specific embodiment introduces the dispositions methods of web services of the invention.
Fig. 1 is that the key step of the dispositions method of the web services according to an embodiment of the present invention based on multi-tenant technology is shown It is intended to., as shown in Figure 1, a no less than operation system is deployed to web service platform in the form of tenant in order to realize, this The dispositions method of the web services based on multi-tenant technology of inventive embodiments mainly includes the following steps, namely S101 to step S103。
Step S101: obtaining tenant's registration request of operation system, and tenant's registration request includes the configuration text of operation system Part and executable class file;
Step S102: parsing configuration file, and authorization check rule is generated for private method therein, and load can be held Capable class file;
Step S103: port is distributed for operation system and is issued as web services.
Wherein, the resource files such as the executable class file of tenant can be carried out by data isolation by step S102, and Carry out intervening the injection of code dynamically during being loaded to realize the pause and wake-up of general thread.By being privately owned Method generates authorization check rule, to realize the private services interface of the only specified accessible operation system of user, from And realize service isolation.After generating authorization check rule for private method, private method and authorization check rule can be protected It is stored to the tenant registration center of web platform, in case subsequent user can be into when accessing the operation system by the web service platform Row authorization check.
According to one embodiment of present invention, if private method has dependence method, authorization check rule is added to In the note of dependence method.Wherein, dependence method refers to the method that the private method needs to rely on when being executed.If privately owned side Method has dependence method, then when the private method is called to be executed, which needs to be performed, at this time can be according to this The authorization check rule saved in the note of dependence method carries out authorization check to user.Wherein, authorization check rule is according to need It wants flexibly to set, such as can be and generate token secret key pair and carry out authorization check using token secret key pair, be also possible to give birth to Authorization check, etc. is carried out at check code and using check code.
According to one embodiment of present invention, after the tenant's registration request for obtaining operation system, can also include:
The needs stated in the executable class file of operation system are marked using the method for association's journey processing, and will The executable class file of operation system is updated to the class file after label.
Also, the executable class file of load includes:
Executable class file is parsed, intervenes code for being woven into the method being marked to realize general line The pause and wake-up of journey.
By the technical solution of the embodiment, that is, it the mode of association's journey can be used to carry out business processing, assist journey (coroutine) As subroutine and a kind of program assembly.Subroutine is a part of code of some main program, which executes specific Task and relatively independent with other codes in main program, for opposite subroutine, association Cheng Gengwei generally and flexibly, but in reality It tramples middle extensive like that using no subroutine.It assists journey with thread in contrast, multiple threads are relatively independent, there is the upper and lower of oneself Text, but switching is controlled by system;And multiple association's journeys are also relatively independent, there is the context of oneself, but its switching is controlled by oneself System is controlled by currently assisting journey to be switched to other association's journeys by currently assisting journey.Therefore, it assists for journey relative thread, switching mode It is more flexible, and the creation of thread, maintenance costs can be saved, improve the handling capacity under distributed high concurrent.
The present invention is based on the lightweights of JVM to assist Cheng Jinhang business processing, built-in Classloader according to the present invention and JVM generation Device is managed when carrying out System build to class file, identification and record class or method with association's journey mark, and association's journey mark will be contained A user-defined file is recorded in the class of knowledge or the position of method --- in " association's journey file ", pass through matching standard in load Java bytecode file (.class) and association's journey file are woven into class and method containing association's journey mark intervenes code to realize The pause (yield method) and wake-up (notify method) of general thread.The present invention assists the yield method of journey to realize will not be EMS memory occupation is generated on JVM will not hang up thread, so as to save the creation and maintenance costs of thread.
In distributed deployment environment, association's journey tupe of the invention is acted by the yield to association's journey by business system System control thread suspends and continues to execute, and the processing of distributed transaction not will cause the hang-up and resistance of thread under concurrent environment Plug.
According to another embodiment of the invention, after the tenant's registration request for obtaining operation system, can also include:
Executable class file is saved in database or disk after serializing and compression processing.
According to this embodiment, configuration of the web service platform in the tenant's registration request and operation system for obtaining operation system After file and executable class file, the executable class file of operation system can also be saved in web service platform It in the corresponding database of working space or disk, and is not to be loaded directly into JVM, only when the operation system is called When, it just will do it the dynamically load and execution of class file, and i.e. release resource after the completion of business processing, realize the dynamic of class State load and unloading, to improve the effective rate of utilization of JVM.
According to another embodiment, the present invention can by it is aforementioned include assist journey file executable class file pass through sequence It is saved in disk or database after change and compression processing, only can just be moved according to association's journey file when calling and assisting Cheng Fangfa State load and the weaving for intervening code.Association Cheng Fangfa is not needed such as, which will not produce extra stack frame on JVM.As the web When service is called, Classloader can read association's journey file from compressed data, so that obtaining includes the method for assisting journey mark With the method row and parameter name and request type for needing yield (thread pause).Classloader is according to parameter name and asks It seeks type load destination service class and is woven into intervention code, the side of throw exception can be passed through when program goes to yield method Formula, which terminates, to be executed, and the stack top of destination service class is saved in using the implementing result stopped when executing as median, waits next time When initiating the calling to the web services, directly from the position that last time is suspended load median as variate-value and push operation stack.
In large-scale business integration environment, the present invention passes through the serializing and unserializing to executable class file Will assist journey file that disk is written, which will not be lost the memory of JVM.
The serializing of object and byte (byte) change carry out documentation again when by operation, can be easily by class file It stores on the storage mediums such as disk, database.According to definition of the different media to size of data, the different present invention provide two Kind dynamic compression mode.A byte is occupied in windows or Linux system Chinese and English letter, number, English DBC case, Varchar type Chinese is consistent with English occupancy in the relevant databases such as mysql.
In one embodiment of the invention, if being saved in database, compression processing includes:
Executable class file after serializing is subjected to byte processing to be converted to bytecode;
Bytecode is encoded based on Base64 coding mode;
After the front two of corresponding 8 binary codes of each bytecode is cut away, by the binary system of all bytecodes Code splicing;
To the binary code obtained after splicing according to every 8 be one section of every section two that is split, and will be obtained after segmentation Byte is converted to after the ary codes decimal system to carry out compression processing.
Wherein, Base64 is one of the coding mode that transmission 8Bit (position) bytecode is most commonly used on network, Base64 is exactly a kind of method for indicating binary data based on 64 printable characters.
In the magnetic disk media of server, by the Base64 coded treatment to byte data, it can generate by capital letter Female (A-Z), lowercase (a-z), digital (0-9), English DBC case (+/) sequence that totally 64 symbol arrangements combinations generate Change file, initially set up the corresponding relationship of 0-63 and 64 symbol, binarization then is carried out to 0-63, later by the two of 8 Ary codes cut away front two and next treated binary code splices, and every 8 one section of segmentation are then carried out, to segmentation Treated the binary code decimal system simultaneously obtains the output of its byte value to realize that compression processing, decompression process are opposite.
In another embodiment of the present invention, if being saved in disk, compression processing includes:
Establishing a longitudinal axis is the reference axis that 54 horizontal axis are 20, and horizontal, axis of ordinates the crosspoint table with each unit Show a Chinese character symbol;
Executable class file after serializing is subjected to byte processing to be converted to bytecode, and bytecode is based on Base64 coding mode is encoded;
According to the corresponding relationship of preset coding and the coordinate value in reference axis, the corresponding horizontal, ordinate value of coding is obtained, And using the Chinese character symbol of the crosspoint of the corresponding longitudinal axis and horizontal axis as compressed file.
Wherein, it 54 refers to sharing 54 by capitalization (A-Z), lowercase (a-z) and English DBC case (+/) Symbol, 20 refer to the number of possible duplicate symbol.Specifically, it for the storage of class file in relevant database, can build A vertical longitudinal axis is the reference axis that 54 longitudinal axis horizontal axis are 20, each unit transverse and longitudinal axis crosspoint replaces position with a Chinese character symbol It sets, the bytecode after byte is subjected to Base64 processing, connected letter is abbreviated, such as sssss is denoted as initial value Add the form s5 of number, s5 (wherein, the i.e. corresponding ordinate of orthogonal axes of first character s, second character are then found in reference axis 5 i.e. corresponding horizontal axis coordinates) it corresponding Chinese character symbol and exports to realize that compression processing, decompression process are opposite.
Fig. 2 is the system architecture diagram of the embodiment of the present invention.As shown in Fig. 2, web service platform system of the invention is mainly wrapped Include 3 part of monitoring management platform, web server and database.Wherein, monitoring management platform is used for web services of the invention Plateform system is monitored and manages, and user submits tenant's registration request of operation system, Yi Jiye by monitoring management platform Executable resource file (such as: * .jar, * .zip, * .war, * .tar) and configuration information of business system etc.;Web server It is to provide the container for being deployed in the running environment of each operation system of web service platform, wherein solid line indicates public method and number According to access, dotted line indicate private method and data use;Database is used to store the application data of each operation system.
Fig. 3 is the deployment flow diagram of the web services of the embodiment of the present invention.As shown in figure 3, logical with an operation system It crosses for web service platform progress tenant's registration, the deployment process of web services mainly comprises the following steps that
Step S301: user uploads the engineering compressed package of operation system by monitoring management platform, wherein engineering compressed package The interior configuration file including operation system and executable class file etc.;
The middle control of step S302:web service platform dials device and judges present node state and distribute to different processing Device, wherein if " _ f_=0 ", the i.e. operation system are to upload engineering compressed package for the first time, then transmit corresponding engineering compressed package To numbering device;
Step S303: numbering device parses the configuration file in engineering compressed package, external to obtain the operation system The service alias of offer, private services interface, common services interface, service alias, the service interface for calling external system, data The information such as source fragment id;Also, the needs stated in the executable class file in engineering compressed package are used into association's journey processing Method is renamed to realize and add association's journey mark, and the format of renaming is, for example: original name _ coroutine_ assists Cheng Fangfa Name, and the position for being added to the method for association's journey mark is recorded;Finally, by treated, file is moved to web services The working space of platform, and be saved in the corresponding disk of working space or database;
The middle control of step S304:web service platform dials device after numbering device completion processing, judges present node again State simultaneously distributes to different processors, at this point, " _ f_=1 ", indicates that file has been transferred to the working space of web service platform, Then the task of present node is distributed into initializer;
Step S305: initializer is used to the operation system for the working space for uploading to web service platform being deployed to JVM In, specifically, customized Classloader is called by the proxy server of JVM to load executable class file, and parse wherein File containing association's journey mark is to generate association's journey file;Configuration file is parsed, generates token secret key pair for private method, and should Private method and code key are pushed to registration center;Then search for whether the private method has dependence method in registration center, if any, Then code key is saved in the annotation file of the dependence method;
The middle control of step S306:web service platform dials device after initializer completion processing, and prosthomere is worked as in judgement again Dotted state returns to monitoring management platform file and uploads successfully at this point, " _ f_=2 ", indicates that file has been loaded, has been parsed;
Step S307: user, which triggers, to be executed;
The middle control of step S308:web service platform dials device and assigns the task to separator;
Step S309: separator obtains an available port from the port pool of registration center, and by the operation system It is issued as web services.
Other operation systems are identical as above-mentioned process by the process that web service platform carries out tenant's registration.In this way, i.e. Multiple operation systems can be registered to unified web service platform in the form of tenant, to realize service isolation.
Fig. 4 is that the main modular of the deployment device of the web services according to an embodiment of the present invention based on multi-tenant technology is shown It is intended to.As shown in figure 4, a no less than operation system is deployed to web service platform, this hair in the form of tenant in order to realize The deployment device 400 of the web services based on multi-tenant technology of bright embodiment mainly adds including request module 401, parsing Carry module 402 and service release module 403.
Request module 401 is used to obtain tenant's registration request of operation system, and tenant's registration request includes institute State the configuration file and executable class file of operation system;
Parsing loading module 402 generates authorization check rule for parsing the configuration file, and for private method therein Then, and the load executable class file;
Service release module 403 is used to distribute port for the operation system and is issued as web services.
According to one embodiment of present invention, if the private method has dependence method, the authorization check is advised Then it is added in the note of the dependence method.
According to another embodiment of the invention, the deployment device 400 of the web services based on multi-tenant technology can also wrap Mark module (not shown) is included, is used for:
After the tenant's registration request for obtaining operation system, it will be stated in the executable class file of the operation system Needs be marked using the method for association's journey processing, and after the executable class file of the operation system is updated to label Class file.
According to an embodiment of the invention, parsing loading module 402 can be also used for:
The executable class file is parsed, it is logical to realize intervention code will to be woven into the method being marked With the pause and wake-up of thread.
According to another embodiment of the invention, the deployment device 400 of the web services based on multi-tenant technology can also wrap File preserving module (not shown) is included, is used for:
After the tenant's registration request for obtaining operation system, by the executable class file by serializing and compression It is saved in after processing in database or disk.
According to one embodiment of present invention, if being saved in database, compression processing includes:
The executable class file after serializing is subjected to byte processing to be converted to bytecode;
The bytecode is encoded based on Base64 coding mode;
After the front two of corresponding 8 binary codes of each bytecode is cut away, by the binary system of all bytecodes Code splicing;
To the binary code obtained after splicing according to every 8 be one section of every section two that is split, and will be obtained after segmentation Byte is converted to after the ary codes decimal system to carry out compression processing.
According to another embodiment of the invention, if being saved in disk, compression processing includes:
Establishing a longitudinal axis is the reference axis that 54 horizontal axis are 20, and horizontal, axis of ordinates the crosspoint table with each unit Show a Chinese character symbol;
The executable class file after serializing is subjected to byte processing to be converted to bytecode, and to the word Section code is based on Base64 coding mode and is encoded;
According to the corresponding relationship of the coordinate value in preset coding and reference axis, corresponding horizontal, the vertical seat of the coding is obtained Scale value, and using the Chinese character symbol of the crosspoint of the corresponding longitudinal axis and horizontal axis as compressed file.
According to another aspect of the present invention, the call method and device of a kind of web services are additionally provided.Wherein, which takes Business is disposed according to the method in previous embodiment.The call method of the web services mainly includes the following steps:
Obtain the request type of Client-initiated web services call request;
When the request type is privately owned request, authorization check is carried out to the user;
When authorization check passes through, the web services call request is responded.
According to one embodiment of present invention, carrying out authorization check to the user includes:
Obtain the corresponding private method of the privately owned request;
Authorization check is carried out to the user according to the authorization check rule of the private method.
According to another embodiment of the invention, carrying out authorization check to the user includes:
Obtain the corresponding private method of the privately owned request;
If the private method has dependence method, the authorization check rule are obtained from the note of the dependence method Then;
Authorization check is carried out to the user according to the authorization check rule.
Fig. 5 is the call flow schematic diagram of the web services of the embodiment of the present invention.As shown in figure 5, one embodiment of the invention The call flows of web services mainly comprise the following steps that
Step S501: user initiates the call request of web services to web service platform, is not necessarily in call request at this time Distinguish web services equipment, it is only necessary to add the corresponding port numbers port of web services, call request is, for example: http: // xxxx:port/x/x;
Step S502: after request reaches target web service, the IOC of web service platform (Inversion of Control, Control reversion) controller carry out business processing before authorization check, due to web services have publicly-owned method and private method, Therefore authorization check need to be carried out to user;
Step S503:IOC controller judges request type, when request type is privately owned request, is weighed by encryption equipment Limit verification;
Step S504: encryption equipment obtained first from registration center target web service the corresponding code key of private method or Person's code key corresponding with the code key key of dependence method of the private method;Then, whether the composition of encryption equipment verification key is to close Whether whether (such as: whether meeting create-rule, and be what this web service platform was issued, etc.) of method and code key close Method;If it is, verification passes through, IOC controller is sent to by code key or by verification successful information;
Code key is sent target web service by step S505:IOC controller;
Step S506: target web service requests to rely on service (relying on the corresponding service of method) progress business according to code key Processing;
Step S507: service is relied on after receiving the request of target web service, will pass through execution by IOC control system Above-mentioned step S502-S504 carries out authorization check again, and after verification passes through, by IOC controller by code key be sent to according to Rely service;
Step S508: service return response result is relied on to target web service;
Step S509: target web service return response result.
According to an embodiment of the invention, the calling device of the web services based on multi-tenant technology specifically includes that
Type acquisition module, for obtaining the request type of Client-initiated web services call request;
Authorization check module, for carrying out authorization check to the user when the request type is privately owned request;
Ask respond module, for when authorization check passes through, responding the web services call request.
Wherein, authorization check module can be also used for:
Obtain the corresponding private method of the privately owned request;
Authorization check is carried out to the user according to the authorization check rule of the private method.
In addition, authorization check module can be also used for:
Obtain the corresponding private method of the privately owned request;
If the private method has dependence method, the authorization check rule are obtained from the note of the dependence method Then;
Authorization check is carried out to the user according to the authorization check rule.
Technical solution according to an embodiment of the present invention, by obtaining tenant's registration request of operation system, and to business system The configuration file of system carries out parsing and thinks that private method generates authorization check rule, and the executable class of load operation system After file, port is distributed for operation system and is issued as web services, realizes the portion of the web services based on multi-tenant technology Multiple operation systems are deployed in the same web service platform by arranging method, the technical know-how based on multi-tenant in the form of tenant On with realize business service be isolated, in this way, local calling can be converted by cross-domain remote procedure call, to save network The expense of communication, interaction etc., improves response efficiency.In addition, the present invention can also use the mode of association's journey to carry out business processing, assist For journey relative thread, switching mode is more flexible, and can save the creation of thread, maintenance costs, improves distributed high And the handling capacity given;At the same time it can also which the executable class file of operation system to be saved in the work sky of web service platform Between in corresponding database or disk, and be not to be loaded directly into JVM, only when the operation system is called, just meeting The dynamically load and execution of class file are carried out, and i.e. release resource after the completion of business processing, realizes the dynamically load of class And unloading, to improve the effective rate of utilization of JVM.
Fig. 6 shows the deployment that can apply the web services based on multi-tenant technology of the embodiment of the present invention, call method Or the exemplary system architecture 600 of the deployment of the web services based on multi-tenant technology, calling device.
As shown in fig. 6, system architecture 600 may include terminal device 601,602,603, network 604 and server 605. Network 604 between terminal device 601,602,603 and server 605 to provide the medium of communication link.Network 604 can be with Including various connection types, such as wired, wireless communication link or fiber optic cables etc..
User can be used terminal device 601,602,603 and be interacted by network 604 with server 605, to receive or send out Send message etc..Various telecommunication customer end applications, such as the application of shopping class, net can be installed on terminal device 601,602,603 (merely illustrative) such as the application of page browsing device, searching class application, instant messaging tools, mailbox client, social platform softwares.
Terminal device 601,602,603 can be the various electronic equipments with display screen and supported web page browsing, packet Include but be not limited to smart phone, tablet computer, pocket computer on knee and desktop computer etc..
Server 605 can be to provide the server of various services, such as utilize terminal device 601,602,603 to user The shopping class website browsed provides the back-stage management server (merely illustrative) supported.Back-stage management server can be to reception To the data such as information query request analyze etc. processing, and by processing result (such as target push information, product letter Breath -- merely illustrative) feed back to terminal device.
It should be noted that the deployment of the web services based on multi-tenant technology provided by the embodiment of the present invention, called side Method is generally executed by server 605, and correspondingly, the deployment of the web services based on multi-tenant technology, calling device are generally positioned at In server 605.
It should be understood that the number of terminal device, network and server in Fig. 6 is only schematical.According to realization need It wants, can have any number of terminal device, network and server.
Below with reference to Fig. 7, it illustrates the calculating of the terminal device or server that are suitable for being used to realize the embodiment of the present invention The structural schematic diagram of machine system 700.Terminal device or server shown in Fig. 7 are only an example, should not be to of the invention real The function and use scope for applying example bring any restrictions.
As shown in fig. 7, computer system 700 includes central processing unit (CPU) 701, it can be read-only according to being stored in Program in memory (ROM) 702 or be loaded into the program in random access storage device (RAM) 703 from storage section 708 and Execute various movements appropriate and processing.In RAM 703, also it is stored with system 700 and operates required various programs and data. CPU 701, ROM 702 and RAM 703 are connected with each other by bus 704.Input/output (I/O) interface 705 is also connected to always Line 704.
I/O interface 705 is connected to lower component: the importation 706 including keyboard, mouse etc.;It is penetrated including such as cathode The output par, c 707 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 708 including hard disk etc.; And the communications portion 709 of the network interface card including LAN card, modem etc..Communications portion 709 via such as because The network of spy's net executes communication process.Driver 710 is also connected to I/O interface 705 as needed.Detachable media 711, such as Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 710, in order to read from thereon Computer program be mounted into storage section 708 as needed.
Particularly, disclosed embodiment, the process described above with reference to flow chart may be implemented as counting according to the present invention Calculation machine software program.For example, embodiment disclosed by the invention includes a kind of computer program product comprising be carried on computer Computer program on readable medium, the computer program include the program code for method shown in execution flow chart.? In such embodiment, which can be downloaded and installed from network by communications portion 709, and/or from can Medium 711 is dismantled to be mounted.When the computer program is executed by central processing unit (CPU) 701, system of the invention is executed The above-mentioned function of middle restriction.
It should be noted that computer-readable medium shown in the present invention can be computer-readable signal media or meter Calculation machine readable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but not Be limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.Meter The more specific example of calculation machine readable storage medium storing program for executing can include but is not limited to: have the electrical connection, just of one or more conducting wires Taking formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only storage Device (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device, Or above-mentioned any appropriate combination.In the present invention, computer readable storage medium can be it is any include or storage journey The tangible medium of sequence, the program can be commanded execution system, device or device use or in connection.And at this In invention, computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal, Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for By the use of instruction execution system, device or device or program in connection.Include on computer-readable medium Program code can transmit with any suitable medium, including but not limited to: wireless, electric wire, optical cable, RF etc. are above-mentioned Any appropriate combination.
Flow chart and block diagram in attached drawing are illustrated according to the system of various embodiments of the invention, method and computer journey The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part of one module, program segment or code of table, a part of above-mentioned module, program segment or code include one or more Executable instruction for implementing the specified logical function.It should also be noted that in some implementations as replacements, institute in box The function of mark can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are practical On can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it wants It is noted that the combination of each box in block diagram or flow chart and the box in block diagram or flow chart, can use and execute rule The dedicated hardware based systems of fixed functions or operations is realized, or can use the group of specialized hardware and computer instruction It closes to realize.
Being described in the embodiment of the present invention involved unit or module can be realized by way of software, can also be with It is realized by way of hardware.Described unit or module also can be set in the processor, for example, can be described as: A kind of processor includes request module, parsing loading module and service release module.Wherein, the name of these units or module Claim not constituting the restriction to the unit or module itself under certain conditions, for example, request module can also be described For " for obtaining the module of tenant's registration request of operation system ".
As on the other hand, the present invention also provides a kind of computer-readable medium, which be can be Included in equipment described in above-described embodiment;It is also possible to individualism, and without in the supplying equipment.Above-mentioned calculating Machine readable medium carries one or more program, when said one or multiple programs are executed by the equipment, makes Obtaining the equipment includes: the tenant's registration request for obtaining operation system, and tenant's registration request includes matching for the operation system Set file and executable class file;The configuration file is parsed, and generates authorization check rule for private method therein, with And the load executable class file;Port is distributed for the operation system and is issued as web services.
Technical solution according to an embodiment of the present invention, by obtaining tenant's registration request of operation system, and to business system The configuration file of system carries out parsing and thinks that private method generates authorization check rule, and the executable class of load operation system After file, port is distributed for operation system and is issued as web services, realizes the portion of the web services based on multi-tenant technology Multiple operation systems are deployed in the same web service platform by arranging method, the technical know-how based on multi-tenant in the form of tenant On with realize business service be isolated, in this way, local calling can be converted by cross-domain remote procedure call, to save network The expense of communication, interaction etc., improves response efficiency.In addition, the present invention can also use the mode of association's journey to carry out business processing, assist For journey relative thread, switching mode is more flexible, and can save the creation of thread, maintenance costs, improves distributed high And the handling capacity given;At the same time it can also which the executable class file of operation system to be saved in the work sky of web service platform Between in corresponding database or disk, and be not to be loaded directly into JVM, only when the operation system is called, just meeting The dynamically load and execution of class file are carried out, and i.e. release resource after the completion of business processing, realizes the dynamically load of class And unloading, to improve the effective rate of utilization of JVM.
Above-mentioned specific embodiment, does not constitute a limitation on the scope of protection of the present invention.Those skilled in the art should be bright It is white, design requirement and other factors are depended on, various modifications, combination, sub-portfolio and substitution can occur.It is any Made modifications, equivalent substitutions and improvements etc. within the spirit and principles in the present invention, should be included in the scope of the present invention Within.

Claims (22)

1. a kind of dispositions method of the web services based on multi-tenant technology, which is characterized in that by a no less than operation system with The form of tenant is deployed to web service platform, which comprises
Obtain operation system tenant's registration request, tenant's registration request include the operation system configuration file and can The class file of execution;
The configuration file is parsed, and generates authorization check rule for private method therein, and load described executable Class file;
Port is distributed for the operation system and is issued as web services.
2. dispositions method according to claim 1, which is characterized in that, will if the private method has dependence method The authorization check rule is added in the note of the dependence method.
3. dispositions method according to claim 1, which is characterized in that after the tenant's registration request for obtaining operation system, Further include:
The needs stated in the executable class file of the operation system are marked using the method for association's journey processing, and will The executable class file of the operation system is updated to the class file after label.
4. dispositions method according to claim 3, which is characterized in that loading the executable class file includes:
The executable class file is parsed, intervenes code for being woven into the method being marked to realize general line The pause and wake-up of journey.
5. dispositions method according to claim 1, which is characterized in that after the tenant's registration request for obtaining operation system, Further include:
The executable class file is saved in database or disk after serializing and compression processing.
6. dispositions method according to claim 5, which is characterized in that if being saved in database, the compression processing Include:
Executable class file after serializing is subjected to byte processing to be converted to bytecode;
The bytecode is encoded based on Base64 coding mode;
After the front two of corresponding 8 binary codes of each bytecode is cut away, the binary code of all bytecodes is spelled It connects;
To the binary code obtained after splicing according to every 8 be one section of every section of binary system that is split, and will be obtained after segmentation Byte is converted to after the code decimal system to carry out compression processing.
7. dispositions method according to claim 5, which is characterized in that if being saved in disk, the compression processing packet It includes:
Establishing a longitudinal axis is the reference axis that 54 horizontal axis are 20, and horizontal, axis of ordinates crosspoint indicates one with each unit A Chinese character symbol;
Executable class file after serializing is subjected to byte processing to be converted to bytecode, and the bytecode is based on Base64 coding mode is encoded;
According to the corresponding relationship of preset coding and the coordinate value in reference axis, the corresponding horizontal, ordinate value of the coding is obtained, And using the Chinese character symbol of the crosspoint of the corresponding longitudinal axis and horizontal axis as compressed file.
8. a kind of deployment device of the web services based on multi-tenant technology, which is characterized in that by a no less than operation system with The form of tenant is deployed to web service platform, and described device includes:
Request module, for obtaining tenant's registration request of operation system, tenant's registration request includes the business The configuration file of system and executable class file;
Loading module is parsed, generates authorization check rule for parsing the configuration file, and for private method therein, and Load the executable class file;
Release module is serviced, for distributing port for the operation system and being issued as web services.
9. deployment device according to claim 9, which is characterized in that, will if the private method has dependence method The authorization check rule is added in the note of the dependence method.
10. deployment device according to claim 8, which is characterized in that further include mark module, be used for:
After the tenant's registration request for obtaining operation system, need that will be stated in the executable class file of the operation system The method that use association's journey processing is marked, and the executable class file of the operation system is updated to the class after label File.
11. deployment device according to claim 10, which is characterized in that the parsing loading module is also used to:
The executable class file is parsed, intervenes code for being woven into the method being marked to realize general line The pause and wake-up of journey.
12. deployment device according to claim 8, which is characterized in that further include file preserving module, be used for:
After the tenant's registration request for obtaining operation system, by the executable class file by serializing and compression processing After be saved in database or disk.
13. deployment device according to claim 12, which is characterized in that if being saved in database, at the compression Reason includes:
Executable class file after serializing is subjected to byte processing to be converted to bytecode;
The bytecode is encoded based on Base64 coding mode;
After the front two of corresponding 8 binary codes of each bytecode is cut away, the binary code of all bytecodes is spelled It connects;
To the binary code obtained after splicing according to every 8 be one section of every section of binary system that is split, and will be obtained after segmentation Byte is converted to after the code decimal system to carry out compression processing.
14. deployment device according to claim 12, which is characterized in that if being saved in disk, the compression processing Include:
Establishing a longitudinal axis is the reference axis that 54 horizontal axis are 20, and horizontal, axis of ordinates crosspoint indicates one with each unit A Chinese character symbol;
Executable class file after serializing is subjected to byte processing to be converted to bytecode, and the bytecode is based on Base64 coding mode is encoded;
According to the corresponding relationship of preset coding and the coordinate value in reference axis, the corresponding horizontal, ordinate value of the coding is obtained, And using the Chinese character symbol of the crosspoint of the corresponding longitudinal axis and horizontal axis as compressed file.
15. a kind of call method of the web services based on multi-tenant technology, which is characterized in that the web services are according to such as right It is required that any method is disposed in 1-7, the call method includes:
Obtain the request type of Client-initiated web services call request;
When the request type is privately owned request, authorization check is carried out to the user;
When authorization check passes through, the web services call request is responded.
16. call method according to claim 15, which is characterized in that carrying out authorization check to the user includes:
Obtain the corresponding private method of the privately owned request;
Authorization check is carried out to the user according to the authorization check rule of the private method.
17. call method according to claim 15, which is characterized in that carrying out authorization check to the user includes:
Obtain the corresponding private method of the privately owned request;
If the private method has dependence method, the authorization check rule is obtained from the note of the dependence method;
Authorization check is carried out to the user according to the authorization check rule.
18. a kind of calling device of the web services based on multi-tenant technology, which is characterized in that the web services are according to such as right It is required that any method is disposed in 1-7, the calling device includes:
Type acquisition module, for obtaining the request type of Client-initiated web services call request;
Authorization check module, for carrying out authorization check to the user when the request type is privately owned request;
Ask respond module, for when authorization check passes through, responding the web services call request.
19. calling device according to claim 18, which is characterized in that the authorization check module is also used to:
Obtain the corresponding private method of the privately owned request;
Authorization check is carried out to the user according to the authorization check rule of the private method.
20. calling device according to claim 18, which is characterized in that the authorization check module is also used to:
Obtain the corresponding private method of the privately owned request;
If the private method has dependence method, the authorization check rule is obtained from the note of the dependence method;
Authorization check is carried out to the user according to the authorization check rule.
21. a kind of electronic equipment characterized by comprising
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors are real The now method as described in any in claim 1-7 and/or 15-17.
22. a kind of computer-readable medium, is stored thereon with computer program, which is characterized in that described program is held by processor The method as described in any in claim 1-7 and/or 15-17 is realized when row.
CN201811025208.3A 2018-09-04 2018-09-04 Method and device for deploying and calling web service based on multi-tenant technology Active CN109274731B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201811025208.3A CN109274731B (en) 2018-09-04 2018-09-04 Method and device for deploying and calling web service based on multi-tenant technology
PCT/CN2019/103532 WO2020048391A1 (en) 2018-09-04 2019-08-30 Methods and apparatuses for deploying and invoking web services based on multi-tenancy technology

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811025208.3A CN109274731B (en) 2018-09-04 2018-09-04 Method and device for deploying and calling web service based on multi-tenant technology

Publications (2)

Publication Number Publication Date
CN109274731A true CN109274731A (en) 2019-01-25
CN109274731B CN109274731B (en) 2020-07-31

Family

ID=65188180

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811025208.3A Active CN109274731B (en) 2018-09-04 2018-09-04 Method and device for deploying and calling web service based on multi-tenant technology

Country Status (2)

Country Link
CN (1) CN109274731B (en)
WO (1) WO2020048391A1 (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110708310A (en) * 2019-09-30 2020-01-17 杭州数梦工场科技有限公司 Tenant-level authority management method, device and equipment
WO2020048391A1 (en) * 2018-09-04 2020-03-12 京东数字科技控股有限公司 Methods and apparatuses for deploying and invoking web services based on multi-tenancy technology
CN111581291A (en) * 2020-05-09 2020-08-25 北京字节跳动网络技术有限公司 Data processing method and device, electronic equipment and readable medium
CN111580820A (en) * 2020-05-25 2020-08-25 泰康保险集团股份有限公司 Applet generation method and device
CN111931103A (en) * 2020-07-09 2020-11-13 北京皮尔布莱尼软件有限公司 Website deployment method
CN112181470A (en) * 2020-09-22 2021-01-05 京东数字科技控股股份有限公司 Method and device for deploying patch
CN112800120A (en) * 2021-01-26 2021-05-14 政采云有限公司 Service processing method and device
CN113742774A (en) * 2021-09-03 2021-12-03 北京字跳网络技术有限公司 Data processing method and device, readable medium and electronic equipment
CN113778499A (en) * 2020-08-21 2021-12-10 北京京东振世信息技术有限公司 Method, device, equipment and computer readable medium for publishing service
CN115001776A (en) * 2022-05-26 2022-09-02 浙江网商银行股份有限公司 Data processing system and method
CN115268924A (en) * 2022-06-10 2022-11-01 知学云(北京)科技股份有限公司 Formula calculation engine service method and system based on aPaaS platform
WO2022257791A1 (en) * 2021-06-07 2022-12-15 贵州白山云科技股份有限公司 Service code processing method and apparatus based on distributed network, and device and medium
CN116107547A (en) * 2023-01-04 2023-05-12 三峡高科信息技术有限责任公司 Unified service and multi-data source management method

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111427684B (en) * 2020-03-20 2023-04-07 支付宝(杭州)信息技术有限公司 Service deployment method, system and device
CN113495895B (en) * 2020-04-02 2023-11-03 北京京东振世信息技术有限公司 Method and device for updating data
CN111861140A (en) * 2020-06-28 2020-10-30 微民保险代理有限公司 Service processing method, device, storage medium and electronic device
CN112463147B (en) * 2020-11-26 2023-07-04 杭州览众数据科技有限公司 Customized demand development method for generalized model
CN113688152B (en) * 2021-08-30 2023-12-05 北京京东振世信息技术有限公司 System function self-checking method and device
CN114595199B (en) * 2022-05-10 2022-09-02 太平金融科技服务(上海)有限公司 File analysis method and device, computer equipment and storage medium
CN114693283B (en) * 2022-06-01 2022-09-27 四川高灯企服科技有限公司 Cross-system business process approval processing method and device and computer equipment

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1509561A (en) * 2001-05-15 2004-06-30 ��˹��ŵ�� Contex sensitive web service
US20050262493A1 (en) * 2004-05-20 2005-11-24 Oliver Schmidt Sharing objects in runtime systems
CN101192937A (en) * 2006-11-24 2008-06-04 华为技术有限公司 A hot deployable method and its system
US7506175B2 (en) * 2000-11-06 2009-03-17 International Business Machines Corporation File language verification
CN102323884A (en) * 2011-09-07 2012-01-18 山东中创软件工程股份有限公司 Web service container and method for issuing multiple Web services
CN102411506A (en) * 2011-07-07 2012-04-11 杭州典能科技有限公司 Java-system business-unit plug-in type managing system and dynamic business-function changing method
CN102663009A (en) * 2012-03-19 2012-09-12 华侨大学 Web-service integration method supporting data privatization of enterprise users
CN103078858A (en) * 2012-12-31 2013-05-01 上海同岩土木工程科技有限公司 Web service and signature certificate-based software trial authorization method
US8825815B2 (en) * 2008-01-08 2014-09-02 Amdocs Software Systems Limited System and method for client synchronization for a communication device
CN104539429A (en) * 2014-12-30 2015-04-22 飞天诚信科技股份有限公司 Cryptographic certificate positioning method, device and system
CN106453288A (en) * 2016-09-29 2017-02-22 上海和付信息技术有限公司 Asynchronous mode supporting distributed micro service framework system and implementation method thereof

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8924542B1 (en) * 2011-05-31 2014-12-30 Amazon Technologies, Inc. Methods and apparatus for scalable private services
CN103036856A (en) * 2011-10-09 2013-04-10 镇江金软计算机科技有限责任公司 Multi-tenant system achievement based on software as a service (SAAS) application
CN109274731B (en) * 2018-09-04 2020-07-31 京东数字科技控股有限公司 Method and device for deploying and calling web service based on multi-tenant technology

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7506175B2 (en) * 2000-11-06 2009-03-17 International Business Machines Corporation File language verification
CN1509561A (en) * 2001-05-15 2004-06-30 ��˹��ŵ�� Contex sensitive web service
US20050262493A1 (en) * 2004-05-20 2005-11-24 Oliver Schmidt Sharing objects in runtime systems
CN101192937A (en) * 2006-11-24 2008-06-04 华为技术有限公司 A hot deployable method and its system
US8825815B2 (en) * 2008-01-08 2014-09-02 Amdocs Software Systems Limited System and method for client synchronization for a communication device
CN102411506A (en) * 2011-07-07 2012-04-11 杭州典能科技有限公司 Java-system business-unit plug-in type managing system and dynamic business-function changing method
CN102323884A (en) * 2011-09-07 2012-01-18 山东中创软件工程股份有限公司 Web service container and method for issuing multiple Web services
CN102663009A (en) * 2012-03-19 2012-09-12 华侨大学 Web-service integration method supporting data privatization of enterprise users
CN103078858A (en) * 2012-12-31 2013-05-01 上海同岩土木工程科技有限公司 Web service and signature certificate-based software trial authorization method
CN104539429A (en) * 2014-12-30 2015-04-22 飞天诚信科技股份有限公司 Cryptographic certificate positioning method, device and system
CN106453288A (en) * 2016-09-29 2017-02-22 上海和付信息技术有限公司 Asynchronous mode supporting distributed micro service framework system and implementation method thereof

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020048391A1 (en) * 2018-09-04 2020-03-12 京东数字科技控股有限公司 Methods and apparatuses for deploying and invoking web services based on multi-tenancy technology
CN110708310B (en) * 2019-09-30 2022-02-08 杭州数梦工场科技有限公司 Tenant-level authority management method, device and equipment
CN110708310A (en) * 2019-09-30 2020-01-17 杭州数梦工场科技有限公司 Tenant-level authority management method, device and equipment
CN111581291B (en) * 2020-05-09 2023-04-28 抖音视界有限公司 Data processing method, device, electronic equipment and readable medium
CN111581291A (en) * 2020-05-09 2020-08-25 北京字节跳动网络技术有限公司 Data processing method and device, electronic equipment and readable medium
CN111580820A (en) * 2020-05-25 2020-08-25 泰康保险集团股份有限公司 Applet generation method and device
CN111580820B (en) * 2020-05-25 2023-09-15 泰康保险集团股份有限公司 Applet generation method and device
CN111931103A (en) * 2020-07-09 2020-11-13 北京皮尔布莱尼软件有限公司 Website deployment method
CN113778499B (en) * 2020-08-21 2023-09-26 北京京东振世信息技术有限公司 Method, apparatus, device and computer readable medium for publishing services
CN113778499A (en) * 2020-08-21 2021-12-10 北京京东振世信息技术有限公司 Method, device, equipment and computer readable medium for publishing service
CN112181470A (en) * 2020-09-22 2021-01-05 京东数字科技控股股份有限公司 Method and device for deploying patch
CN112800120B (en) * 2021-01-26 2023-06-06 政采云有限公司 Service processing method and device
CN112800120A (en) * 2021-01-26 2021-05-14 政采云有限公司 Service processing method and device
WO2022257791A1 (en) * 2021-06-07 2022-12-15 贵州白山云科技股份有限公司 Service code processing method and apparatus based on distributed network, and device and medium
CN113742774A (en) * 2021-09-03 2021-12-03 北京字跳网络技术有限公司 Data processing method and device, readable medium and electronic equipment
CN113742774B (en) * 2021-09-03 2024-02-09 北京字跳网络技术有限公司 Data processing method and device, readable medium and electronic equipment
CN115001776A (en) * 2022-05-26 2022-09-02 浙江网商银行股份有限公司 Data processing system and method
CN115001776B (en) * 2022-05-26 2024-01-30 浙江网商银行股份有限公司 Data processing system and method
CN115268924A (en) * 2022-06-10 2022-11-01 知学云(北京)科技股份有限公司 Formula calculation engine service method and system based on aPaaS platform
CN116107547A (en) * 2023-01-04 2023-05-12 三峡高科信息技术有限责任公司 Unified service and multi-data source management method

Also Published As

Publication number Publication date
WO2020048391A1 (en) 2020-03-12
CN109274731B (en) 2020-07-31

Similar Documents

Publication Publication Date Title
CN109274731A (en) Deployment, call method and the device of web services based on multi-tenant technology
CN110535831B (en) Kubernetes and network domain-based cluster security management method and device and storage medium
US9672053B2 (en) Service request processing
CN107580083A (en) A kind of method and system of container IP address distribution
CN110019080B (en) Data access method and device
CN111580820A (en) Applet generation method and device
CN110019125A (en) The method and apparatus of data base administration
CN109981322A (en) The method and apparatus of cloud resource management based on label
CN110472207A (en) List generation method and device
CN107491382B (en) Log output method and device
CN108780407A (en) It is transmitted with the application program streaming of performing environment using accessing
CN107835181A (en) Right management method, device, medium and the electronic equipment of server cluster
CN110858202A (en) Method and device for generating where clause in database query statement
CN106980501A (en) A kind of software package management method, device and system
CN108876379A (en) A kind of method and apparatus for generating message
CN104866976A (en) Multi-tenant-oriented information managing system
CN108777685A (en) Method and apparatus for handling information
CN111338571B (en) Task processing method, device, equipment and storage medium
CN204695386U (en) Towards the management information system of many tenants
CN112612467A (en) Method and device for processing micro front-end architecture based on qiankun
CN111325552A (en) Data processing method and device, electronic equipment and storage medium
CN108399046A (en) File operation requests treating method and apparatus
CN113128197A (en) Method and device for managing application production versions
CN111045928B (en) Interface data testing method, device, terminal and storage medium
CN110795741B (en) Method and device for carrying out security processing on data

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
CB02 Change of applicant information

Address after: Branch of Beijing economic and Technological Development Zone of Beijing City eleven street 101111 No. 18 floor 2 block C room 221

Applicant after: JINGDONG DIGITAL TECHNOLOGY HOLDINGS Co.,Ltd.

Address before: Branch of Beijing economic and Technological Development Zone of Beijing City eleven street 101111 No. 18 floor 2 block C room 221

Applicant before: BEIJING JINGDONG FINANCIAL TECHNOLOGY HOLDING Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: 101111 Room 221, 2nd Floor, Block C, 18 Kechuang 11th Street, Beijing Economic and Technological Development Zone

Patentee after: Jingdong Technology Holding Co.,Ltd.

Address before: 101111 Room 221, 2nd Floor, Block C, 18 Kechuang 11th Street, Beijing Economic and Technological Development Zone

Patentee before: Jingdong Digital Technology Holding Co.,Ltd.

Address after: 101111 Room 221, 2nd Floor, Block C, 18 Kechuang 11th Street, Beijing Economic and Technological Development Zone

Patentee after: Jingdong Digital Technology Holding Co.,Ltd.

Address before: 101111 Room 221, 2nd Floor, Block C, 18 Kechuang 11th Street, Beijing Economic and Technological Development Zone

Patentee before: JINGDONG DIGITAL TECHNOLOGY HOLDINGS Co.,Ltd.

CP01 Change in the name or title of a patent holder