CN108365976B - Network service optimization method and device - Google Patents

Network service optimization method and device Download PDF

Info

Publication number
CN108365976B
CN108365976B CN201810070097.1A CN201810070097A CN108365976B CN 108365976 B CN108365976 B CN 108365976B CN 201810070097 A CN201810070097 A CN 201810070097A CN 108365976 B CN108365976 B CN 108365976B
Authority
CN
China
Prior art keywords
service
network
network service
service request
request
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.)
Expired - Fee Related
Application number
CN201810070097.1A
Other languages
Chinese (zh)
Other versions
CN108365976A (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.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo 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 Beijing Qihoo Technology Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201810070097.1A priority Critical patent/CN108365976B/en
Publication of CN108365976A publication Critical patent/CN108365976A/en
Application granted granted Critical
Publication of CN108365976B publication Critical patent/CN108365976B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0823Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability
    • H04L41/083Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability for increasing network speed
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0823Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/50Network service management, e.g. ensuring proper service fulfilment according to agreements
    • H04L41/5041Network service management, e.g. ensuring proper service fulfilment according to agreements characterised by the time relationship between creation and deployment of a service
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services

Abstract

The invention discloses a method and a device for optimizing network service, relates to the technical field of internet, and mainly aims to solve the problems that the execution speed of a system is low, only serial system execution is supported, thread operation cannot be supported and the efficiency of the network service is reduced due to the explanatory characteristic of a PHP language in the prior art. The main technical scheme is as follows: when a network service request is received through a reverse proxy server, accessing the network service request through a preset Module interface; matching a micro service system corresponding to the service information of the network service request through a Gateway architecture layer with parallel organization service logic; and establishing communication connection between the network service request and the micro service system so that the micro service system performs service processing according to the network service request. The method is mainly used for optimizing the network service.

Description

Network service optimization method and device
Technical Field
The present invention relates to the field of internet technologies, and in particular, to a method and an apparatus for optimizing a network service.
Background
With the continuous development of internet technology, network services enable people to access data on the WEB through different terminal devices in different places, and the user access capability of various application services is greatly expanded. In order to access the network service to the application service system, the network service needs to be implemented by an access engine.
At present, the existing access engine realizes the access of network service by establishing a network service architecture among a reverse proxy server Nginx, a web server framework FastHttp and a yaf (yet other framework) development framework using a universal open source scripting language PHP, but the system execution speed is slow due to the explanatory characteristic of the PHP language, only serial system execution is supported, thread operation cannot be supported, and the efficiency of the network service is reduced.
Disclosure of Invention
In view of the above, the present invention provides a method and an apparatus for optimizing a network service, and mainly aims to solve the problem that the existing system has a low execution speed due to the explanatory characteristic of the PHP language, and only supports serial system execution but cannot support thread operation, thereby reducing the efficiency of the network service.
According to an aspect of the present invention, there is provided a method for optimizing a network service, including:
when a network service request is received through a reverse proxy server, accessing the network service request through a preset Module interface;
matching a micro service system corresponding to the service information of the network service request through a Gateway architecture layer with parallel organization service logic;
and establishing communication connection between the network service request and the micro service system so that the micro service system performs service processing according to the network service request.
Further, when a network service request is received through the reverse proxy server, before accessing the network service request through a preset Module interface, the method further includes:
configuring a network topology structure including at least one service node according to service information corresponding to different micro service systems, and generating a configuration file according to a logical relationship between the network topology structure and the service node and a corresponding relationship between the network topology structure and a character string URI interface of the network service request for identifying Internet resource names, wherein the network topology structure and the configuration file are configured in the Gateway architecture layer in a storm-like form.
Further, the micro service system corresponding to the service information of the network service request matched by the Gateway architecture layer with the parallel organization service logic comprises:
and searching a matched network topological structure according to the URL interface analyzed in the network service request, executing corresponding services according to service nodes in the network topological structure by using service information carried in the network service request, and determining a micro-service system corresponding to the network service request.
Further, after the configuring a network topology structure including at least one service node according to service information corresponding to different micro service systems and generating a configuration file according to a logical relationship between the network topology structure and the service node and a corresponding relationship between the network topology structure and a character string URI interface of the network service request for identifying an internet resource name, the method further includes:
performing service registration through a logical relationship between service nodes in the network topology structure;
and after the registration is successful, establishing network service request connection through a preset Module interface so as to access the network service request through the preset Module interface when receiving the network service request.
Further, the method further comprises:
receiving a network topology restructuring request;
and according to the number information of the service nodes carried in the reorganization request and the sequence information, reorganizing the logical relationship and the corresponding relationship in the configuration file, and updating the network topology structure in the architecture layer according to the reorganized configuration file.
Further, after establishing a communication connection between the network service request and the micro service system so that the micro service system performs service processing according to the network service request, the method further includes:
and storing the data processed by the micro-service system according to different network service requests into storage positions with different storage spaces and/or storage types according to different service information.
According to an aspect of the present invention, there is provided an apparatus for optimizing a network service, including:
the access unit is used for accessing the network service request through a preset Module interface when the network service request is received through the reverse proxy server;
the matching unit is used for matching a micro service system corresponding to the service information of the network service request through a Gateway architecture layer with parallel organization service logic;
and the connection unit is used for establishing communication connection between the network service request and the micro service system so that the micro service system performs service processing according to the network service request.
Further, the apparatus further comprises:
the configuration unit is used for configuring a network topology structure comprising at least one service node according to service information corresponding to different micro service systems, and generating a configuration file according to a logical relationship between the network topology structure and the service node and a corresponding relationship between the network topology structure and a character string URI interface of the network service request for identifying Internet resource names, wherein the network topology structure and the configuration file are configured in the Gateway architecture layer in a storm-like manner.
Further, the matching unit is specifically configured to search for a matched network topology structure according to a URL interface analyzed in the network service request, execute a corresponding service according to service information carried in the network service request according to a service node in the network topology structure, and determine a micro service system corresponding to the network service request.
Further, the apparatus further comprises:
a registration unit, configured to perform service registration through a logical relationship between service nodes in the network topology;
and the establishing unit is used for establishing network service request connection through a preset Module interface after the registration is successful so as to access the network service request through the preset Module interface when the network service request is received.
Further, the apparatus further comprises:
a receiving unit, configured to receive a reassembly request of a network topology;
and the recombination unit is used for recombining the logical relationship and the corresponding relationship in the configuration file according to the number information and the sequence information of the service nodes carried in the recombination request, and updating the network topology structure in the architecture layer according to the recombined configuration file.
Further, the apparatus further comprises:
and the storage unit is used for storing the data processed by the micro service system according to different network service requests into storage positions with different storage spaces and/or storage types according to different service information.
According to another aspect of the present invention, a storage medium is provided, and the storage medium stores at least one executable instruction, which causes a processor to perform operations corresponding to the optimization method of the network service.
According to still another aspect of the present invention, there is provided a terminal including: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction enables the processor to execute the operation corresponding to the optimization method of the network service.
By the technical scheme, the technical scheme provided by the embodiment of the invention at least has the following advantages:
the invention provides a method and a device for optimizing network service, which comprises the steps of firstly accessing a network service request through a preset Module interface when the network service request is received through a reverse proxy server, then matching a micro service system corresponding to service information of the network service request through a Gateway architecture layer with parallel organization service logic, and then establishing communication connection between the network service request and the micro service system so that the micro service system carries out service processing according to the network service request. Compared with the prior art that the system execution speed is low due to the interpretive characteristics of the PHP language, only serial system execution is supported, and thread operation cannot be supported, after the network service request is accessed through the preset Module interface, the micro service system corresponding to the network service request is determined by parallel organization logic in Gateway, so that the parallel processing of multiple network service requests is realized, the pressure resistance is improved, the load loss is reduced, and the efficiency of the network service is improved.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a flowchart illustrating a method for optimizing a network service according to an embodiment of the present invention;
FIG. 2 is a flow chart of another method for optimizing network services provided by an embodiment of the present invention;
fig. 3 is a schematic diagram illustrating a network structure of Botl according to an embodiment of the present invention;
fig. 4 shows a schematic diagram of a service bot registration provided by an embodiment of the present invention;
fig. 5 shows a flowchart of a construction service bot value operation service provided by an embodiment of the present invention;
fig. 6 is a schematic diagram illustrating a Gateway architecture provided in an embodiment of the present invention;
FIG. 7 is a block diagram of an apparatus for optimizing network services according to an embodiment of the present invention;
FIG. 8 is a block diagram of an apparatus for optimizing network services provided by an embodiment of the present invention;
fig. 9 is a schematic diagram of a terminal according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
An embodiment of the present invention provides a method for optimizing a network service, as shown in fig. 1, where the method includes:
101. when a network service request is received through the reverse proxy server, the network service request is accessed through a preset Module interface.
The network service request refers to a web service that needs to be requested when accessing the current application system through the internet, and may include network service requests of different service types, such as a template service request, a music service request, a video service request, a cloud control service request, and the like. The preset Module interface is an interface that must be implemented by the network service request access engine, and may specifically be a code protocol, which is dedicated to providing a protocol interface for the network service request. Generally, the reverse proxy server may be Nginx, and performs reverse proxy after parsing the domain name, so as to implement access of the network service request.
It should be noted that, since the Module interface can be used as a specific interface of different functional modules, in the embodiment of the present invention, in order to establish an overall optimized architecture of a network service, as defined, the architecture is Migo, that is, a micro service architecture, and after the reverse proxy server Nginx receives a network service request, the Module interface can be preset as an access interface of the Gateway architecture layer processing Module in the current embodiment.
102. And matching the micro service system corresponding to the service information of the network service request through a Gateway architecture layer with parallel organization service logic.
The Gateway architecture layer with the parallel organization business logic is a framework layer mainly used for processing the network service request, the Gateway architecture layer comprises the business logic, and the business information of the network service request can be matched with the business logic to determine the micro-service system which needs to process the network service request with the business information. In addition, the service information includes a video service, a music service, a cloud control service, a template service, and the like, and the embodiment of the present invention is not particularly limited.
It should be noted that, in the Gateway architecture layer in the embodiment of the present invention, a configuration file conf is configured in advance, and is used to store a serial relationship and a hierarchical relationship of a plurality of network Topology topologies composed of service nodes boll, so that when a network service request is accessed, each individual boll may be executed and correspondingly flow through each boll according to service information, where one Topology may be composed of 1 or a plurality of bolls, and each boll is responsible for a single small function, that is, processes a relevant logic of a single micro service, which is not limited in the embodiment of the present invention. In addition, different fastttp requests are sent by an Http engine in the Gateway architecture layer, so that multi-thread execution is realized.
103. And establishing a communication connection between the network service request and the micro service system.
The communication connection can be realized through a high-performance cross-language remote procedure call protocol GRPC, namely, after the network service request determines the micro service system to be processed, the communication connection is sent to the micro service system in the micro service system layer through the GRPC, so that the micro service system performs service processing according to the network service request, and the communication efficiency of the network service is improved.
It should be noted that, in the embodiment of the present invention, when accessing the Gateway architecture layer, in order to enable each micro service system to perform cross-language communication with the Gateway architecture layer through the GRPC, the gold language is selected to perform bottom layer implementation, which is convenient for quickly building services on the existing basis.
Compared with the prior art that the system execution speed is low due to the explanatory characteristic of a PHP language, only serial system execution is supported, and thread operation cannot be supported, the method and the system for optimizing the network service determine the micro service system corresponding to the network service request by parallel organization logic in Gateway after the network service request is accessed through a preset Module interface, realize the parallel processing of multiple network service requests, improve the pressure resistance, reduce the load loss, and further improve the efficiency of the network service.
An embodiment of the present invention provides another method for optimizing a network service, as shown in fig. 2, where the method includes:
201. configuring a network topology structure containing at least one service node according to service information corresponding to different micro service systems, and generating a configuration file according to a logical relationship between the network topology structure and the service node and a corresponding relationship between the network topology structure and a character string URI interface used for identifying an Internet resource name by the network service request.
For the embodiment of the invention, in order to improve the service response speed to the maximum extent, network Topology structures are configured according to service information corresponding to different microservice systems, wherein one network Topology structure Topology comprises at least 1 service node Botl, if a plurality of botls exist, the network Topology structure can be configured as the network structure shown in fig. 3, the botls under different serial paths can be divided into the same level, and the botls in the same level can run in parallel. And, between each boll in the Topology, there is a Context structure for storing input data and output data of each boll, and after a service information finishes operating according to each boll in the network Topology in the Topology, the Gateway will obtain a final output result from the Context and return the final output result to the client.
In addition, the network Topology and the configuration file are configured in the Gateway architecture layer in a storm-like form, and the reuse of the boll is realized through the two hierarchies of Topology and boll of the storm-like form, and the service organization is directly and flexibly implemented through configuration, that is, the logical relationship between the Topology and the boll and the corresponding relationship of whether the Topology performs service processing access to which URL interfaces are written into the configuration file conf, wherein the logical relationship is the hierarchical relationship and the connection relationship between the boll in the Topology, and the accessed corresponding relationship is the hierarchical relationship and the connection relationship between the boll in the Topology, and after a network service request comes, which Topology performs service processing can be determined according to the URL.
It should be noted that different service information is processed by different micro service systems, for example, a video service needs to be processed by a corresponding video micro service system, and a music service needs to be processed by a corresponding music micro service system, so that the processing efficiency of the service information will be improved, and the embodiment of the present invention is not particularly limited.
Further, after step 201, the embodiment of the present invention further includes: performing service registration through a logical relationship between service nodes in the network topology structure; and after the registration is successful, establishing network service request connection through a preset Module interface so as to access the network service request through the preset Module interface when receiving the network service request.
For the embodiment of the present invention, in order to match different service nodes with different service information and ensure the security of service processing, service registration needs to be performed on the logical relationship between the service nodes, so that the network service request can be directly accessed after the registration is successful. As shown in fig. 4, each service Botl in the service implementation layer and the service Module Topology composed of each Botl enable the Gateway framework layer to implement Topology management in a registration manner, and establish a connection relationship with the Module interface. Further, as shown in fig. 5, the specific step of constructing the service bot to run the service may be to construct the service bot by filling in a service code and implementing a framework interface, then configure the network Topology according to the number and sequence of the service bot, perform registration, after the registration is completed, construct a service Module interface, implement access of a framework Module, reassembly registration of the service bot, and construct a service Context through the Module interface, and then register the service in a Gateway framework layer, so as to directly run a registered service after accessing a network service request, where a registration process in the Gateway framework layer is as shown in the left part in fig. 5, and details are not repeated in the embodiments of the present invention.
202. When a network service request is received through the reverse proxy server, the network service request is accessed through a preset Module interface.
This step is the same as step 101 shown in fig. 1, and is not described herein again.
203. And searching a matched network topological structure according to the URL interface analyzed in the network service request, executing corresponding services according to service nodes in the network topological structure by using service information carried in the network service request, and determining a micro-service system corresponding to the network service request.
For the embodiment of the present invention, according to the logical relationship between Topology and Botl and the corresponding relationship between Topology and the URI interface of the web service request recorded in the configuration file conf in step 201, a URL interface can be parsed through the web service request, and can be generally parsed through an HTTP engine, and then corresponding Topology is matched from a plurality of topologies in conf, and the service information is used as an input of Botl, and the Botl of each hierarchy is operated to obtain an output, so as to determine the micro service system of the service to be processed. In addition, because the Topology is organized according to conf provided by the service party, the Botl and the Topology of different services are not the same, and the embodiment of the present invention is not limited specifically.
204. And establishing a communication connection between the network service request and the micro service system.
This step is the same as step 103 shown in fig. 1, and is not described herein again.
It should be noted that the microservice system is located at the microservice layer, and compatibility between different languages can be realized through Golang with high performance, so that reuse can be performed in different services. In order to expand the application range of the service, multiple functions are applied by configuring components of Golang language, such as database access, log output and the like.
205 storing the data processed by the micro service system according to different network service requests into storage locations with different storage spaces and/or storage types according to different service information.
For the embodiment of the present invention, in order to support data for the microservice system and extract valid data in time, after the microservice system processes the network service request, the processed data is stored in a specific storage location, and since the size and whether caching is required for the data processed by different microservice systems are different, the data can be stored in a mogo, a redis, a mysql, and a qbus according to service characteristics, which is not specifically limited in the embodiment of the present invention.
Further, the embodiment of the present invention further includes: receiving a network topology restructuring request; and according to the number information of the service nodes carried in the reorganization request and the sequence information, reorganizing the logical relationship and the corresponding relationship in the configuration file, and updating the network topology structure in the architecture layer according to the reorganized configuration file.
For the embodiment of the invention, because the Topology and the boll are composed of storm-like objects, when the service requirement is changed, the logical relationship and the corresponding relationship in the configuration file can be directly changed, namely the series connection and the hierarchical relationship between the bolls in the Topology are constructed again, so that a brand-new Topology is obtained, and the flexible realization after the service requirement is changed is realized without independently constructing the boll. After the service requirement is changed, developers send a restructuring request to the Gateway architecture layer in order to adjust the service processing range of the current network service, wherein the restructuring request carries the number information of Botl in the Topology corresponding to the new service, sequence information formed by series connection and hierarchy, and the like, so as to change the logical relationship and the corresponding relationship in the configuration file conf, and then restructure and update the Topology to be updated according to the configuration file conf, thereby avoiding modifying codes. In addition, the service requirement change refers to increasing or decreasing the micro service systems in the micro service system layer that need to perform service processing, for example, the micro service system layer only includes music services, and when the service requirement is a video service, the corresponding video micro service system needs to be increased and the existing boll is used for recombination, which is not specifically limited in the embodiment of the present invention.
It should be noted that, as shown in fig. 6, the Gateway architecture layer includes FastHttp, conf, Topology, boll, and GRPC, and by using the Gateway, the business party can concentrate on the business development without paying attention to the details of http communication, so as to speed up the processing speed of the network service, and communicate with the micro-service system such as the template service, the music service, the video service, and the cloud control service through the GRPC, so as to improve the overall performance of the network service access engine. In addition, after the data is stored in the storage location, the data may be written into the distributed system HDFS or the data warehouse HIVE according to the service requirement of the user, which is not specifically limited in the embodiment of the present invention.
The invention provides another optimization method of network service, the embodiment of the invention determines which Topology Botl in the Topology needs to execute service according to the service information in the network service request by configuring the Topology Topology comprising at least one service node Botl in the Gateway layer, thereby really realizing the micro-service system to be communicated, realizing flexible expansion by utilizing Golang language, recombining the number and the sequence of the Botl in the Topology with high performance, realizing the flexibility and the diversification of the network service, avoiding the resource waste caused by revising codes, improving the pressure resistance, reducing the load loss and improving the efficiency of the network service.
Further, as an implementation of the method shown in fig. 1, an embodiment of the present invention provides an apparatus for optimizing a network service, and as shown in fig. 7, the apparatus includes: access unit 31, matching unit 32, connection unit 33.
The access unit 31 is configured to access a network service request through a preset Module interface when the network service request is received through the reverse proxy server; the access unit 31 executes a program Module for accessing the network service request through a preset Module interface when the network service request is received through the reverse proxy server for the optimization device of the network service.
A matching unit 32, configured to match, by using a Gateway architecture layer with parallel organization service logic, a micro service system corresponding to the service information of the network service request; the matching unit 32 executes a program module of the micro service system corresponding to the service information of the network service request matched by the Gateway architecture layer with the parallel organization service logic for the optimization device of the network service.
A connection unit 33, configured to establish a communication connection between the network service request and the micro service system, so that the micro service system performs service processing according to the network service request. The connection unit 33 executes program modules for establishing a communication connection between the web service request and the microservice system for an optimization device of a web service.
Compared with the prior art that the system execution speed is low due to the explanatory characteristic of a PHP language, only serial system execution is supported, and thread operation cannot be supported, the optimization device of the network service determines the micro service system corresponding to the network service request by parallel organization logic in Gateway after the network service request is accessed through a preset Module interface, realizes the parallel processing of multiple network service requests, improves the pressure resistance, reduces the load loss, and improves the efficiency of the network service.
Further, as an implementation of the method shown in fig. 2, an embodiment of the present invention provides another apparatus for optimizing a network service, as shown in fig. 8, where the apparatus includes: access unit 41, matching unit 42, connection unit 43, configuration unit 44, registration unit 45, establishment unit 46, reception unit 47, reassembly unit 48, and storage unit 49.
An access unit 41, configured to access a network service request through a preset Module interface when the network service request is received through a reverse proxy server;
a matching unit 42, configured to match, by using a Gateway architecture layer with parallel organization service logic, a micro service system corresponding to the service information of the network service request;
a connection unit 43, configured to establish a communication connection between the network service request and the micro service system, so that the micro service system performs service processing according to the network service request.
Further, the apparatus further comprises:
a configuration unit 44, configured to configure a network topology structure including at least one service node according to service information corresponding to different micro service systems, and generate a configuration file according to a logical relationship between the network topology structure and the service node and a corresponding relationship between the network topology structure and a character string URI interface of the network service request, where the character string URI interface is used to identify an internet resource name, where the network topology structure and the configuration file are configured in the Gateway architecture layer in a storm-like manner.
Specifically, the matching unit 42 is specifically configured to search for a matched network topology structure according to a URL interface analyzed in the network service request, execute a corresponding service according to service nodes in the network topology structure using service information carried in the network service request, and determine a micro service system corresponding to the network service request.
Further, the apparatus further comprises:
a registration unit 45, configured to perform service registration through a logical relationship between service nodes in the network topology;
the establishing unit 46 is configured to establish a network service request connection through a preset Module interface after the registration is successful, so as to access the network service request through the preset Module interface when the network service request is received.
Further, the apparatus further comprises:
a receiving unit 47, configured to receive a reconfiguration request of the network topology;
and a restructuring unit 48, configured to restructure the logical relationship and the corresponding relationship in the configuration file according to the number information and the sequence information of the service nodes carried in the restructuring request, and update the network topology existing in the framework layer according to the restructured configuration file.
Further, the apparatus further comprises:
and the storage unit 49 is used for storing the data processed by the micro service system according to different network service requests into storage locations with different storage spaces and/or storage types according to different service information.
The invention provides another optimization device of network service, the embodiment of the invention determines which Topology Botl in the Topology needs to execute service according to the service information in the network service request by configuring the Topology Topology comprising at least one service node Botl in the Gateway layer, thereby really realizing the micro-service system to be communicated, realizing flexible expansion by utilizing Golang language, recombining the number and the sequence of the Botl in the Topology with high performance, realizing the flexibility and the diversification of the network service, avoiding the resource waste caused by revising codes, improving the pressure resistance, reducing the load loss and improving the efficiency of the network service.
According to an embodiment of the present invention, a storage medium is provided, where at least one executable instruction is stored, and the computer executable instruction may perform the method for optimizing a network service in any of the above method embodiments.
Fig. 9 is a schematic structural diagram of a terminal according to an embodiment of the present invention, and the specific embodiment of the present invention does not limit the specific implementation of the terminal.
As shown in fig. 9, the terminal may include: a processor (processor)502, a Communications Interface 504, a memory 506, and a communication bus 508.
Wherein: the processor 502, communication interface 504, and memory 506 communicate with one another via a communication bus 508.
A communication interface 504 for communicating with network elements of other devices, such as clients or other servers.
The processor 502 is configured to execute the program 510, and may specifically perform relevant steps in the foregoing method for optimizing a network service.
In particular, program 510 may include program code that includes computer operating instructions.
The processor 502 may be a central processing unit CPU, or an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement an embodiment of the present invention. The terminal comprises one or more processors, which can be the same type of processor, such as one or more CPUs; or may be different types of processors such as one or more CPUs and one or more ASICs.
And a memory 506 for storing a program 510. The memory 506 may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The program 510 may specifically be used to cause the processor 502 to perform the following operations:
when a network service request is received through a reverse proxy server, accessing the network service request through a preset Module interface;
matching a micro service system corresponding to the service information of the network service request through a Gateway architecture layer with parallel organization service logic;
and establishing communication connection between the network service request and the micro service system so that the micro service system performs service processing according to the network service request.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components of the method and apparatus for optimization of network services according to embodiments of the present invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.

Claims (14)

1. A method for optimizing a network service, comprising:
when a network service request is received through a reverse proxy server, accessing the network service request through a preset Module interface;
matching a micro service system corresponding to the service information of the network service request through a Gateway architecture layer with parallel organization service logic;
establishing communication connection between the network service request and the micro service system so that the micro service system performs service processing according to the network service request;
when a network service request is received through the reverse proxy server, before the network service request is accessed through a preset Module interface, the method further includes:
configuring a network topology structure including at least one service node according to service information corresponding to different micro service systems, and generating a configuration file according to a logical relationship between the network topology structure and the service node and a corresponding relationship between the network topology structure and a character string URI interface of a network service request for identifying Internet resource names, wherein the network topology structure and the configuration file are configured in the Gateway architecture layer.
2. The method of claim 1, wherein the network topology and the configuration file are configured in the Gateway architecture layer in a storm-like manner.
3. The method of claim 2, wherein the matching of the microservice system corresponding to the service information of the network service request by the Gateway architecture layer having a parallel organization service logic comprises:
and searching a matched network topological structure according to the URL interface analyzed in the network service request, executing corresponding services according to service nodes in the network topological structure by using service information carried in the network service request, and determining a micro-service system corresponding to the network service request.
4. The method according to claim 2 or 3, wherein after the network topology structure including at least one service node is configured according to service information corresponding to different micro service systems, and a configuration file is generated according to a logical relationship between the network topology structure and the service node and a corresponding relationship between the network topology structure and a character string URI interface of the network service request for identifying an Internet resource name, the method further comprises:
performing service registration through a logical relationship between service nodes in the network topology structure;
and after the registration is successful, establishing network service request connection through a preset Module interface so as to access the network service request through the preset Module interface when receiving the network service request.
5. The method of claim 4, further comprising:
receiving a network topology restructuring request;
and according to the number information of the service nodes carried in the reorganization request and the sequence information, reorganizing the logical relationship and the corresponding relationship in the configuration file, and updating the network topology structure in the architecture layer according to the reorganized configuration file.
6. The method of claim 5, wherein after establishing the communication connection between the network service request and the microservice system so that the microservice system performs service processing according to the network service request, the method further comprises:
and storing the data processed by the micro-service system according to different network service requests into storage positions with different storage spaces and/or storage types according to different service information.
7. An apparatus for optimizing a web service, comprising:
the access unit is used for accessing the network service request through a preset Module interface when the network service request is received through the reverse proxy server;
the matching unit is used for matching a micro service system corresponding to the service information of the network service request through a Gateway architecture layer with parallel organization service logic;
the connection unit is used for establishing communication connection between the network service request and the micro service system so that the micro service system performs service processing according to the network service request;
the device further comprises:
the configuration unit is used for configuring a network topology structure comprising at least one service node according to service information corresponding to different micro service systems, and generating a configuration file according to a logical relationship between the network topology structure and the service node and a corresponding relationship between the network topology structure and a character string URI interface of the network service request for identifying Internet resource names, wherein the network topology structure and the configuration file are configured in the Gateway architecture layer.
8. The apparatus of claim 7, wherein the network topology and the configuration file are configured in the Gateway architecture layer in a storm-like manner.
9. The apparatus of claim 8,
the matching unit is specifically configured to search for a matched network topology structure according to a URL interface analyzed in the network service request, execute a corresponding service according to service nodes in the network topology structure using service information carried in the network service request, and determine a micro service system corresponding to the network service request.
10. The apparatus of claim 8 or 9, further comprising:
a registration unit, configured to perform service registration through a logical relationship between service nodes in the network topology;
and the establishing unit is used for establishing network service request connection through a preset Module interface after the registration is successful so as to access the network service request through the preset Module interface when the network service request is received.
11. The apparatus of claim 10, further comprising:
a receiving unit, configured to receive a reassembly request of a network topology;
and the recombination unit is used for recombining the logical relationship and the corresponding relationship in the configuration file according to the number information and the sequence information of the service nodes carried in the recombination request, and updating the network topology structure in the architecture layer according to the recombined configuration file.
12. The apparatus of claim 11, further comprising:
and the storage unit is used for storing the data processed by the micro service system according to different network service requests into storage positions with different storage spaces and/or storage types according to different service information.
13. A storage medium having at least one executable instruction stored therein, the executable instruction causing a processor to perform operations corresponding to the method for optimizing a network service according to any one of claims 1 to 6.
14. A terminal, comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction causes the processor to execute the operation corresponding to the optimization method of the network service according to any one of claims 1-6.
CN201810070097.1A 2018-01-24 2018-01-24 Network service optimization method and device Expired - Fee Related CN108365976B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810070097.1A CN108365976B (en) 2018-01-24 2018-01-24 Network service optimization method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810070097.1A CN108365976B (en) 2018-01-24 2018-01-24 Network service optimization method and device

Publications (2)

Publication Number Publication Date
CN108365976A CN108365976A (en) 2018-08-03
CN108365976B true CN108365976B (en) 2021-06-25

Family

ID=63006783

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810070097.1A Expired - Fee Related CN108365976B (en) 2018-01-24 2018-01-24 Network service optimization method and device

Country Status (1)

Country Link
CN (1) CN108365976B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110322333A (en) * 2019-07-10 2019-10-11 北京元链科技有限公司 One kind being based on block chain clearance of goods taxation systems
US11411884B2 (en) * 2019-11-13 2022-08-09 Amdocs Development Limited Multiple network controller system, method, and computer program for providing enhanced network service
CN114205419B (en) * 2021-12-14 2023-04-18 上海交通大学 Data center request scheduling system and method oriented to micro-service multi-dimensional disturbance characteristics

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104683321A (en) * 2013-12-02 2015-06-03 财团法人资讯工业策进会 Network service system and network service utilizing method thereof
CN105335330A (en) * 2015-12-09 2016-02-17 浪潮电子信息产业股份有限公司 Micro server cluster system based on master-slave architecture
CN106789339A (en) * 2017-01-19 2017-05-31 北京仿真中心 A kind of distributed cloud emulation mode and system based on lightweight virtualization architecture

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9088440B2 (en) * 2012-05-21 2015-07-21 Alcatel Lucent Telecom information for web services that are provided by a telecom network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104683321A (en) * 2013-12-02 2015-06-03 财团法人资讯工业策进会 Network service system and network service utilizing method thereof
CN105335330A (en) * 2015-12-09 2016-02-17 浪潮电子信息产业股份有限公司 Micro server cluster system based on master-slave architecture
CN106789339A (en) * 2017-01-19 2017-05-31 北京仿真中心 A kind of distributed cloud emulation mode and system based on lightweight virtualization architecture

Also Published As

Publication number Publication date
CN108365976A (en) 2018-08-03

Similar Documents

Publication Publication Date Title
CN107590001B (en) Load balancing method and device, storage medium and electronic equipment
US9672140B1 (en) Processing special requests at dedicated application containers
CN100545851C (en) The remote system administration of utility command row environment
WO2021073202A1 (en) Intelligent contract processing method, computer device and storage medium
US20150007199A1 (en) Method and system for extending application programming interfaces
CN105051687B (en) Using dispositions method and equipment
CN108365976B (en) Network service optimization method and device
CN111371679A (en) Method for realizing API gateway based on kubernets and Kong
CN107809383A (en) A kind of map paths method and device based on MVC
CN106713469B (en) Dynamic loading method, device and system for distributed container
CN109213498A (en) A kind of configuration method and server of internet web front-end
CN108804100B (en) Method and device for creating interface element, storage medium and mobile terminal
US8903965B2 (en) Method and apparatus for re-generating configuration commands of a network device using an object-based approach
US20220045948A1 (en) Path creation method and device for network on chip and electronic apparatus
CN111818194A (en) Domain name based access system and method
CN104794095B (en) Distributed Calculation processing method and processing device
CN109561165A (en) Domain name system configuration method and relevant apparatus
CN114090388A (en) Information acquisition method, server cluster, server and equipment
CN113630479A (en) Domain name resolution method and related product
US11552868B1 (en) Collect and forward
CN105955790B (en) Data processing method and device
CN114489954A (en) Tenant creation method based on virtualization platform, tenant access method and equipment
CN113900810A (en) Distributed graph processing method, system and storage medium
JP2017538237A (en) Method, apparatus, and system for displaying virtual machine names
CN112905332A (en) Method for realizing English PDF online rapid translation based on LVS load balancing Django architecture

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20210625

CF01 Termination of patent right due to non-payment of annual fee