[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN109324914A - Service calling method, service call device and central server - Google Patents

Service calling method, service call device and central server Download PDF

Info

Publication number
CN109324914A
CN109324914A CN201811124462.9A CN201811124462A CN109324914A CN 109324914 A CN109324914 A CN 109324914A CN 201811124462 A CN201811124462 A CN 201811124462A CN 109324914 A CN109324914 A CN 109324914A
Authority
CN
China
Prior art keywords
address
shops
server
url
port numbers
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
CN201811124462.9A
Other languages
Chinese (zh)
Other versions
CN109324914B (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.)
Multipoint Life (chengdu) Technology Co Ltd
Original Assignee
Multipoint Life (chengdu) Technology 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 Multipoint Life (chengdu) Technology Co Ltd filed Critical Multipoint Life (chengdu) Technology Co Ltd
Priority to CN201811124462.9A priority Critical patent/CN109324914B/en
Publication of CN109324914A publication Critical patent/CN109324914A/en
Application granted granted Critical
Publication of CN109324914B publication Critical patent/CN109324914B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • Economics (AREA)
  • General Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • Development Economics (AREA)
  • General Engineering & Computer Science (AREA)
  • Telephonic Communication Services (AREA)
  • Computer And Data Communications (AREA)

Abstract

Service calling method, service call device and central server provided by the invention, are related to the super technical field of new retailer.Wherein, the service calling method includes: the solicited message for obtaining terminal device, wherein the solicited message includes the corresponding shops's id information of shops's server for needing to call;The address ip of shops's server for needing to call and port numbers are found according to shops's id information, wherein the address ip and port numbers are the value that shops's server last time is sent;One is generated according to the address ip, port numbers and the preset configuration information that find and calls the address url, to be called by the address calling url to the service for needing the shops's server called.By the above method, can improve in the prior art to the service call of shops's server cannot in time, effectively complete the problem of.

Description

Service calling method, service call device and central server
Technical field
The present invention relates to the super technical fields of new retailer, fill in particular to a kind of service calling method, service call It sets and central server.
Background technique
In the super technical field of new retailer, user is when needing to obtain the service or information in each quotient super (shops), meeting By terminal device go for centering server go to call the quotient surpass the service stored in (shops) corresponding shops's server or Information.
Wherein, central server needs to know the ip of shops's server when calling the service or information of shops's server The information such as address, port numbers.But when shops position changes, the address ip that will lead to corresponding server also becomes Change.If central server still goes to call corresponding shops's server based on the address ip before variation, service or letter will lead to The problem of breath can not be called effectively.
Through inventor the study found that in the prior art, in the address ip of shops's server with the variation of shops position And after changing, the address correspondence ip stored in central server is modified generally by maintenance personnel.But this kind is tieed up Shield mode is there is safeguarding not in time, and accordingly, will lead to cannot in time, effectively to the service call of shops's server The problem of ground is completed.
Summary of the invention
In view of this, the purpose of the present invention is to provide a kind of service calling method, service call device and center services Device, with improve in the prior art to the service call of shops's server cannot in time, effectively complete the problem of.
To achieve the above object, the embodiment of the present invention adopts the following technical scheme that
A kind of service calling method, for calling the service of new retailer Chao Zhong shops server, which comprises
Obtain the solicited message of terminal device, wherein the solicited message includes needing shops's server for calling corresponding Shops's id information;
The address ip and the port numbers of the shops's server for needing to call are found according to shops's id information, In, which is that the shops's server last time obtained executes the value for sending and operating and sending, and shops's server exists The address ip of oneself can execute the transmission operation when changing;
One is generated according to the address ip, port numbers and the preset configuration information that find and calls the address url, to pass through The address calling url is called the service for needing the shops's server called.
In the embodiment of the present invention preferably selects, in above-mentioned service calling method, executing according to the shops ID Before the step of address ip for shops's server that information searching is called to the needs and port numbers, the method also includes:
Message server is monitored, to judge whether the message server has the change for receiving the transmission of shops's server More information, wherein the modification information is generated when information change occurs for shops's server, and current including shops's server The address ip, port numbers and shops's id information;
If the message server has the modification information for receiving shops's server transmission, the modification information is obtained, And the address ip, port numbers and the shops's id information in the modification information are established into corresponding relationship, to pass through shops's id information The corresponding address ip and port numbers can be found.
In the embodiment of the present invention preferably selects, in above-mentioned service calling method, the basis is found described The address ip, port numbers and preset configuration information generate one and call the address url, to pass through the address calling url to the needs The step of service of shops's server of calling is called include:
One, which is generated, according to the address ip, port numbers and the preset configuration information that find calls the address url;
Corresponding request example is established by the address calling url, to need to call to described by the request example The service of shops's server be called.
In the embodiment of the present invention preferably selects, in above-mentioned service calling method, the preset configuration information packet The initial address url is included, it is described that a step for calling the address url is generated according to the address ip, port numbers and preset configuration information Suddenly include:
Obtain the position of the address ip and the position of port numbers in the initial address url;
The corresponding parameter in the position that will acquire replaces with the address ip found and port numbers, to obtain a calling The address url.
In the embodiment of the present invention preferably selects, in above-mentioned service calling method, have in the initial address url The note of parameters, described the step of obtaining the position of the address ip and the position of port numbers in the initial address url include:
Each of described initial address url note is traversed, to obtain the address ip and the corresponding note of port numbers;
The position of the address ip and the position of port numbers in the initial address url are determined according to obtained note.
It is described just executing the traversal in above-mentioned service calling method in the embodiment of the present invention preferably selects Each of beginning url address is explained, the step of to obtain the address ip and port numbers corresponding note before, described in the acquisition The position of the address ip and the step of the position of port numbers in the initial address url further include:
The note of parameters in the initial address url is obtained by reflection mechanism.
The embodiment of the invention also provides a kind of service call devices, for calling new retailer Chao Zhong shops server Service, described device include:
Solicited message obtains module, for obtaining the solicited message of terminal device, wherein the solicited message includes needing to adjust The corresponding shops's id information of shops's server;
Server parameter searching module is serviced for finding the shops for needing to call according to shops's id information The address ip of device and port numbers, wherein the address ip is that the shops's server last time execution transmission operation obtained is sent Value, and shops's server can be executed when the address ip of oneself is changed the transmission operation;
The address url generation module, for being generated according to the address ip, port numbers and the preset configuration information that find One calls the address url, to be called by the address calling url to the service for needing the shops's server called.
In the embodiment of the present invention preferably selects, in above-mentioned service call device, further includes:
Server monitors module, for monitoring message server, to judge whether the message server has reception The modification information sent to shops's server, wherein the modification information is generated when information change occurs for shops's server, and Including the current address ip of shops's server, port numbers and shops's id information;
Modification information obtains module, for having the change letter for receiving shops's server transmission in the message server When breath, the modification information is obtained, and the address ip, port numbers and the shops's id information in the modification information are established into corresponding close System, the corresponding address ip and port numbers can be found by shops's id information.
In the embodiment of the present invention preferably selects, in above-mentioned service call device, the address the url generation module packet It includes:
The address url generates submodule, for raw according to the address ip, port numbers and the preset configuration information that find The address url is called at one;
Example setting up submodule is requested, for establishing corresponding request example by the address calling url, by being somebody's turn to do Request example is called the service for needing the shops's server called.
The embodiment of the invention also provides a kind of central servers, for calling the clothes of new retailer Chao Zhong shops server Business, which includes processor, memory and service call device, wherein the service call device includes one Or multiple software function modules being stored in the memory and executed by the processor, the software function module packet It includes:
Solicited message obtains module, for obtaining the solicited message of terminal device, wherein the solicited message includes needing to adjust The corresponding shops's id information of shops's server;
Server parameter searching module is serviced for finding the shops for needing to call according to shops's id information The address ip of device and port numbers, wherein the address ip is that the shops's server last time execution transmission operation obtained is sent Value, and shops's server can be executed when the address ip of oneself is changed the transmission operation;
The address url generation module, for being generated according to the address ip, port numbers and the preset configuration information that find One calls the address url, to be called by the address calling url to the service for needing the shops's server called.
Service calling method, service call device and central server provided by the invention, based on shops's server certainly Oneself address ip is able to carry out the basis for sending operation when changing, central server is available to arrive shops's server most Primary execute sends the value that operation is sent afterwards, and based on the corresponding sending value of the last time obtain shops's server it is newest, The effective address ip to guarantee validity when being called based on the address ip to shops's server, and then is improved existing In technology to the service call of shops's server cannot in time, effectively complete the problem of.
To enable the above objects, features and advantages of the present invention to be clearer and more comprehensible, preferred embodiment is cited below particularly, and cooperate Appended attached drawing, is described in detail below.
Detailed description of the invention
Fig. 1 is the application block diagram of central server provided in an embodiment of the present invention.
Fig. 2 is the structural block diagram of central server provided in an embodiment of the present invention.
Fig. 3 is the flow diagram of service calling method provided in an embodiment of the present invention.
Fig. 4 is the flow diagram of step S150 in Fig. 3.
Fig. 5 is the flow diagram of step S151 in Fig. 3.
Fig. 6 is another flow diagram of service calling method provided in an embodiment of the present invention.
Fig. 7 is the structural block diagram of service call device provided in an embodiment of the present invention.
Fig. 8 is the structural block diagram of the address url provided in an embodiment of the present invention generation module.
Fig. 9 is another structural block diagram of service call device provided in an embodiment of the present invention.
Icon: 10- central server;12- memory;14- processor;20- message server;30- shops server; 40- terminal device;100- service call device;110- solicited message obtains module;130- server parameter searching module;150- The address url generation module;The address 151-url generates submodule;153- requests example setting up submodule;170- server monitors mould Block;190- modification information obtains module.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment only It is a part of the embodiments of the present invention, instead of all the embodiments.The present invention being usually described and illustrated herein in the accompanying drawings The component of embodiment can be arranged and be designed with a variety of different configurations.
Therefore, the detailed description of the embodiment of the present invention provided in the accompanying drawings is not intended to limit below claimed The scope of the present invention, but be merely representative of selected embodiment of the invention.Based on the embodiments of the present invention, this field is common Technical staff's every other embodiment obtained without creative efforts belongs to the model that the present invention protects It encloses.
It should also be noted that similar label and letter indicate similar terms in following attached drawing, therefore, once a certain Xiang Yi It is defined in a attached drawing, does not then need that it is further defined and explained in subsequent attached drawing.In description of the invention In, term " first ", " second ", " third ", " the 4th " etc. are only used for distinguishing description, and should not be understood as only or imply opposite Importance.
As shown in Figure 1, being applied to new retailer's system of system the embodiment of the invention provides a kind of central server 10.Institute Stating new retailer's system of system may include shops's server 30 and terminal device 40, and it is super that shops's server 30 is capable of providing quotient Service (or information), the terminal device 40 can go to obtain the service (or information) that the quotient surpasses based on the request of user.
In detail, the central server 10 can be communicated with shops's server 30 and the terminal device 40 respectively Connection is gone the service (or information) for obtaining the offer of shops's server 30 with the request based on the terminal device 40 and is sent The terminal device 40 is given, allows the user to obtain the service (or information) needed by the terminal device 40.
In conjunction with Fig. 2, in the present embodiment, the central server 10 may include memory 12, processor 14 and service Calling device 100.
Wherein, it is directly or indirectly electrically connected between the memory 12 and processor 14, to realize the transmission of data Or interaction.It is electrically connected for example, these elements can be realized between each other by one or more communication bus or signal wire.It is described Service call device 100 includes that at least one can be stored in the memory 12 in the form of software or firmware (firmware) Software function module.The processor 14 is for executing the executable computer program stored in the memory 12, example Such as, software function module and computer program etc. included by the service call device 100, to realize service calling method.
Optionally, the memory 12 may be, but not limited to, random access memory (Random Access Memory, RAM), read-only memory (Read Only Memory, ROM), programmable read only memory (Programmable Read-Only Memory, PROM), erasable read-only memory (Erasable Programmable Read-Only Memory, EPROM), electricallyerasable ROM (EEROM) (Electric Erasable Programmable Read-Only Memory, EEPROM) etc..Wherein, memory 12 is for storing program, and the processor 14 is held after receiving and executing instruction Row described program.
Also, the processor 14 may be a kind of IC chip, the processing capacity with signal.Above-mentioned processing Device 14 can be general processor, including central processing unit (Central Processing Unit, CPU), network processing unit (Network Processor, NP) etc.;It can also be digital signal processor (DSP), specific integrated circuit (ASIC), scene Programmable gate array (FPGA) either other programmable logic device, discrete gate or transistor logic, discrete hardware group Part.It may be implemented or execute disclosed each method, step and the logic diagram in the embodiment of the present invention.General processor can be with It is that microprocessor or the processor are also possible to any conventional processor etc..
It is appreciated that structure shown in Fig. 2 be only illustrate, the central server 10 may also include than shown in Fig. 2 more More perhaps less component or with the configuration different from shown in Fig. 2.Each component shown in Fig. 2 can be using hardware, soft Part or combinations thereof is realized.
Optionally, the concrete type of the central server 10 is unrestricted, for example, may include, but is not limited to web (website) server, data server, computer, mobile internet surfing equipment (mobile Internet device, MID) etc. have place The equipment for managing function.
In conjunction with Fig. 3, the embodiment of the present invention also provides a kind of service calling method that can be applied to above-mentioned central server 10. Wherein, method and step defined in the related process of the method can be realized by the processor 14.It below will be to shown in Fig. 3 Detailed process be described in detail.
Step S110 obtains the solicited message of terminal device 40.
In the present embodiment, the solicited message may include the corresponding shops ID of shops's server 30 letter for needing to call Breath.That is, when the service of shops where needing to obtain in user or information (being stored in corresponding shops's server 30), it can The solicited message is sent to the central server 10 to pass through the terminal device 40 of oneself or other people.
Wherein, it is contemplated that when the central server 10 calls the service or information of shops's server 30, need to know The address ip of road shops's server 30 and port numbers, to establish communication connection.That is, the central server 10 also needs Get the address ip and the port numbers of shops's server 30.But user or the terminal device 40 are unable to get the door The address ip of shop server 30 and port numbers, also, the address ip for shops's server 30 and port numbers generally can be with There is corresponding relationship with the id information of corresponding shops.
Therefore, user or the terminal device 40 it is available to shops's id information on the basis of, can pre-establish And the corresponding relationship of the address ip, port numbers and shops's id information is stored, in order to hold when getting shops's id information Row step S130.
Step S130, according to shops's id information find the address ip of shops's server 30 for needing to call and Port numbers.
In the present embodiment, to avoid ip address of the shops after variation where corresponding shops's server 30 that from occurring The problem of changing, and then shops's id information and the corresponding relationship of the address ip is caused to fail, can pre-establish a mechanism --- door The address ip after variation can be sent to center service when the address ip for judging oneself changes by shop server 30 Device 10, so that the address ip of 10 pairs of central server changes is updated.That is, being believed in central server 10 by ID It ceases the address ip found and port numbers is the value that shops's server 30 is sent for the last time, to guarantee to obtain by step S130 The address ip arrived and port numbers real-time with higher and accuracy, and then avoid executing based on the address ip and port numbers When step S150, to the service call of shops's server 30 cannot in time, effectively complete the problem of.
Step S150 generates one with calling url according to the address ip, port numbers and the preset configuration information that find Location, to be called by the address calling url to the service for needing the shops's server 30 called.
In the present embodiment, obtain needing the address ip and the port numbers of the shops's server 30 called by step S130 Later, the calling communicated to be serviced accurately can be established with shops's server 30 based on the address ip and port numbers.
In detail, in the system based on webservice, the communication between general device is completed based on the address url 's.That is, an initial address url (including preset parameter and variable element) can be pre-configured with.Wherein, variable element Can be the address ip and port numbers, for different shops's servers 30, can using the different addresses ip and port numbers as pair The variable element answered, to obtain an address url.And it is possible to by the address url to the shops's server 30 for needing to call Service is called.
Optionally, step S150 is being executed to generate an address calling url, to the clothes for shops's server 30 that needs call The mode being called of being engaged in is unrestricted.In the present embodiment, in conjunction with Fig. 4, to avoid the problem that the wasting of resources, step S150 can To include step S151 and step S513.
Step S151 generates one with calling url according to the address ip, port numbers and the preset configuration information that find Location.
Step S153 establishes corresponding request example by the address calling url, to pass through the request example to described The service for the shops's server 30 for needing to call is called.
In the present embodiment, one can be generated by step S151 and call the address url, then execute step S153 and pass through tune Establish corresponding request example with the address url, with needs are called by the request example the service of shops's server 30 into Row calls.In detail, the address url can will be called as key, to cache the corresponding requests example established.
Wherein, example is requested by founding, the request example can be called directly when needing and repeatedly carrying out service call, To avoid leading to the occupancy resource for consuming processor 14 during repeatedly generating because repeatedly generating the calling address url Problem, also, also result in due to creation process needs the regular hour and existing calling not in time the problem of.
Optionally, it is unrestricted in a manner of generating and call the address url to execute step S151, it can be according to practical application need It asks and is configured.In the present embodiment, the preset configuration information may include the initial address url, accordingly, in conjunction with Fig. 5, Step S151 may include step S151a and step S151b.
Step S151a obtains the position of the address ip and the position of port numbers in the initial address url.
Step S151b, the corresponding parameter in the position that will acquire replace with the address ip found and port numbers, with The address url is called to one.
In the present embodiment, the initial address url can be made of multiple portions, for example, may include for each The all identical parameter in the corresponding address calling url of a shops's server 30 and be directed to the corresponding calling of different shops's servers 30 The address url has different parameters.Wherein, which may include the address ip and the port numbers of shops's server 30.
Therefore, generate call the address url when, can be by executing step S151a with obtaining in the initial address url ip Then the parameter of the position is replaced with execution step S130 by executing step S151b by the position of location and the position of port numbers The address ip of acquisition and port numbers, so that obtaining can be to the address calling url that shops's server 30 is called.
Optionally, unrestricted in such a way that step S151a obtains position, it can be set according to practical application request It sets.In the present embodiment, accurate and effective to be carried out convenient for the position of position and port numbers to the address ip in the initial address url Ground is searched, with the note of parameters in the initial address url, that is to say, that when configuring the initial address url, can be incited somebody to action Each of the initial address url parameter adds corresponding note, and therefore, step S151a may comprise steps of:
Each of described initial address url note is traversed, to obtain the address ip and the corresponding note of port numbers;According to Obtained note determines the position of the address ip and the position of port numbers in the initial address url.
The step of note each by above-mentioned traversal, can accurately and efficiently find position and the port numbers of the address ip Position, and then guarantee the address the calling url accuracy with higher that obtains by replacement operation.
Further, it is the execution of the operation convenient for each note of above-mentioned traversal, the step for obtaining each note can also be first carried out Suddenly, that is to say, that can first get each of initial address url note.Wherein, the mode for obtaining note is unrestricted System, can be configured according to practical application request.
In the present embodiment, a kind of feasible embodiment is provided, in detail, which is to obtain by reflection mechanism Take the note of parameters in the initial address url.Also, the method for executing reflective operation can be invoke method.
Further, it is contemplated that before executing step S130, need to get the newest address ip of shops's server 30. Also, the mode obtained is unrestricted, can be configured according to practical application request.
In the present embodiment, a kind of feasible embodiment is provided, in detail, in conjunction with Fig. 6, execute step S130 it Before, the service calling method can also include step S170 and step S190.
Step S170 monitors message server 20, to judge whether the message server 20 receives shops The modification information that server 30 is sent.
In the present embodiment, the modification information is generated when information change occurs for shops's server 30, and including this The current address ip of shops's server 30, port numbers and shops's id information.The message server 20 is for receiving and storing The modification information that shops's server 30 is sent, to form message queue.
Also, it is configured for message server 20 and central server 10, so that central server 10 can offset Breath server 20 monitored, with message server 20 receive shops's server 30 transmission modification information when, can and When obtain the information, and then guarantee the real-time that the address ip obtains.
Step S190 is obtained if the message server 20 has the modification information for receiving shops's server 30 transmission The modification information is taken, and the address ip, port numbers and the shops's id information in the modification information are established into corresponding relationship, to pass through Shops's id information can find the corresponding address ip and port numbers.
In the present embodiment, after getting modification information by step S190, for convenient for can be with by shops's id information The address ip after finding change, can pre-establish corresponding relationship.Also, pair that the corresponding relationship will can also be established before It should be related to and be replaced.
For example, before the address ip is changed, the corresponding relationship of the address ip, port numbers and shops's id information can be as Shown in following table:
The address ip Port numbers Shops's id information
A1 B1 C1
After the address ip is changed, the corresponding relationship of the address ip, port numbers and shops's id information can be such as following table It is shown:
The address ip Port numbers Shops's id information
A2 B1 C1
That is, if passing through door when the central server 10 cannot get the address ip after change in time The address ip that shop id information C1 is found is A1, then the address calling url by being generated based on A1 goes that corresponding shops is called to take When the service of business device 30, calling cannot be effectively completed.Therefore, it is necessary to which the relationship of A1-B1-C1 is replaced with A2-B1-C1, So as to be A2 by the address ip that shops id information C1 is found, then calling pair is gone in the address calling url by being generated based on A2 When the service for the shops's server 30 answered, calling can be effectively completed.
In conjunction with Fig. 7, the embodiment of the present invention also provides a kind of service call device that can be applied to above-mentioned central server 10 100.Wherein, the service call device 100 may include that solicited message obtains module 110, server parameter searching module 130 And the address url generation module 150.
The solicited message obtains module 110, for obtaining the solicited message of terminal device 40, wherein the solicited message Including the corresponding shops's id information of shops's server 30 for needing to call.In the present embodiment, the solicited message obtains module 110 can be used for executing step S110 shown in Fig. 3, and the specific descriptions for obtaining module 110 about the solicited message are referred to Above to the description of step S110.
The server parameter searching module 130, for finding what the needs called according to shops's id information The address ip of shops's server 30 and port numbers, wherein the address ip is that the shops's server 30 obtained executes for the last time The value that operation is sent is sent, and shops's server 30 can execute transmission operation when the address ip of oneself is changed.? In the present embodiment, the server parameter searching module 130 can be used for executing step S130 shown in Fig. 3, about the service The specific descriptions of device parameter searching module 130 are referred to the description to step S130 above.
The address url generation module 150, for according to the address ip, port numbers and the preset configuration found Information generates one and calls the address url, with by the address calling url to the service of shops's server 30 for needing to call into Row calls.In the present embodiment, the address url generation module 150 can be used for executing step S150 shown in Fig. 3, about institute The specific descriptions for stating the address url generation module 150 are referred to the description to step S150 above.
In conjunction with Fig. 8, in the present embodiment, the address url generation module 150 may include that the address url generates submodule 151 and request example setting up submodule 153.
The address url generates submodule 151, for according to the address ip found, port numbers and preset match Confidence breath generates one and calls the address url.In the present embodiment, the address url, which generates submodule 151, can be used for executing Fig. 4 institute The step S151 shown, the specific descriptions for generating submodule 151 about the address url are referred to above retouch step S151 It states.
The request example setting up submodule 153, for establishing corresponding request example by the address calling url, To be called by the request example to the service for needing the shops's server 30 called.In the present embodiment, described Request example setting up submodule 153 can be used for executing step S153 shown in Fig. 4, about the request example setting up submodule 153 specific descriptions are referred to the description to step S153 above.
In conjunction with Fig. 9, in the present embodiment, the service call device 100 can also include that server monitors 170 He of module Modification information obtains module 190.
The server monitors module 170, for monitoring message server 20, to judge the message server 20 Whether the modification information that receives shops server 30 transmission is had, wherein the modification information is believed in shops's server 30 It is generated when breath change, and including the current address ip of shops's server 30, port numbers and shops's id information.In the present embodiment In, the server, which monitors module 170, can be used for executing step S170 shown in fig. 6, monitor module 170 about the server Specific descriptions be referred to the description to step S170 above.
The modification information obtains module 190, for receiving shops's server 30 in the message server 20 When the modification information of transmission, the modification information is obtained, and by the address ip, port numbers and the shops's id information in the modification information Corresponding relationship is established, the corresponding address ip and port numbers can be found by shops's id information.In the present embodiment, institute Stating modification information acquisition module 190 can be used for executing step S190 shown in fig. 6, obtain module 190 about the modification information Specific descriptions be referred to the description to step S190 above.
In conclusion service calling method provided by the invention, service call device 100 and central server 10, service Call method, service call device 100 and central server 10 are changed based on shops's server 30 in the address ip of oneself When be able to carry out the basis for sending operation, central server 10 is available to execute transmission to shops's server 30 for the last time It operates the value sent, and obtains based on the corresponding sending value of the last time that shops's server 30 is newest, the effective address ip, To guarantee validity when being called based on the address ip to shops's server 30, and then improve in the prior art to shops The service call of server 30 cannot in time, the problem of effectively completing.
In several embodiments provided by the embodiment of the present invention, it should be understood that disclosed device and method, it can also To realize by another way.Device and method embodiment described above is only schematical, for example, in attached drawing Flow chart and block diagram show that the devices of multiple embodiments according to the present invention, method and computer program product are able to achieve Architecture, function and operation.In this regard, each box in flowchart or block diagram can represent module, a program A part of section or code, a part of the module, section or code include that one or more is patrolled for realizing defined Collect the executable instruction of function.It should also be noted that in some implementations as replacement, function marked in the box It can occur in a different order than that indicated in the drawings.For example, two continuous boxes can actually be held substantially in parallel Row, they can also be executed in the opposite order sometimes, and this depends on the function involved.It is also noted that block diagram and/or The combination of each box in flow chart and the box in block diagram and or flow chart, can the function as defined in executing or dynamic The dedicated hardware based system made is realized, or can be realized using a combination of dedicated hardware and computer instructions.
In addition, each functional module in each embodiment of the present invention can integrate one independent portion of formation together Point, it is also possible to modules individualism, an independent part can also be integrated to form with two or more modules.
It, can be with if the function is realized and when sold or used as an independent product in the form of software function module It is stored in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially in other words The part of the part that contributes to existing technology or the technical solution can be embodied in the form of software products, the meter Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be a People's computer, electronic equipment or network equipment etc.) execute all or part of step of each embodiment the method for the present invention Suddenly.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), deposits at random The various media that can store program code such as access to memory (RAM, Random Access Memory), magnetic or disk. It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to the packet of nonexcludability Contain, so that the process, method, article or equipment for including a series of elements not only includes those elements, but also including Other elements that are not explicitly listed, or further include for elements inherent to such a process, method, article, or device. In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including the element Process, method, article or equipment in there is also other identical elements.
The foregoing is only a preferred embodiment of the present invention, is not intended to restrict the invention, for the skill of this field For art personnel, the invention may be variously modified and varied.All within the spirits and principles of the present invention, made any to repair Change, equivalent replacement, improvement etc., should all be included in the protection scope of the present invention.

