CN114363418A - Method and device for accessing intranet database, storage medium and electronic equipment - Google Patents

Method and device for accessing intranet database, storage medium and electronic equipment Download PDF

Info

Publication number
CN114363418A
CN114363418A CN202210016473.5A CN202210016473A CN114363418A CN 114363418 A CN114363418 A CN 114363418A CN 202210016473 A CN202210016473 A CN 202210016473A CN 114363418 A CN114363418 A CN 114363418A
Authority
CN
China
Prior art keywords
port
intranet
client
database
access 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.)
Pending
Application number
CN202210016473.5A
Other languages
Chinese (zh)
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 Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network 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 Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202210016473.5A priority Critical patent/CN114363418A/en
Publication of CN114363418A publication Critical patent/CN114363418A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a method and a device for accessing an intranet database, a storage medium and electronic equipment. The method comprises the following steps: receiving an access request for accessing an intranet database sent by a client; under the condition that a port used by a client for sending an access request is an intranet port, forwarding the access request to a first port of an intranet database so that the client accesses the intranet database through the first port, wherein the intranet port is monitored by the first port; and under the condition that the port used by the client for sending the access request is the external network port, forwarding the access request to a second port of the internal network database so that the client accesses the internal network database through the second port, wherein the second port monitors the external network port. The invention solves the technical problem that the intranet and the extranet are inconvenient to access the intranet database.

Description

