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

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

Info

Publication number
CN109324914B
CN109324914B CN201811124462.9A CN201811124462A CN109324914B CN 109324914 B CN109324914 B CN 109324914B CN 201811124462 A CN201811124462 A CN 201811124462A CN 109324914 B CN109324914 B CN 109324914B
Authority
CN
China
Prior art keywords
address
store
information
server
port number
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.)
Active
Application number
CN201811124462.9A
Other languages
Chinese (zh)
Other versions
CN109324914A (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.)
Duodian Life Chengdu Technology Co ltd
Original Assignee
Duodian 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 Duodian Life Chengdu Technology Co ltd filed Critical Duodian 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

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • 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

Abstract

The invention provides a service calling method, a service calling device and a central server, and relates to the technical field of new retailers. The service calling method comprises the following steps: acquiring request information of terminal equipment, wherein the request information comprises store ID information corresponding to a store server needing to be called; searching an ip address and a port number of the store server needing to be called according to the store ID information, wherein the ip address and the port number are values sent by the store server for the last time; and generating a calling url address according to the found ip address, the port number and preset configuration information, so as to call the service of the store server needing to be called through the calling url address. By the method, the problem that service calling of the store server cannot be completed timely and effectively in the prior art can be solved.

Description

Service calling method, service calling device and central server
Technical Field
The invention relates to the technical field of new retailers, in particular to a service calling method, a service calling device and a central server.
Background
In the technical field of new retailer super technology, when a user needs to acquire services or information in each store, the user requests a central server to call the services or information stored in the store server corresponding to the store through a terminal device.
When calling the service or information of the store server, the central server needs to know the information such as the ip address and the port number of the store server. However, when the store location changes, the ip address of the corresponding server also changes. If the central server calls the corresponding store server based on the ip address before the change, the problem that the service or the information cannot be called effectively is caused.
As a result of the research by the inventors, in the prior art, after the ip address of the store server changes with the change of the store location, the corresponding ip address stored in the center server is generally corrected by the maintenance staff. However, this maintenance method has a problem that maintenance is not timely, and accordingly, service calls to the store server cannot be timely and efficiently completed.
Disclosure of Invention
In view of the above, an object of the present invention is to provide a service invocation method, a service invocation device and a central server, so as to solve the problem in the prior art that the service invocation to a store server cannot be completed timely and effectively.
In order to achieve the above purpose, the embodiment of the invention adopts the following technical scheme:
a service invocation method for invoking a service of a new retailer super store server, the method comprising:
acquiring request information of terminal equipment, wherein the request information comprises store ID information corresponding to a store server needing to be called;
searching the ip address and the port number of the store server needing to be called according to the store ID information, wherein the ip address is an acquired value sent by the last sending operation executed by the store server, and the sending operation can be executed by the store server when the ip address of the store server is changed;
and generating a calling url address according to the found ip address, the port number and preset configuration information, so as to call the service of the store server needing to be called through the calling url address.
In a preferred option of the embodiment of the present invention, in the service invocation method, before the step of finding the ip address and the port number of the store server to be invoked according to the store ID information is executed, the method further includes:
monitoring a message server to judge whether the message server receives change information sent by a store server, wherein the change information is generated when the store server changes information and comprises the current ip address, the port number and store ID information of the store server;
if the message server receives the change information sent by the store server, the change information is acquired, and the corresponding relation is established among the ip address, the port number and the store ID information in the change information, so that the corresponding ip address and the port number can be found through the store ID information.
In a preferred option of the embodiment of the present invention, in the service invoking method, the step of generating an invoking url address according to the found ip address, port number and preset configuration information, and invoking the service of the store server to be invoked through the invoking url address includes:
generating a calling url address according to the found ip address, the port number and preset configuration information;
and establishing a corresponding request instance through the calling url address so as to call the service of the store server needing to be called through the request instance.
In a preferred option of the embodiment of the present invention, in the service invocation method, the preset configuration information includes an initial url address, and the step of generating an invocation url address according to the ip address, the port number, and the preset configuration information includes:
acquiring the position of an ip address and the position of a port number in the initial url address;
and replacing the parameters corresponding to the acquired positions with the found ip address and the found port number to obtain a calling url address.
In a preferred option of the embodiment of the present invention, in the service invocation method, the initial url address has annotations of each parameter, and the step of obtaining the position of the ip address and the position of the port number in the initial url address includes:
traversing each annotation in the initial url address to obtain annotations corresponding to the ip address and the port number;
and determining the position of the ip address and the position of the port number in the initial url address according to the obtained annotation.
In a preferred option of the embodiment of the present invention, in the service invocation method, before the step of traversing each annotation in the initial url address to obtain an annotation corresponding to an ip address and a port number, the step of obtaining a position of the ip address and a position of the port number in the initial url address further includes:
and obtaining the annotation of each parameter in the initial url address through a reflection mechanism.
The embodiment of the invention also provides a service calling device, which is used for calling the service of the new retailer super-middle store server, and the device comprises:
the system comprises a request information acquisition module, a request information acquisition module and a control module, wherein the request information acquisition module is used for acquiring request information of terminal equipment, and the request information comprises store ID information corresponding to a store server needing to be called;
the server parameter searching module is used for searching the ip address and the port number of the store server to be called according to the store ID information, wherein the ip address is an acquired value sent by the last sending operation executed by the store server, and the sending operation can be executed by the store server when the own ip address is changed;
and the url address generating module is used for generating a calling url address according to the found ip address, the found port number and the preset configuration information so as to call the service of the store server needing to be called through the calling url address.
In a preferred option of the embodiment of the present invention, the service invocation apparatus further includes:
the server monitoring module is used for monitoring the message server to judge whether the message server receives change information sent by the store server, wherein the change information is generated when the store server changes information and comprises the current ip address, the port number and the store ID information of the store server;
and the change information acquisition module is used for acquiring the change information when the message server receives the change information sent by the store server, and establishing a corresponding relation among the ip address, the port number and the store ID information in the change information so as to find the corresponding ip address and the port number through the store ID information.
In a preferred option of the embodiment of the present invention, in the service invocation apparatus, the url address generation module includes:
the url address generation submodule is used for generating a calling url address according to the found ip address, the port number and the preset configuration information;
and the request instance establishing submodule is used for establishing a corresponding request instance through the calling url address so as to call the service of the store server needing to be called through the request instance.
The embodiment of the invention also provides a central server, which is used for calling the service of the new retailer super-middle store server, and comprises a processor, a memory and a service calling device, wherein the service calling device comprises one or more software function modules which are stored in the memory and executed by the processor, and the software function modules comprise:
the system comprises a request information acquisition module, a request information acquisition module and a control module, wherein the request information acquisition module is used for acquiring request information of terminal equipment, and the request information comprises store ID information corresponding to a store server needing to be called;
the server parameter searching module is used for searching the ip address and the port number of the store server to be called according to the store ID information, wherein the ip address is an acquired value sent by the last sending operation executed by the store server, and the sending operation can be executed by the store server when the own ip address is changed;
and the url address generating module is used for generating a calling url address according to the found ip address, the found port number and the preset configuration information so as to call the service of the store server needing to be called through the calling url address.
According to the service calling method, the service calling device and the central server, based on the basis that the store server can execute the sending operation when the ip address of the store server changes, the central server can obtain the value sent by the last sending operation executed by the store server, and obtain the latest and effective ip address of the store server based on the corresponding sending value of the last time, so that the effectiveness of calling the store server based on the ip address is guaranteed, and the problem that the service calling of the store server cannot be timely and effectively completed in the prior art is solved.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
Fig. 1 is an application block diagram of a central server according to an embodiment of the present invention.
Fig. 2 is a block diagram of a central server according to an embodiment of the present invention.
Fig. 3 is a flowchart illustrating a service invocation method according to an embodiment of the present invention.
Fig. 4 is a schematic flowchart of step S150 in fig. 3.
Fig. 5 is a schematic flowchart of step S151 in fig. 3.
Fig. 6 is another flowchart of the service invocation method according to the embodiment of the present invention.
Fig. 7 is a block diagram of a service invocation device according to an embodiment of the present invention.
Fig. 8 is a block diagram of a url address generation module according to an embodiment of the present invention.
Fig. 9 is another block diagram of a service invocation device according to an embodiment of the present invention.
Icon: 10-a central server; 12-a memory; 14-a processor; 20-a message server; 30-store server; 40-a terminal device; 100-service invocation means; 110-request information acquisition module; 130-a server parameter lookup module; 150-url address generation module; 151-url address generation submodule; 153-request instance build submodule; 170-a server monitoring module; 190-change information acquisition module.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. In the description of the present invention, the terms "first," "second," "third," "fourth," and the like are used merely to distinguish one description from another, and are not to be construed as merely or implying relative importance.
As shown in fig. 1, an embodiment of the present invention provides a central server 10 for a new retailer hypersystem. The new retailer super system may include a store server 30 and a terminal device 40, the store server 30 can provide the service (or information) of the retailer super, and the terminal device 40 can acquire the service (or information) of the retailer super based on a request of a user.
In detail, the center server 10 may be in communication connection with the store server 30 and the terminal device 40, respectively, to acquire the service (or information) provided by the store server 30 based on the request of the terminal device 40 and transmit the service (or information) to the terminal device 40, so that the user can acquire the required service (or information) through the terminal device 40.
Referring to fig. 2, in this embodiment, the central server 10 may include a memory 12, a processor 14, and a service invocation device 100.
Wherein the memory 12 and the processor 14 are electrically connected directly or indirectly to realize data transmission or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines. The service invocation means 100 includes at least one software function module which can be stored in the form of software or firmware (firmware) in the memory 12. The processor 14 is used for executing executable computer programs stored in the memory 12, such as software function modules and computer programs included in the service calling device 100, so as to implement a service calling method.
Alternatively, the Memory 12 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like. Wherein the memory 12 is used for storing a program, and the processor 14 executes the program after receiving the execution instruction.
Also, the processor 14 may be an integrated circuit chip having signal processing capabilities. The Processor 14 may be a general-purpose Processor including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
It will be appreciated that the configuration shown in fig. 2 is merely illustrative and that the central server 10 may include more or fewer components than shown in fig. 2 or may have a different configuration than shown in fig. 2. The components shown in fig. 2 may be implemented in hardware, software, or a combination thereof.
Alternatively, the specific type of the central server 10 is not limited, and may include, but is not limited to, a web server, a data server, a computer, a Mobile Internet Device (MID), and other devices having a processing function.
With reference to fig. 3, an embodiment of the present invention further provides a service invoking method applicable to the central server 10. Wherein the method steps defined by the method related flow may be implemented by the processor 14. The specific flow shown in fig. 3 will be described in detail below.
Step S110, request information of the terminal device 40 is acquired.
In this embodiment, the request information may include store ID information corresponding to the store server 30 that needs to be called. That is, when the user needs to obtain the service or information of the store (stored in the corresponding store server 30), the request information may be transmitted to the center server 10 through the terminal device 40 of the user or another person.
In consideration of the fact that the central server 10 calls the service or information of the store server 30, it is necessary to know the ip address and the port number of the store server 30 to establish a communication connection. That is, the central server 10 needs to acquire the ip address and the port number of the store server 30. However, the user or the terminal device 40 cannot obtain the ip address and the port number of the store server 30, and the ip address and the port number of one store server 30 may generally have a correspondence relationship with the ID information of the corresponding store.
Therefore, on the basis that the user or the terminal device 40 can acquire the store ID information, the correspondence relationship between the ip address, the port number, and the store ID information may be established and stored in advance, so that when the store ID information is acquired, step S130 may be performed.
Step S130, finding the ip address and the port number of the store server 30 to be called according to the store ID information.
In this embodiment, in order to avoid the problem that the ip address of the store server 30 corresponding to the store changes after the store changes, and the corresponding relationship between the store ID information and the ip address is invalid, a mechanism may be established in advance, that is, when the store server 30 determines that the ip address of the store server changes, the ip address after the store server changes may be sent to the center server 10, so that the center server 10 updates the changed ip address. That is, the ip address and the port number found by the ID information in the central server 10 are the last value sent by the store server 30, so as to ensure that the ip address and the port number obtained in step S130 have higher real-time performance and accuracy, and further avoid the problem that the service call to the store server 30 cannot be completed timely and effectively when step S150 is executed based on the ip address and the port number.
Step S150, generating a call url address according to the found ip address, port number and preset configuration information, so as to call the service of the store server 30 that needs to be called through the call url address.
In this embodiment, after the ip address and the port number of the store server 30 that needs to be called are obtained in step S130, communication can be accurately established with the store server 30 based on the ip address and the port number to call the service.
In detail, in the webservice-based system, communication between general devices is performed based on url addresses. That is, an initial url address (including fixed and variable parameters) may be pre-configured. The variable parameters may be ip addresses and port numbers, and different ip addresses and port numbers may be used as corresponding variable parameters for different store servers 30 to obtain a url address. And, the service of the store server 30 that needs to be called can be called by the url address.
Alternatively, the manner of making a call to the service of the store server 30 that needs to be called is not limited when step S150 is performed to generate a call url address. In this embodiment, referring to fig. 4, in order to avoid the problem of resource waste, step S150 may include step S151 and step S513.
And step S151, generating a calling url address according to the found ip address, the port number and preset configuration information.
Step S153, establishing a corresponding request instance through the calling url address, so as to call the service of the store server 30 that needs to be called through the request instance.
In this embodiment, a calling url address may be generated through step S151, and then step S153 is executed to establish a corresponding request instance through the calling url address, so as to call the service of the store server 30 that needs to be called through the request instance. In detail, the call url address may be used as a key to cache the established corresponding request instance.
By creating the request instance, the request instance can be directly called when service calling needs to be performed for multiple times, so that the problem that resources occupied by the processor 14 are consumed in the repeated generation process due to repeated generation of calling url addresses is avoided, and the problem that calling is not timely due to the fact that a certain time is required in the creation process is also caused.
Optionally, the manner of executing step S151 to generate the call url address is not limited, and may be set according to the actual application requirement. In this embodiment, the preset configuration information may include an initial url address, and correspondingly, in conjunction with fig. 5, step S151 may include step S151a and step S151 b.
Step S151a, acquiring the position of the ip address and the position of the port number in the initial url address.
Step S151b, replacing the parameters corresponding to the obtained location with the found ip address and port number to obtain a calling url address.
In this embodiment, the initial url address may be composed of a plurality of parts, for example, parameters that are the same for the calling url address corresponding to each store server 30 and parameters that are different for the calling url addresses corresponding to different store servers 30 may be included. The different parameters may include, among other things, the ip address and port number of the store server 30.
Therefore, when the calling url address is generated, the calling url address capable of calling the store server 30 can be obtained by executing step S151a to obtain the position of the ip address and the position of the port number in the initial url address, and then replacing the parameters of the position with the ip address and the port number acquired by executing step S130 by executing step S151 b.
Alternatively, the manner of acquiring the position through step S151a is not limited, and may be set according to actual application requirements. In this embodiment, in order to facilitate accurate and effective searching of the position of the ip address and the position of the port number in the initial url address, the initial url address has annotations of various parameters, that is, when configuring the initial url address, a corresponding annotation may be added to each parameter in the initial url address, and therefore, step S151a may include the following steps:
traversing each annotation in the initial url address to obtain annotations corresponding to the ip address and the port number; and determining the position of the ip address and the position of the port number in the initial url address according to the obtained annotation.
Through the steps of traversing all the annotations, the positions of the ip address and the port number can be accurately and effectively found, and the calling url address obtained through the replacement operation is ensured to have higher accuracy.
Further, in order to facilitate the execution of the operation of traversing the annotations, the step of obtaining the annotations may be executed first, that is, each annotation in the initial url address may be obtained first. The annotation obtaining mode is not limited, and can be set according to actual application requirements.
In this embodiment, a possible implementation is provided, and in detail, the implementation is to obtain annotations of various parameters in the initial url address through a reflection mechanism. Also, the method of performing the reflection operation may be an invoke method.
Further, it is considered that the latest ip address of the store server 30 needs to be acquired before step S130 is executed. And the acquisition mode is not limited, and can be set according to the actual application requirements.
In this embodiment, a possible implementation manner is provided, and in detail, in conjunction with fig. 6, before performing step S130, the service calling method may further include step S170 and step S190.
Step S170 monitors the message server 20 to determine whether the message server 20 has received the change information sent by the store server 30.
In the present embodiment, the change information is generated when the store server 30 changes information, and includes the current ip address, port number, and store ID information of the store server 30. The message server 20 is used for receiving and storing the change information sent by the store server 30 to form a message queue.
The message server 20 and the center server 10 are configured such that the center server 10 can monitor the message server 20, and when the message server 20 receives the change information sent by the store server 30, the change information can be obtained in time, thereby ensuring the real-time property of obtaining the ip address.
Step S190, if the message server 20 receives the change information sent by the store server 30, the change information is obtained, and a corresponding relationship is established between the ip address, the port number, and the store ID information in the change information, so that the corresponding ip address and port number can be found through the store ID information.
In this embodiment, after the change information is acquired in step S190, the correspondence relationship may be established in advance so that the changed ip address can be found by the store ID information. And, the corresponding relation can also replace the previously established corresponding relation.
For example, before the ip address is changed, the correspondence relationship between the ip address, the port number, and the store ID information may be as shown in the following table:
ip address Port number Store ID information
A1 B1 C1
After the ip address is changed, the correspondence relationship between the ip address, the port number, and the store ID information may be as shown in the following table:
ip address Port number Store ID information
A2 B1 C1
That is, if the central server 10 cannot acquire the changed ip address in time, the ip address found by the store ID information C1 is a1, and the service of the corresponding store server 30 is called by the call url address generated based on a1, the call cannot be completed efficiently. Therefore, the relation of a1-B1-C1 needs to be replaced by a2-B1-C1, so that the ip address found by the store ID information C1 is a2, and the call can be effectively completed when the service of the corresponding store server 30 is called by the call url address generated based on a 2.
With reference to fig. 7, an embodiment of the present invention further provides a service invocation apparatus 100 applicable to the central server 10. The service invocation device 100 may include a request information obtaining module 110, a server parameter lookup module 130, and a url address generation module 150.
The request information obtaining module 110 is configured to obtain request information of the terminal device 40, where the request information includes store ID information corresponding to the store server 30 that needs to be called. In this embodiment, the request information obtaining module 110 may be configured to execute step S110 shown in fig. 3, and the foregoing description of step S110 may be referred to for specific description of the request information obtaining module 110.
The server parameter searching module 130 is configured to search, according to the store ID information, an ip address and a port number of the store server 30 that needs to be called, where the ip address is an obtained value sent by the last sending operation executed by the store server 30, and the store server 30 executes the sending operation when the ip address of the store server 30 is changed. In this embodiment, the server parameter lookup module 130 may be configured to perform step S130 shown in fig. 3, and the detailed description about the server parameter lookup module 130 may refer to the foregoing description about step S130.
The url address generating module 150 is configured to generate a calling url address according to the found ip address, the found port number, and the preset configuration information, so as to call the service of the store server 30 that needs to be called through the calling url address. In this embodiment, the url address generating module 150 may be configured to execute step S150 shown in fig. 3, and the foregoing description of step S150 may be referred to for the detailed description of the url address generating module 150.
In conjunction with fig. 8, in this embodiment, the url address generating module 150 may include a url address generating sub-module 151 and a request instance establishing sub-module 153.
The url address generating sub-module 151 is configured to generate a calling url address according to the found ip address, the port number, and the preset configuration information. In this embodiment, the url address generating sub-module 151 may be configured to execute step S151 shown in fig. 4, and the foregoing description of step S151 may be referred to for a detailed description of the url address generating sub-module 151.
The request instance establishing sub-module 153 is configured to establish a corresponding request instance through the invoking url address, so as to invoke the service of the store server 30 that needs to be invoked through the request instance. In this embodiment, the request instance creating sub-module 153 may be configured to perform the step S153 shown in fig. 4, and the detailed description about the request instance creating sub-module 153 may refer to the description about the step S153.
With reference to fig. 9, in this embodiment, the service invocation device 100 may further include a server monitoring module 170 and a change information obtaining module 190.
The server monitoring module 170 is configured to monitor the message server 20 to determine whether the message server 20 receives change information sent by the store server 30, where the change information is generated when the store server 30 changes information and includes a current ip address, a port number, and store ID information of the store server 30. In this embodiment, the server monitor module 170 may be configured to perform step S170 shown in fig. 6, and the foregoing description of step S170 may be referred to for specific description of the server monitor module 170.
The change information obtaining module 190 is configured to, when the message server 20 receives the change information sent by the store server 30, obtain the change information, and establish a corresponding relationship between the ip address, the port number, and the store ID information in the change information, so that the corresponding ip address and the port number can be found through the store ID information. In this embodiment, the change information acquiring module 190 may be configured to execute step S190 shown in fig. 6, and the foregoing description of step S190 may be referred to for specific description of the change information acquiring module 190.
In summary, the service invocation method, the service invocation device 100 and the center server 10, as well as the service invocation method, the service invocation device 100 and the center server 10 provided by the present invention, based on the basis that the store server 30 can perform the sending operation when the ip address of the store server is changed, the center server 10 can obtain the value sent by the last sending operation performed by the store server 30, and obtain the latest and effective ip address of the store server 30 based on the last corresponding sending value, thereby ensuring the effectiveness when the store server 30 is invoked based on the ip address, and further improving the problem in the prior art that the service invocation to the store server 30 cannot be completed in time and effectively.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus and method embodiments described above are illustrative only, as the flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, the functional modules in the embodiments of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, an electronic device, or a network device) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes. It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (8)