Claims (10)

1. a kind of service calling method, for calling the service of new retailer Chao Zhong shops server, which is characterized in that the side Method includes:
Obtain the solicited message of terminal device, wherein the solicited message includes the corresponding shops of shops's server for needing to call Id information;
The address ip and the port numbers of the shops's server for needing to call are found according to shops's id information, wherein should The address ip is that the shops server last time obtained executes and sends the value that operation is sent, and shops's server oneself Ip can execute the transmission operation when changing address;
One is generated according to the address ip, port numbers and the preset configuration information that find and calls the address url, to pass through the tune The service for needing the shops's server called is called with the address url.
2. service calling method according to claim 1, which is characterized in that searched executing according to shops's id information Before the step of address ip of the shops's server called to the needs and port numbers, the method also includes:
Message server is monitored, to judge whether the message server has the change letter for receiving the transmission of shops's server Breath, wherein the modification information is generated when information change occurs for shops's server, and the ip current including shops's server Address, port numbers and shops's id information;
If the message server has the modification information for receiving shops's server transmission, the modification information is obtained, and will Corresponding relationship is established in the address ip, port numbers and shops's id information in the modification information, can to pass through shops's id information Find the corresponding address ip and port numbers.
3. service calling method according to claim 1 or 2, which is characterized in that the ip that the basis is found Location, port numbers and preset configuration information generate one and call the address url, to need to call to described by the address calling url The service of shops's server the step of being called include:
One, which is generated, according to the address ip, port numbers and the preset configuration information that find calls the address url;
Corresponding request example is established by the address calling url, with the door called by the request example to the needs The service of shop server is called.
4. service calling method according to claim 3, which is characterized in that the preset configuration information includes initial The address url, it is described according to the address ip, port numbers and preset configuration information generate one calling the address url the step of include:
Obtain the position of the address ip and the position of port numbers in the initial address url;
The corresponding parameter in the position that will acquire replaces with the address ip found and port numbers, with obtaining a calling url Location.
5. service calling method according to claim 4, which is characterized in that have each ginseng in the initial address url Several notes, described the step of obtaining the position of the address ip and the position of port numbers in the initial address url include:
Each of described initial address url note is traversed, to obtain the address ip and the corresponding note of port numbers;
The position of the address ip and the position of port numbers in the initial address url are determined according to obtained note.
6. service calling method according to claim 5, which is characterized in that with executing the traversal initial url Each of location is explained, the step of to obtain the address ip and port numbers corresponding note before, it is described to obtain the initial url The position of the address ip and the step of the position of port numbers in address further include:
The note of parameters in the initial address url is obtained by reflection mechanism.
7. a kind of service call device, for calling the service of new retailer Chao Zhong shops server, which is characterized in that the dress It sets and includes:
Solicited message obtains module, for obtaining the solicited message of terminal device, wherein the solicited message includes needing to call The corresponding shops's id information of shops's server;
Server parameter searching module, for finding the shops's server for needing to call according to shops's id information The address ip and port numbers, wherein the address ip is that the shops's server last time obtained executes the value for sending and operating and sending, And shops's server can execute transmission operation when the address ip of oneself is changed;
The address url generation module is adjusted for generating one according to the address ip, port numbers and the preset configuration information that find With the address url, it is called with passing through the address calling url to the service for needing the shops's server called.
8. service call device according to claim 7, which is characterized in that further include:
Server monitors module, for monitoring message server, to judge whether the message server receives door The modification information that shop server is sent, wherein the modification information is generated when information change occurs for shops's server, and including The current address ip of shops's server, port numbers and shops's id information;
Modification information obtains module, for having the modification information for receiving shops's server transmission in the message server When, the modification information is obtained, and the address ip, port numbers and the shops's id information in the modification information are established into corresponding relationship, The corresponding address ip and port numbers can be found by shops's id information.
9. service call device according to claim 7 or 8, which is characterized in that the address url generation module includes:
The address url generates submodule, for generating one according to the address ip, port numbers and the preset configuration information that find Call the address url;
Example setting up submodule is requested, for establishing corresponding request example by the address calling url, to pass through the request Example is called the service for needing the shops's server called.
10. a kind of central server, for calling the service of new retailer Chao Zhong shops server, which is characterized in that the center Server includes processor, memory and service call device, wherein the service call device includes one or more storages The software function module executed in the memory and by the processor, the software function module include:
Solicited message obtains module, for obtaining the solicited message of terminal device, wherein the solicited message includes needing to call The corresponding shops's id information of shops's server;
Server parameter searching module, for finding the shops's server for needing to call according to shops's id information The address ip and port numbers, wherein the address ip is that the shops's server last time obtained executes the value for sending and operating and sending, And shops's server can execute transmission operation when the address ip of oneself is changed;
The address url generation module is adjusted for generating one according to the address ip, port numbers and the preset configuration information that find With the address url, it is called with passing through the address calling url to the service for needing the shops's server called.
CN201811124462.9A 2018-09-26 2018-09-26 Service calling method, service calling device and central server Active CN109324914B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811124462.9A CN109324914B (en) 2018-09-26 2018-09-26 Service calling method, service calling device and central server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811124462.9A CN109324914B (en) 2018-09-26 2018-09-26 Service calling method, service calling device and central server