Method and device for accessing intranet database, storage medium and electronic equipment
Technical Field
The invention relates to the field of computers, in particular to a method and a device for accessing an intranet database, a storage medium and electronic equipment.
Background
In the prior art, when a user accesses an intranet database, the user may need to flexibly access the intranet database in an intranet environment and an extranet environment due to different office environments.
However, in the prior art, when accessing the intranet database, if a user is to be supported to flexibly access the database in the intranet and the extranet, the user is required to perform a complicated operation, which causes inconvenience in accessing the intranet database by the intranet and the extranet.
Disclosure of Invention
The embodiment of the invention provides a method, a device, a storage medium and electronic equipment for accessing an intranet database, which at least solve the technical problem that the intranet and the intranet are inconvenient to access the intranet database.
According to an aspect of an embodiment of the present invention, there is provided a method for accessing an intranet database, including: receiving an access request for accessing the intranet database sent by a client; if the port used by the client to send the access request is an intranet port, forwarding the access request to a first port of the intranet database so that the client accesses the intranet database through the first port, wherein the first port monitors the intranet port; and if the port used by the client for sending the access request is an external network port, forwarding the access request to a second port of the intranet database so that the client accesses the intranet database through the second port, wherein the second port monitors the external network port.
According to another aspect of the embodiments of the present invention, there is provided an apparatus for accessing an intranet database, including: a first receiving module, configured to receive an access request sent by a client to access the intranet database; a first forwarding module, configured to forward the access request to a first port of the intranet database so that the client accesses the intranet database through the first port if a port used by the client to send the access request is an intranet port, where the first port monitors the intranet port; a second forwarding module, configured to forward the access request to a second port of the intranet database so that the client accesses the intranet database through the second port when a port used by the client to send the access request is an extranet port, where the second port monitors the extranet port.
As an optional example, the apparatus further includes: a second receiving module, configured to receive a first configuration instruction of the client, where the first configuration instruction includes an intranet port number of the intranet port configured by the client, and the intranet port is a port used by the client to access the intranet database in an intranet environment; and the first monitoring module is used for monitoring the intranet port number by using the first port.
As an optional example, the apparatus further includes: a third receiving module, configured to receive a second configuration instruction of the client, where the second configuration instruction includes an extranet port number of the extranet port configured by the client, and the extranet port is a port used by the client to access the intranet database in an extranet environment; and the second monitoring module is used for monitoring the port number of the external network by using the second port.
As an optional example, the apparatus further includes: a first switching module for switching the client to access the intranet database using the first port to the client to access the intranet database using the second port when the port used by the access request transmitted by the client is an intranet port, the access request being transmitted to the first port of the intranet database, and then the access request being retransmitted by the client is received, and the port used by the retransmitted access request is an extranet port; or a second switching module for switching the client to access the intranet database using the second port to the client to access the intranet database using the first port when the port used by the access request transmitted by the client is an extranet port, after the access request is transferred to the second port of the intranet database, and when the access request retransmitted by the client is received and the port used by the retransmitted access request is an intranet port.
As an optional example, the apparatus further includes: a first obtaining module, configured to obtain a client identifier of the client; the comparison module is used for comparing the client mark with client marks in a white list; a processing module, configured to respond to a first configuration instruction or a second configuration instruction of the client when the white list includes the client identifier, and prohibit responding to the first configuration instruction or the second configuration instruction of the client when the white list does not include the client identifier.
As an optional example, the apparatus further includes: the second acquisition module is used for acquiring the white list from the configuration account; and the adjusting module is used for adjusting the white list according to the adjusting instruction under the condition of receiving the adjusting instruction of the configuration account number to the white list.
As an optional example, the apparatus further includes: an access module, configured to, when the white list does not include the client flag, prohibit a response to the first configuration instruction or the second configuration instruction of the client, and enable the client to access the intranet database using a default port.
According to still another aspect of the embodiments of the present invention, there is also provided a storage medium having a computer program stored therein, wherein the computer program is executed by a processor to perform the above method for accessing an intranet database.
According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including a memory and a processor, where the memory stores a computer program, and the processor is configured to execute the method for accessing a intranet database through the computer program.
In the embodiment of the invention, an access request for accessing the intranet database sent by a receiving client is adopted; if the port used by the client to send the access request is an intranet port, forwarding the access request to a first port of the intranet database so that the client accesses the intranet database through the first port, wherein the first port monitors the intranet port; in the method, if the user uses the intranet port to access the database, the access request is forwarded to the first port of the intranet database, and if the user uses the intranet port to access the database, the access request is forwarded to the second port of the intranet database, so that the purpose of flexibly accessing the intranet database by the intranet and the extranet is achieved, and the technical inconvenience of accessing the intranet database by the intranet and the extranet is further solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a flow diagram of an alternative method of accessing an intranet database according to an embodiment of the invention;
FIG. 2 is a schematic diagram of an intranet port configuration of an alternative method for accessing an intranet database according to an embodiment of the invention;
FIG. 3 is a schematic diagram of a configured extranet port of an alternative method of accessing an intranet database according to an embodiment of the invention;
FIG. 4 is a flow chart of a client accessing a database of an alternative method of accessing an intranet database according to an embodiment of the invention;
FIG. 5 is a schematic diagram of an alternative apparatus for accessing an intranet database according to an embodiment of the invention;
FIG. 6 is a schematic diagram of an alternative electronic device according to an embodiment of the invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, 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. 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 the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to a first aspect of the embodiments of the present invention, there is provided a method for accessing an intranet database, optionally as shown in fig. 1, the method including:
s102, receiving an access request for accessing an intranet database sent by a client;
s104, under the condition that a port used by the client for sending the access request is an intranet port, forwarding the access request to a first port of an intranet database so that the client accesses the intranet database through the first port, wherein the intranet port is monitored by the first port;
s106, under the condition that the port used by the client for sending the access request is the external network port, the access request is forwarded to the second port of the internal network database so that the client can access the internal network database through the second port, wherein the second port monitors the external network port.
Optionally, in this embodiment, the user may access the intranet database through an intranet or access the intranet database through an extranet through different configured interfaces. If the user wants the intranet to access the database, the user can configure an intranet port through which the intranet database is accessed. If the user desires an extranet access to the database, the user may configure an extranet port through which to access the intranet database. The internal network port and the external network port can be used for multiple times after being configured. The user does not need to manually switch, only needs to send an access request for accessing the intranet database, and then the access request uses different ports according to different network environments, such as an intranet or an extranet. If the user is in an intranet environment, the intranet port is used, and if the user is in an extranet environment, the extranet port is used, so that the intranet database is accessed.
Through the embodiment, by the method, in the process of accessing the intranet database, if the user uses the intranet port to access the database, the access request is forwarded to the first port of the intranet database, and if the user uses the extranet port to access the database, the access request is forwarded to the second port of the intranet database, so that the aim of flexibly accessing the intranet database by the intranet and the extranet is fulfilled.
As an optional example, the method further includes:
receiving a first configuration instruction of a client, wherein the first configuration instruction comprises an intranet port number of an intranet port configured by the client, and the intranet port is a port used by the client for accessing an intranet database in an intranet environment;
and monitoring the port number of the internal network by using the first port.
As an optional example, the method further includes:
receiving a second configuration instruction of the client, wherein the second configuration instruction comprises an external network port number of an external network port configured by the client, and the external network port is a port used by the client for accessing an internal network database in an external network environment;
and using the second port to monitor the port number of the external network.
Optionally, in this embodiment, a user may flexibly configure the intranet port and the extranet port. The intranet port is a port used by a user for accessing an intranet database in an intranet environment, and the extranet port is a port used by the user for accessing the intranet database in an extranet environment. A user may configure the intranet port and the extranet port through a console. For example, the user inputs the port number of the intranet port or the extranet port in a specific input box of the console, thereby configuring the intranet port or the extranet port.
As an optional example, the method further includes:
under the condition that a port used by an access request sent by a client is an intranet port, after the access request is forwarded to a first port of an intranet database, the access request sent again by the client is received, and under the condition that the port used by the access request sent again is an extranet port, the access of the client to the intranet database by using the first port is switched to the access of the client to the intranet database by using a second port; or
And when the port used by the access request sent by the client is an external network port, after the access request is forwarded to the second port of the internal network database, and the access request sent again by the client is received, and when the port used by the access request sent again is an internal network port, the access of the internal network database by the client by using the second port is switched to the access of the internal network database by the client by using the first port.
Optionally, in this embodiment, the network environment where the user is located may change at any time. For example, when the user's network environment is in an intranet environment, the user accesses the intranet database through a preconfigured intranet port. And if the network environment is switched from the intranet environment to the extranet environment, the user accesses the intranet database through the extranet port.
As an optional example, the method further includes:
acquiring a client mark of a client;
comparing the client mark with the client marks in the white list;
responding to a first configuration instruction or a second configuration instruction of the client under the condition that the white list comprises a client mark;
and in the case that the client mark is not included in the white list, forbidding responding to the first configuration instruction or the second configuration instruction of the client.
Optionally, in this embodiment, when the user configures the intranet port or the extranet port, whether the user has the configured authority may be checked. In this embodiment, the client flag of the client with the configuration permission may be placed in a white list, and then, if the client requests to configure the intranet port or the extranet port, whether the client flag of the client is in the white list is checked, so as to check whether the user has the permission to configure the intranet port and the extranet port.
As an optional example, the method further includes:
acquiring a white list from a configuration account;
and under the condition that an adjusting instruction of the white list by the configuration account is received, adjusting the white list according to the adjusting instruction.
Optionally, in this embodiment, whether the client has the authority to configure the intranet port and the extranet port may be configured by configuring an account. Through the configuration of the configuration account, which clients have the configuration authority and which clients do not have the configuration authority can be configured.
As an optional example, the method further includes:
and in the case that the client mark is not included in the white list, the client uses the default port to access the intranet database under the condition that the first configuration instruction or the second configuration instruction of the response client is forbidden.
Optionally, in this embodiment, if a certain client is not allowed to configure the intranet port or the extranet port, the client accesses the intranet database by using a default intranet port or extranet port.
In this embodiment, the intranet database may be redis. Redis is a memory cache database. The intranet in this embodiment may be VPC, and VPC is a Private network (VPC for short). Fig. 2 and 3 are schematic diagrams illustrating a user configuring an intranet port and an extranet port, respectively. And if the user configures the intranet port, the user accesses the intranet database by using the intranet port in the intranet environment. And when the user configures the external network port, the user accesses the internal network database by using the external network port in the external network environment. As shown in fig. 4, when the client transmits an access request, whether the client is an intranet environment or an extranet environment is determined according to an access port of the access request. And if the environment is an intranet environment, forwarding the access request to an intranet port of an intranet database. If it is an extranet environment, the access request is forwarded to the extranet port of the intranet database.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
According to another aspect of the embodiments of the present application, there is also provided an apparatus for accessing an intranet database, as shown in fig. 5, including:
a first receiving module 502, configured to receive an access request for accessing an intranet database sent by a client;
a first forwarding module 504, configured to forward the access request to a first port of the intranet database when a port used by the client to send the access request is an intranet port, so that the client accesses the intranet database through the first port, where the intranet port is monitored by the first port;
and a second forwarding module 506, configured to forward the access request to a second port of the intranet database so that the client accesses the intranet database through the second port when the port used by the client to send the access request is the extranet port, where the second port monitors the extranet port.
Optionally, in this embodiment, the user may access the intranet database through an intranet or access the intranet database through an extranet through different configured interfaces. If the user wants the intranet to access the database, the user can configure an intranet port through which the intranet database is accessed. If the user desires an extranet access to the database, the user may configure an extranet port through which to access the intranet database. The internal network port and the external network port can be used for multiple times after being configured. The user does not need to manually switch, only needs to send an access request for accessing the intranet database, and then the access request uses different ports according to different network environments, such as an intranet or an extranet. If the user is in an intranet environment, the intranet port is used, and if the user is in an extranet environment, the extranet port is used, so that the intranet database is accessed.
Through the embodiment, by the method, in the process of accessing the intranet database, if the user uses the intranet port to access the database, the access request is forwarded to the first port of the intranet database, and if the user uses the extranet port to access the database, the access request is forwarded to the second port of the intranet database, so that the aim of flexibly accessing the intranet database by the intranet and the extranet is fulfilled.
As an optional example, the apparatus further includes:
the second receiving module is used for receiving a first configuration instruction of the client, wherein the first configuration instruction comprises an intranet port number of an intranet port configured by the client, and the intranet port is a port used by the client for accessing an intranet database in an intranet environment;
and the first monitoring module is used for monitoring the intranet port number by using the first port.
As an optional example, the apparatus further includes:
a third receiving module, configured to receive a second configuration instruction of the client, where the second configuration instruction includes an external network port number of an external network port configured by the client, and the external network port is a port used by the client to access an intranet database in an external network environment;
and the second monitoring module is used for monitoring the port number of the external network by using the second port.
Optionally, in this embodiment, a user may flexibly configure the intranet port and the extranet port. The intranet port is a port used by a user for accessing an intranet database in an intranet environment, and the extranet port is a port used by the user for accessing the intranet database in an extranet environment. A user may configure the intranet port and the extranet port through a console. For example, the user inputs the port number of the intranet port or the extranet port in a specific input box of the console, thereby configuring the intranet port or the extranet port.
As an optional example, the apparatus further includes:
the first switching module is used for switching the client to access the intranet database by using the first port to the client to access the intranet database by using the second port when the port used by the access request sent by the client is the intranet port and the access request sent by the client again is received after the access request is forwarded to the first port of the intranet database and the port used by the access request sent by the client again is the extranet port; or
And the second switching module is used for switching the access of the client to the intranet database by using the second port to the access of the client to the intranet database by using the first port when the port used by the access request sent by the client is the extranet port and the access request sent again by the client is received after the access request is forwarded to the second port of the intranet database and the port used by the access request sent again is the intranet port.
Optionally, in this embodiment, the network environment where the user is located may change at any time. For example, when the user's network environment is in an intranet environment, the user accesses the intranet database through a preconfigured intranet port. And if the network environment is switched from the intranet environment to the extranet environment, the user accesses the intranet database through the extranet port.
As an optional example, the apparatus further includes:
the first acquisition module is used for acquiring a client mark of a client;
the comparison module is used for comparing the client mark with the client marks in the white list;
and the processing module is used for responding to the first configuration instruction or the second configuration instruction of the client under the condition that the white list comprises the client mark, and forbidding responding to the first configuration instruction or the second configuration instruction of the client under the condition that the white list does not comprise the client mark.
Optionally, in this embodiment, when the user configures the intranet port or the extranet port, whether the user has the configured authority may be checked. In this embodiment, the client flag of the client with the configuration permission may be placed in a white list, and then, if the client requests to configure the intranet port or the extranet port, whether the client flag of the client is in the white list is checked, so as to check whether the user has the permission to configure the intranet port and the extranet port.
As an optional example, the apparatus further includes:
the second acquisition module is used for acquiring a white list from the configuration account;
and the adjusting module is used for adjusting the white list according to the adjusting instruction under the condition that the adjusting instruction of the configuration account number to the white list is received.
Optionally, in this embodiment, whether the client has the authority to configure the intranet port and the extranet port may be configured by configuring an account. Through the configuration of the configuration account, which clients have the configuration authority and which clients do not have the configuration authority can be configured.
As an optional example, the apparatus further includes:
and the access module is used for accessing the intranet database by the client through a default port under the condition that the white list does not include the client mark and the first configuration instruction or the second configuration instruction of the client is forbidden to respond.
Optionally, in this embodiment, if a certain client is not allowed to configure the intranet port or the extranet port, the client accesses the intranet database by using a default intranet port or extranet port.
For other examples of this embodiment, please refer to the above examples, which are not described herein.
Fig. 6 is a block diagram of an alternative electronic device according to an embodiment of the present invention, as shown in fig. 6, including a processor 602, a communication interface 604, a memory 606, and a communication bus 608, where the processor 602, the communication interface 604, and the memory 606 communicate with each other through the communication bus 608, where,
a memory 606 for storing computer programs;
the processor 602, when executing the computer program stored in the memory 606, implements the following steps:
receiving an access request for accessing an intranet database sent by a client;
under the condition that a port used by a client for sending an access request is an intranet port, forwarding the access request to a first port of an intranet database so that the client accesses the intranet database through the first port, wherein the intranet port is monitored by the first port;
and under the condition that the port used by the client for sending the access request is the external network port, forwarding the access request to a second port of the internal network database so that the client accesses the internal network database through the second port, wherein the second port monitors the external network port.
Alternatively, in this embodiment, the communication bus may be a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 6, but this is not intended to represent only one bus or type of bus. The communication interface is used for communication between the electronic equipment and other equipment.
The memory may include RAM, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory. Alternatively, the memory may be at least one memory device located remotely from the processor.
As an example, the memory 606 may include, but is not limited to, the first receiving module 502, the first forwarding module 504, and the second forwarding module 506 in the processing device of the request. In addition, the module may further include, but is not limited to, other module units in the processing apparatus of the request, which is not described in this example again.
The processor may be a general-purpose processor, and may include but is not limited to: a CPU (Central Processing Unit), an NP (Network Processor), and the like; but also a DSP (Digital Signal Processing), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment is not described herein again.
It can be understood by those skilled in the art that the structure shown in fig. 6 is only an illustration, and the device implementing the processing method of the request may be a terminal device, and the terminal device may be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, a Mobile Internet Device (MID), a PAD, and the like. Fig. 6 is a diagram illustrating a structure of the electronic device. For example, the electronic device may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in FIG. 6, or have a different configuration than shown in FIG. 6.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disk, ROM, RAM, magnetic or optical disk, and the like.
According to yet another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium having a computer program stored therein, wherein the computer program is executed by a processor to perform the steps of the above method for accessing an intranet database.
Alternatively, in this embodiment, a person skilled in the art may understand that all or part of the steps in the methods of the foregoing embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above 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 several instructions for causing one or more computer devices (which may be personal computers, servers, network devices, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (10)

1. A method of accessing an intranet database, comprising:
receiving an access request for accessing the intranet database sent by a client;
under the condition that a port used by the client for sending the access request is an intranet port, forwarding the access request to a first port of the intranet database so that the client accesses the intranet database through the first port, wherein the intranet port is monitored by the first port;
and if the port used by the client for sending the access request is an external network port, forwarding the access request to a second port of the intranet database so that the client accesses the intranet database through the second port, wherein the second port monitors the external network port.
2. The method of claim 1, further comprising:
receiving a first configuration instruction of the client, wherein the first configuration instruction includes an intranet port number of the intranet port configured by the client, and the intranet port is a port used by the client to access the intranet database in an intranet environment;
and monitoring the intranet port number by using the first port.
3. The method of claim 1, further comprising:
receiving a second configuration instruction of the client, wherein the second configuration instruction comprises an external network port number of the external network port configured by the client, and the external network port is a port used by the client for accessing the intranet database in an external network environment;
and using the second port to monitor the port number of the external network.
4. The method of claim 1, further comprising:
when the port used by the access request sent by the client is an intranet port, after the access request is forwarded to a first port of the intranet database, when the access request sent by the client again is received and the port used by the access request sent again is an extranet port, switching the access of the intranet database by the client by using the first port to the access of the intranet database by using the second port; or
And when the port used by the access request sent by the client is an extranet port, after the access request is forwarded to a second port of the intranet database, and when the access request sent again by the client is received and the port used by the access request sent again is an intranet port, switching the access of the intranet database by the client by using the second port to the access of the intranet database by using the first port.
5. A method according to claim 2 or 3, characterized in that the method further comprises:
acquiring a client mark of the client;
comparing the client mark with client marks in a white list;
responding to a first configuration instruction or a second configuration instruction of the client under the condition that the white list comprises the client mark;
and forbidding responding to the first configuration instruction or the second configuration instruction of the client under the condition that the client mark is not included in the white list.
6. The method of claim 5, further comprising:
acquiring the white list from a configuration account;
and under the condition that an adjusting instruction of the white list by the configuration account is received, adjusting the white list according to the adjusting instruction.
7. The method of claim 5, further comprising:
in the event that the client flag is not included in the whitelist, the client uses a default port to access the intranet database in the event that the first configuration instruction or the second configuration instruction in response to the client is prohibited.
8. An apparatus for accessing an intranet database, comprising:
the first receiving module is used for receiving an access request sent by a client for accessing the intranet database;
a first forwarding module, configured to forward, when a port used by the client to send the access request is an intranet port, the access request to a first port of the intranet database, so that the client accesses the intranet database through the first port, where the intranet port is monitored by the first port;
and the second forwarding module is used for forwarding the access request to a second port of the intranet database so that the client accesses the intranet database through the second port when the port used by the client for sending the access request is an extranet port, wherein the second port monitors the extranet port.
9. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, carries out the method of any one of claims 1 to 7.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 7 by means of the computer program.
CN202210016473.5A 2022-01-07 2022-01-07 Method and device for accessing intranet database, storage medium and electronic equipment Pending CN114363418A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210016473.5A CN114363418A (en) 2022-01-07 2022-01-07 Method and device for accessing intranet database, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210016473.5A CN114363418A (en) 2022-01-07 2022-01-07 Method and device for accessing intranet database, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN114363418A true CN114363418A (en) 2022-04-15

Family

ID=81106831

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210016473.5A Pending CN114363418A (en) 2022-01-07 2022-01-07 Method and device for accessing intranet database, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN114363418A (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103200281A (en) * 2013-01-24 2013-07-10 中国联合网络通信集团有限公司 Method, device and system for accessing intranet server
WO2017185925A1 (en) * 2016-04-28 2017-11-02 深圳市先河系统技术有限公司 Method of accessing website, client, and local area network server
US20180212788A1 (en) * 2017-01-26 2018-07-26 International Business Machines Corporation Multicast helper to link virtual extensible lans
CN108924165A (en) * 2018-08-24 2018-11-30 北京和利时工业软件有限公司 A kind of Intranet remote access method and its device and Intranet gateway
CN111107119A (en) * 2018-10-29 2020-05-05 杭州海康威视系统技术有限公司 Data access method, device and system based on cloud storage system and storage medium
CN112787997A (en) * 2020-12-26 2021-05-11 广州保仕盾智能科技有限公司 Method for realizing intranet IP communication based on gateway serving as server side
CN113098990A (en) * 2021-03-12 2021-07-09 北京北信源软件股份有限公司 Server system, client and communication method for communication
WO2021219104A1 (en) * 2020-04-30 2021-11-04 华为技术有限公司 Hybrid cloud system, gatekeeper, network access method and storage medium
CN113709162A (en) * 2021-08-30 2021-11-26 康键信息技术(深圳)有限公司 Method, device and equipment for acquiring intranet data and storage medium
CN113794788A (en) * 2021-09-14 2021-12-14 北京百度网讯科技有限公司 Gateway diversion method, system, device, equipment, storage medium and product

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103200281A (en) * 2013-01-24 2013-07-10 中国联合网络通信集团有限公司 Method, device and system for accessing intranet server
WO2017185925A1 (en) * 2016-04-28 2017-11-02 深圳市先河系统技术有限公司 Method of accessing website, client, and local area network server
US20180212788A1 (en) * 2017-01-26 2018-07-26 International Business Machines Corporation Multicast helper to link virtual extensible lans
CN108924165A (en) * 2018-08-24 2018-11-30 北京和利时工业软件有限公司 A kind of Intranet remote access method and its device and Intranet gateway
CN111107119A (en) * 2018-10-29 2020-05-05 杭州海康威视系统技术有限公司 Data access method, device and system based on cloud storage system and storage medium
WO2021219104A1 (en) * 2020-04-30 2021-11-04 华为技术有限公司 Hybrid cloud system, gatekeeper, network access method and storage medium
CN112787997A (en) * 2020-12-26 2021-05-11 广州保仕盾智能科技有限公司 Method for realizing intranet IP communication based on gateway serving as server side
CN113098990A (en) * 2021-03-12 2021-07-09 北京北信源软件股份有限公司 Server system, client and communication method for communication
CN113709162A (en) * 2021-08-30 2021-11-26 康键信息技术(深圳)有限公司 Method, device and equipment for acquiring intranet data and storage medium
CN113794788A (en) * 2021-09-14 2021-12-14 北京百度网讯科技有限公司 Gateway diversion method, system, device, equipment, storage medium and product

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
杨勇;: "端口转发技术实现局域网穿透(上)", 电脑编程技巧与维护, no. 09 *
段峰, 张鑫: "利用代理服务器实现对内网服务器的安全访问", 青岛大学学报(工程技术版), no. 02 *

Similar Documents

Publication Publication Date Title
CN105376107B (en) Terminal testing method and proxy server
JP2019091494A (en) Emulated endpoint configuration
CN112653618B (en) Gateway registration method and device of micro-service application API (application program interface) endpoint
JP6306731B2 (en) Method, apparatus, and system for pushing an application program, and device
US20100205600A1 (en) Simulation method for realizing large batches and different kinds of baseboard management controllers using a single server
CN110688146A (en) Method, device and storage medium for dynamically configuring monitoring system
CN105306527A (en) Data sharing method and device
CN108243266A (en) Canonical name processing method, configuration method and device
CN111130828B (en) Intelligent network distribution method and device and terminal equipment
CN114691390A (en) User mode program processing method and device, storage medium and processor
CN114416508A (en) Application performance monitoring method and device, storage medium and electronic equipment
CN114327710A (en) Function management method, management device, terminal equipment and readable storage medium
CN114363418A (en) Method and device for accessing intranet database, storage medium and electronic equipment
CN110851166A (en) User-unaware application program updating method and device and computer equipment
CN112817493B (en) Content sharing method and device, computer equipment and storage medium
CN108965108A (en) A kind of information push method and relevant device
CN110505110B (en) Network interface test method and device and multi-network-port host
CN114048028A (en) Service calling method and device, storage medium and electronic equipment
CN109756362B (en) Integrated processing method and device for third-party security component
CN113312159A (en) Processing method and device for load balancing of Kubernetes cluster and storage medium
CN111131288A (en) Interface interaction method and device
US10250607B2 (en) Control systems and methods for providing user access to external devices via communications networks
CN111092817A (en) Data transmission method and device
CN116208660B (en) Method, device, system, equipment and medium for dynamically connecting remote desktop with cloud server
CN104396207B (en) The method and apparatus for realizing multi-display access

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