1. A service invocation method for invoking a service of a new retailer super store server, said method comprising:
acquiring request information of terminal equipment, wherein the request information comprises store ID information corresponding to a store server needing to be called;
monitoring a message server to judge whether the message server receives change information sent by a store server, wherein the change information is generated when the store server changes information and comprises the current ip address, the port number and store ID information of the store server;
if the message server receives the change information sent by the store server, acquiring the change information, and establishing a corresponding relation among the ip address, the port number and the store ID information in the change information so as to find the corresponding ip address and the port number through the store ID information;
searching the ip address and the port number of the store server needing to be called according to the store ID information, wherein the ip address is an acquired value sent by the last sending operation executed by the store server, and the sending operation can be executed by the store server when the ip address of the store server is changed;
and generating a calling url address according to the found ip address, the port number and preset configuration information, so as to call the service of the store server needing to be called through the calling url address.
2. The service calling method according to claim 1, wherein the step of generating a calling url address according to the found ip address, port number and preset configuration information, so as to call the service of the store server to be called through the calling url address comprises:
generating a calling url address according to the found ip address, the port number and preset configuration information;
and establishing a corresponding request instance through the calling url address so as to call the service of the store server needing to be called through the request instance.
3. The service invocation method according to claim 2, wherein the preset configuration information includes an initial url address, and the step of generating a call url address according to the ip address, the port number, and the preset configuration information includes:
acquiring the position of an ip address and the position of a port number in the initial url address;
and replacing the parameters corresponding to the acquired positions with the found ip address and the found port number to obtain a calling url address.
4. The service invocation method according to claim 3, wherein the initial url address has annotations of various parameters, and the step of obtaining the position of the ip address and the position of the port number in the initial url address comprises:
traversing each annotation in the initial url address to obtain annotations corresponding to the ip address and the port number;
and determining the position of the ip address and the position of the port number in the initial url address according to the obtained annotation.
5. The service invocation method according to claim 4, wherein, before the step of traversing each annotation in the initial url address to obtain an annotation corresponding to an ip address and a port number, the step of obtaining the position of the ip address and the position of the port number in the initial url address further comprises:
and obtaining the annotation of each parameter in the initial url address through a reflection mechanism.
6. A service invocation apparatus for invoking a service of a new retailer super store server, said apparatus comprising:
the system comprises a request information acquisition module, a request information acquisition module and a control module, wherein the request information acquisition module is used for acquiring request information of terminal equipment, and the request information comprises store ID information corresponding to a store server needing to be called;
the server monitoring module is used for monitoring the message server to judge whether the message server receives change information sent by the store server, wherein the change information is generated when the store server changes information and comprises the current ip address, the port number and the store ID information of the store server;
the system comprises a change information acquisition module, a store ID information acquisition module and a change information processing module, wherein the change information acquisition module is used for acquiring change information when the message server receives the change information sent by the store server, and establishing a corresponding relation among an ip address, a port number and the store ID information in the change information so as to search the corresponding ip address and port number through the store ID information;
the server parameter searching module is used for searching the ip address and the port number of the store server to be called according to the store ID information, wherein the ip address is an acquired value sent by the last sending operation executed by the store server, and the sending operation can be executed by the store server when the own ip address is changed;
and the url address generating module is used for generating a calling url address according to the found ip address, the found port number and the preset configuration information so as to call the service of the store server needing to be called through the calling url address.
7. The service calling apparatus according to claim 6, wherein the url address generating module comprises:
the url address generation submodule is used for generating a calling url address according to the found ip address, the port number and the preset configuration information;
and the request instance establishing submodule is used for establishing a corresponding request instance through the calling url address so as to call the service of the store server needing to be called through the request instance.
8. A central server for invoking services of a new retailer ultra-middle store server, the central server comprising a processor, a memory, and a service invocation means, wherein the service invocation means comprises one or more software function modules stored in the memory and executed by the processor, the software function modules comprising:
the system comprises a request information acquisition module, a request information acquisition module and a control module, wherein the request information acquisition module is used for acquiring request information of terminal equipment, and the request information comprises store ID information corresponding to a store server needing to be called;
the server monitoring module is used for monitoring the message server to judge whether the message server receives change information sent by the store server, wherein the change information is generated when the store server changes information and comprises the current ip address, the port number and the store ID information of the store server;
the system comprises a change information acquisition module, a store ID information acquisition module and a change information processing module, wherein the change information acquisition module is used for acquiring change information when the message server receives the change information sent by the store server, and establishing a corresponding relation among an ip address, a port number and the store ID information in the change information so as to search the corresponding ip address and port number through the store ID information;
the server parameter searching module is used for searching the ip address and the port number of the store server to be called according to the store ID information, wherein the ip address is an acquired value sent by the last sending operation executed by the store server, and the sending operation can be executed by the store server when the own ip address is changed;
and the url address generating module is used for generating a calling url address according to the found ip address, the found port number and the preset configuration information so as to call the service of the store server needing to be called through the calling url address.
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 CN109324914A (en) 2019-02-12
CN109324914B true 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)