Publications (2)

Publication Number Publication Date
CN109324914A true CN109324914A (en) 2019-02-12
CN109324914B CN109324914B (en) 2021-06-22

Family

ID=65266353

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811124462.9A Active CN109324914B (en) 2018-09-26 2018-09-26 Service calling method, service calling device and central server

Country Status (1)

Country Link
CN (1) CN109324914B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111405049A (en) * 2020-03-19 2020-07-10 北京金山云网络技术有限公司 Service calling information determination method, device and system of cloud storage system
CN115640151A (en) * 2022-11-08 2023-01-24 首约科技(北京)有限公司 Service calling method, device and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101630384A (en) * 2009-08-21 2010-01-20 用友软件股份有限公司 Method and system for managing store business
CN105306417A (en) * 2014-06-25 2016-02-03 深圳市华夏双赢通信有限公司 Network data distribution method based on super router and network system
US20170155658A1 (en) * 2015-11-30 2017-06-01 Microsoft Technology Licensing, Llc Extending a Federated Graph with Third-Party Data and Metadata
CN106941508A (en) * 2016-01-05 2017-07-11 阿里巴巴集团控股有限公司 Service calling method, device and system
CN108055248A (en) * 2017-11-30 2018-05-18 平安科技(深圳)有限公司 Remote invocation method, server and storage medium based on dubbo frames
CN108574604A (en) * 2017-03-07 2018-09-25 北京京东尚科信息技术有限公司 test method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101630384A (en) * 2009-08-21 2010-01-20 用友软件股份有限公司 Method and system for managing store business
CN105306417A (en) * 2014-06-25 2016-02-03 深圳市华夏双赢通信有限公司 Network data distribution method based on super router and network system
US20170155658A1 (en) * 2015-11-30 2017-06-01 Microsoft Technology Licensing, Llc Extending a Federated Graph with Third-Party Data and Metadata
CN106941508A (en) * 2016-01-05 2017-07-11 阿里巴巴集团控股有限公司 Service calling method, device and system
CN108574604A (en) * 2017-03-07 2018-09-25 北京京东尚科信息技术有限公司 test method and device
CN108055248A (en) * 2017-11-30 2018-05-18 平安科技(深圳)有限公司 Remote invocation method, server and storage medium based on dubbo frames

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
佚名: ""怎么通过id查别人的ip地址?"", 《HTTPS://ZHIDAO.BAIDU.COM/QUESTION/582712766.HTML》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111405049A (en) * 2020-03-19 2020-07-10 北京金山云网络技术有限公司 Service calling information determination method, device and system of cloud storage system
CN115640151A (en) * 2022-11-08 2023-01-24 首约科技(北京)有限公司 Service calling method, device and storage medium
CN115640151B (en) * 2022-11-08 2024-02-27 首约科技(北京)有限公司 Service calling method, device and storage medium