Families Citing this family (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
CN115640151B (en) * 2022-11-08 2024-02-27 首约科技(北京)有限公司 Service calling method, device and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (4)

* 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
CN105306417B (en) * 2014-06-25 2019-01-25 深圳市华夏双赢通信有限公司 A kind of network data distributing method and network system based on super router
US10050953B2 (en) * 2015-11-30 2018-08-14 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

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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》;20130820;第1页 *

Also Published As

Publication number Publication date
CN109324914A (en) 2019-02-12

Similar Documents

Publication Publication Date Title
CN107534570B (en) Computer system, method and medium for virtualized network function monitoring
CN109428749B (en) Network management method and related equipment
EP3231135B1 (en) Alarm correlation in network function virtualization environment
US20180375726A1 (en) Resource Configuration Method, Virtualized Network Function Manager, and Element Management System
CN109218133B (en) Network speed testing system, method, device and computer readable storage medium
CN108958949B (en) Calling method and system of application program
CN103942225A (en) Method and system for invoking resources of Hybrid App client and client
US10445167B1 (en) Automated method and system for diagnosing load performance issues
TW201742403A (en) Method and apparatus for node processing in distributed system
CN110659109A (en) Openstack cluster virtual machine monitoring system and method
US9223672B1 (en) Method and system for providing error repair status data to an application user
CN109324914B (en) Service calling method, service calling device and central server
CN110968356A (en) Method and device for acquiring configuration information
US10715628B2 (en) Attribute operating method and device
CN111510330B (en) Interface management device, method and storage medium
EP3399413B1 (en) Component logical threads quantity adjustment method and device
CN108111496B (en) Method, device and system for exposing http service for dubbo distributed application
EP3672203A1 (en) Distribution method for distributed data computing, device, server and storage medium
CN110955460B (en) Service process starting method and device, electronic equipment and storage medium
CN111831503B (en) Monitoring method based on monitoring agent and monitoring agent device
CN109495319B (en) Method, device and equipment for determining fault information of CDN node
CN111444074A (en) Data monitoring method and device, electronic equipment and readable storage medium
CN111414247A (en) Server switching method, device, management node and storage medium
CN114090268B (en) Container management method and container management system
CN109302465B (en) Management method and system of multi-terminal service resources

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