Also Published As

Publication number Publication date
CN109324914B (en) 2021-06-22

Similar Documents

Publication Publication Date Title
CN109005085B (en) Service availability monitoring system, method, device and equipment
US9069984B2 (en) On-demand authorization management
CN111092877B (en) Data processing method and device, electronic equipment and storage medium
US20200327045A1 (en) Test System and Test Method
CN103905551B (en) A kind of service calling method and device
EP3360096A1 (en) Systems and methods for security and risk assessment and testing of applications
US10795744B2 (en) Identifying failed customer experience in distributed computer systems
US8141151B2 (en) Non-intrusive monitoring of services in a service-oriented architecture
CN110659109A (en) Openstack cluster virtual machine monitoring system and method
CN112954089B (en) Method, device, equipment and storage medium for analyzing data
CN109586962A (en) IPv4 is upgraded to processing unit, method and the electronic equipment of the HTTPS exterior chain problem of IPv6
CN109359250A (en) Uniform resource locator processing method, device, server and readable storage medium storing program for executing
CN106888277A (en) A kind of domain name inquiry method and device
CN108712428A (en) A kind of method and device carrying out device type identification to terminal
US10715608B2 (en) Automatic server cluster discovery
CN112565406B (en) Gray release method, gray release system and electronic equipment
CN109324914A (en) Service calling method, service call device and central server
Pickard et al. IPv6 diffusion milestones: Assessing the quantity and quality of adoption
CN106686040A (en) Message processing method and message processing device
CN110334118A (en) Data query method and device
CN109471713B (en) Method and device for inquiring information
US8677003B1 (en) Distributed processing of streaming data on an event protocol
CN111628878A (en) Fault positioning method, device and system based on multi-stage network nodes
CN110955460B (en) Service process starting method and device, electronic equipment and storage medium
CN117176802B (en) Full-link monitoring method and device for service request, electronic equipment and medium

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
GR01 Patent grant
GR01 Patent grant