CN111711713A - Data access method, computer device and storage medium - Google Patents

Data access method, computer device and storage medium Download PDF

Info

Publication number
CN111711713A
CN111711713A CN202010511812.8A CN202010511812A CN111711713A CN 111711713 A CN111711713 A CN 111711713A CN 202010511812 A CN202010511812 A CN 202010511812A CN 111711713 A CN111711713 A CN 111711713A
Authority
CN
China
Prior art keywords
address
client
access
access address
environment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010511812.8A
Other languages
Chinese (zh)
Other versions
CN111711713B (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.)
Nanjing Leading Technology Co Ltd
Original Assignee
Nanjing Leading 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 Nanjing Leading Technology Co Ltd filed Critical Nanjing Leading Technology Co Ltd
Priority to CN202010511812.8A priority Critical patent/CN111711713B/en
Publication of CN111711713A publication Critical patent/CN111711713A/en
Application granted granted Critical
Publication of CN111711713B publication Critical patent/CN111711713B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • 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/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Abstract

The embodiment of the invention discloses a data access method, computer equipment and a storage medium. The method comprises the following steps: when a client runs, the client acquires at least one access address sent by an address configuration server through an address acquisition module, wherein the access address is used for the client to access a specified server in a specified environment; the client receives an access request, and inquires a target access address matched with the access request from each access address; and the client accesses the target appointed server pointed by the target access address. The embodiment of the invention can reduce the updating cost of the access address, reduce the updating difficulty of the access address and improve the updating efficiency of the access address.

Description

Data access method, computer device and storage medium
Technical Field
The present invention relates to the field of networks, and in particular, to a data access method, a computer device, and a storage medium.
Background
And the client accesses the server through the access address of the server to acquire the service provided by the server.
Typically, the servers that serve clients of different environments are mostly the same, and are, in part, different. For example, the server that serves the clients of the development environment is different from the server that serves the clients of the production environment, and accordingly, the access address is different.
In fact, each client of different systems or different environments stores a configuration file of access addresses, and the access addresses in the configuration file are mostly the same. In this case, once the access address of the server is changed, each client needs to update the corresponding access address in the configuration file, which results in an increase in the cost of updating the access address. Meanwhile, most of the access addresses in the configuration file are the same, so that the same codes exist in different clients, namely, the codes are redundant. In addition, when the access address is changed, a technical staff is required to know the operation principle of each client, and a technical threshold exists.
Disclosure of Invention
Embodiments of the present invention provide a data access method, a computer device, and a storage medium, which can reduce the update cost of an access address, reduce the update difficulty of the access address, and improve the update efficiency of the access address.
In a first aspect, an embodiment of the present invention provides a data access method, including:
when a client runs, the client acquires at least one access address sent by an address configuration server through an address acquisition module, wherein the access address is used for the client to access a specified server in a specified environment;
the client receives an access request, and inquires a target access address matched with the access request from each access address;
and the client accesses the target appointed server pointed by the target access address.
In a second aspect, an embodiment of the present invention provides a data access method, including:
the address configuration server acquires at least one access address matched with the client;
and the address configuration server feeds back each access address to the client through an address acquisition module, wherein the access address is used for the client to access the specified server in the specified environment.
In a third aspect, an embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored on the memory and operable on the processor, where the processor implements the data access method according to any one of the embodiments of the present invention when executing the computer program.
In a fourth aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the data access method according to any one of the embodiments of the present invention.
The client side acquires the access address through the address acquisition module address configuration server and accesses the designated server based on the access address in the designated environment, so that the problems of high updating cost and high difficulty of the access address caused by the fact that the client side in the designated environment accesses the designated server through the locally stored access address in the prior art are solved.
Drawings
FIG. 1 is a flow chart of a data access method according to a first embodiment of the present invention;
FIG. 2a is a flow chart of a data access method according to a second embodiment of the present invention;
FIG. 2b is a diagram illustrating an application scenario in which the present invention is applied;
fig. 3 is a schematic structural diagram of a data access device in a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a data access device in a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of a computer device in the fifth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a schematic diagram of a flowchart of a data access method in an embodiment of the present invention, where this embodiment is applicable to a case where an address configuration server obtains an access address of a server, and accesses a specified server in a specified environment according to a preselected received access address when receiving an access request, and the method may be executed by a data access apparatus provided in an embodiment of the present invention, where the apparatus may be implemented in a software and/or hardware manner, and may be generally integrated into a computer device, and may specifically be a client of the computer device. As shown in fig. 1, the method of this embodiment specifically includes:
s110, when the client runs, the client obtains at least one access address sent by an address configuration server through an address obtaining module, and the access address is used for the client to access the specified server in the specified environment.
The address acquisition module is used for sending an access address acquisition request to the address configuration server and receiving an access address fed back by the address configuration server.
The address configuration server stores access addresses of different servers in different environments and is used for providing the access addresses of the specified servers in the specified environments for the client. In fact, the address configuration server manages the access addresses in a unified manner. Therefore, when the access address is updated, only the access address stored in the address configuration server needs to be updated, so that the updating cost is reduced, and the updating efficiency is improved. More specifically, the client acquires at least one access address sent by the address configuration module on the address configuration server through the address acquisition module. The address configuration server can be any platform server, and the address configuration module can be an NPM (Node Package Manager), which is actually a Node js Package management and distribution tool. The NPM may rely on a general server implementation.
Specifically, the address obtaining module is configured on the client, and the client obtains the required access address of the server by calling the address obtaining module. The client can access the specified server under the specified environment by accessing the address.
In the prior art, the access addresses of the servers to be accessed associated with the clients are stored locally and written in the source code in an embedded manner. If the server is adjusted, the access address of the server providing the service needs to be updated correspondingly, the access address in the source code in the client needs to be updated correspondingly, and in addition, the context and the dependency relationship associated with the access address also need to be updated, so that the modified code quantity associated with the access address is large, the updating cost of the access address is high, and meanwhile, a technician needs to know the source code logic of the client to accurately modify the source code, so that the client can correctly access the updated server, and the updating difficulty of the access address is large.
Before the client side sends the version, the source code associated with the access address is replaced. Therefore, compared with the existing client, the client according to the embodiment of the present invention is configured with the address obtaining module, and meanwhile, the source code does not have the specific content of the access address, and the context and the dependency of the access address in the source code are both replaced by the context and the dependency of the data obtained from the address obtaining module.
Optionally, the client includes an application program of a personal computer or an application program of a mobile terminal.
The client may be classified into two types of Personal Computers (PCs) and mobile terminals. Generally, servers providing the same kind of service for different types of clients are different, and correspondingly, access addresses corresponding to the servers providing the same kind of service may be completely different or may not be completely the same. For the same type of client under different environments, for example, the same type of client is a platform such as an operation background or an operator platform of a PC, servers providing the same type of service are generally the same, and corresponding access addresses are the same. Thus, the profiles including the access addresses may be the same. Therefore, the address configuration server can use the same configuration file for the same type of client under different environments, and the configuration files are not required to be respectively configured in the same type of client under different environments, so that redundant codes are reduced.
Illustratively, the application program of the mobile terminal comprises a mobile cockpit; the application program of the PC side comprises an enterprise vehicle application.
The data access method provided by the embodiment of the invention can be realized by configuring the PC terminal and the mobile terminal, can be used for obtaining the universal access address in different types of client terminals, improves the universality of the updating method of the access address, is convenient for managing the access address, and reduces the updating difficulty of the access address.
The access address is used for the client to communicate with the specified server and acquire the service provided by the specified server, and particularly, the access address is used for specifying the environment and specifying the server. The specified environment refers to the environment in which the client is located. The designated server is a server that provides a designated service for the client, and actually, the servers that provide the same service for the same client in different environments may be the same or different. Thus, the designated server matches the environment in which the client is located, as well as matches the service to be provided. Illustratively, the access address may refer to an Application Program Interface (API) address.
Optionally, the specific environment includes: a local environment, a development environment, a test environment, a new integrated test environment, a thermal remediation environment, a pre-production environment, or a production environment.
Here, the Local environment may refer to a system environment in which the client itself is located.
The development environment may refer to the environment in which the client is developed and configured.
The test environment may refer to an environment in which the client is tested.
A new integrated test environment may refer to an environment in which clients are tested in combination, which may typically test a system composed of multiple modules simultaneously.
The hot repair environment may be an environment where the client is located when an online abnormality occurs after the client is put into use and is to be repaired.
The pre-production environment is an environment between the test environment and the production environment, and may refer to an environment where the client is tested when being put into use,
the production environment may refer to a system environment in which the client is formally put into use, for example, a system environment when the client is used by a user after the client is released. In practice, a production environment is often referred to as a real environment.
By configuring a plurality of environments and distinguishing, the servers in different environments can be accurately distinguished, and the corresponding relation between the environments and the access addresses of the servers is established, so that the addresses of the designated servers in the designated environments can be accurately acquired, the clients can be guaranteed to accurately access the designated servers, and the stability of the clients is improved.
S120, the client receives the access request, and inquires a target access address matched with the access request from each access address.
The access request is used to instruct the client in the specified environment to access the specified server. In particular, the access request may include input information from the user. Illustratively, the access request includes a request to acquire map data of a set area.
The target access address matches the access request. The target access address is used to point to a specified server to be accessed by the access request. Meanwhile, the designated server is matched with the current environment where the client is located.
The client side obtains a plurality of access addresses in advance, and inquires the matched target access address according to the access request and the environment of the client side so as to access the specified server.
The access address includes a plurality of information. Optionally, the access address includes: the standard prefix information of the access address and the standard prefix information of the uploading interface corresponding to the access address.
The standard prefix information of the access address may refer to a basic prefix, for example, baseUrl, of the access address corresponding to the server that the client needs to access in the current environment.
The standard prefix information of the upload interface corresponding to the access address may refer to a basic prefix of the upload interface corresponding to the access address corresponding to the server that the client is located in and needs to access, for example, uploadUrl.
By splitting the access address and configuring part of specific content of the access address, the access address is convenient to inquire and modify, the updating difficulty of the access address is reduced, and the access address is easy to maintain.
S130, the client accesses the target appointed server pointed by the target access address.
The client sends a service acquisition request to the target specified server through the target access address, and receives response data fed back by the target specified server according to the service acquisition request. More specifically, the target designation server feeds back response data such as text, picture, audio address or video address, and the client generates and displays a page according to the response data so as to enable the user to browse.
Optionally, the requesting, by the address obtaining module, an access address from the address configuration server includes: the client side obtains environment parameters and generates an access address obtaining request, wherein the environment parameters comprise the environment where the client side is located and an operating system of the client side; and the client calls an address acquisition module and sends the access address acquisition request to an address configuration server so as to receive at least one access address fed back by the address configuration server aiming at the environment parameters.
The environment parameter is used to identify the client. Specifically, the environment parameters include the current environment of the client and the operating system of the client. The access address acquisition request is used for requesting an access address from the address configuration server by the client and indicating the address configuration server to feed back the access address.
In general, servers that provide the same service for the same client in different environments are different, and servers that provide the same service for different types of clients are different, for example, databases of the servers are different, and interactive interfaces with the servers are different. Thus, the server needs to distinguish between the environment and the client type, and accordingly, the access address matches the environment and the client type. The type of client may be characterized by the operating system.
The operating system of the client is used to identify the type of the client. The client type may include a personal computer side or a mobile terminal, and in more detail, the operating system includes: windows, Linux, android or IOS systems, etc.
The client side realizes the communication with the address configuration server by calling the address acquisition module.
The address configuration server is specifically configured to query the matched access address according to the environment parameters in the access address acquisition request and feed back the matched access address to the client.
It should be noted that the client may request the full access address, or may request only the access address matching the current environment.
An access address acquisition request is generated through the environment parameters of the client and sent to the address configuration server to acquire the access address provided by the address configuration server and matched with the current environment of the client, so that the server to be accessed is accurately distinguished according to the environment and the operating system, the client can be ensured to correctly access the server to acquire the service, and the stability of the service is improved.
The client side acquires the access address through the address acquisition module address configuration server and accesses the designated server based on the access address in the designated environment, so that the problems of high updating cost and high difficulty of the access address caused by the fact that the client side in the designated environment accesses the designated server through the locally stored access address in the prior art are solved.
Example two
Fig. 2a is a flowchart of a data access method in a second embodiment of the present invention, where this embodiment is applicable to a case where an address configuration server responds to an acquisition request for an access address, and the method may be executed by a data access apparatus provided in this embodiment of the present invention, where the apparatus may be implemented in a software and/or hardware manner, and may be generally integrated in a computer device, and may specifically be in a server. The method of the embodiment specifically includes:
s210, the address configuration server acquires at least one access address matched with the client.
For the contents not described in detail in this embodiment, the description of any of the above embodiments may be referred to.
The access address matched by the client may refer to an access address requested to be obtained by the client. In practice, the client and the server are matched, the server provides the corresponding service for the user through the client, and the server matched with the client is usually configured in advance. The at least one access address matched by the client may refer to an access address corresponding to at least one server providing a service for the client.
The servers serving different clients may differ and, accordingly, the access addresses may differ, and thus, the access addresses matched to different clients may differ.
The address configuration server stores the access address of the server, and if the server is updated, the matched access address of the server can be directly updated in the address configuration server correspondingly, so that the access address of the server can be prevented from being updated in the client, and the cost for managing the access address by the client is reduced.
In a specific example, the access address matched at the PC side (webApi) includes: when the environment of the personal computer is a local environment, the standard prefix information of the access address is http:// A.A.A.A.A.A.A.A.A.A.A.A.A.A.A.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X; when the environment of the personal computer is a development environment, the standard prefix information of the access address is http:// A.A.B.B: B, and the standard prefix information of the uploading interface corresponding to the access address is http:// dev.Y.Y: Y; when the environment of the personal computer is a test environment, the standard prefix information of the access address is http:// A.A.C.C: C, and the standard prefix information of the uploading interface corresponding to the access address is test.Z.Z: Z.
The access addresses of the servers of the same service acquired by the PC terminals under different environments are different.
The access address matched by the mobile terminal (mobilepai) comprises: when the environment of the mobile terminal is a local environment, the standard prefix information of the access address is http:// D.D.D.D.D.D; when the environment of the mobile terminal is a development environment, the standard prefix information of the access address is http:// dev.M.M.M; and when the environment of the mobile terminal is a test environment, the standard prefix information of the access address is http:// test.
The access addresses of the servers of the same service acquired by the mobile terminal under different environments are different.
The access address matched with the vehicle end for the enterprise (webcam panyapi) comprises the following steps: when the environment of the vehicle end of the enterprise is a local environment, the standard prefix information of the access address is http:// E.E.E.E.E.E; when the environment of the vehicle end of the enterprise is a development environment, the standard prefix information of the access address is http:// dev.M.M.M; and when the environment of the vehicle end of the enterprise is the testing environment, the standard prefix information of the access address is http:// test.N.N: N.
The access addresses of the servers of the same service acquired by the vehicle end of the enterprise in different environments are different. The vehicle end of the enterprise is also a PC end, but the enterprise is oriented to.
And S220, the address configuration server feeds back each access address to the client through an address acquisition module, wherein the access address is used for the client to access the specified server in the specified environment.
In fact, the client requests the address configuration server for the access address through the address obtaining module, and accordingly, the address configuration server feeds back the access address to the address obtaining module to realize the feedback to the client.
The access address is used for a client to access a specified server in a specified environment. Since servers that serve the same client in different environments are different, the access address needs to distinguish between the environment and the server.
In a specific example, as shown in fig. 2b, the address configuration server 201 is used to provide an access address for the client 202, and the server node 203 is used to provide a service for the client 202. Specifically, NPM source registration may be performed in any platform, which serves as the address configuration server 201, to form an address configuration module. The client 202 acquires the access address provided by the address configuration server 201 through the address acquisition module. Typically, different clients 202 obtain different access addresses. In addition, the address configuration server 201 is further configured to interact with the server node 203, and obtain an access address corresponding to the server node 203 for unified management. Meanwhile, the address configuration server 201 updates the locally stored access address, for example, acquires the failure report information of the first server node, acquires an access address of an alternative second server node, and updates the locally stored access address of the first server node to the access address of the second server node, so as to update the locally stored access address, so that the client acquires the access address of the second server node, and instructs the client to acquire the server provided by the second server node, thereby improving the update efficiency of the access address.
Optionally, the obtaining, by the address configuration server, at least one access address matched with the client includes: the address configuration server receives an access address acquisition request sent by the client through an address acquisition module; extracting environment parameters from the access address acquisition request, wherein the environment parameters comprise the environment of the client and the operating system of the client; and inquiring at least one access address matched with the environment parameters.
And the address configuration server extracts the environment parameters from the access address acquisition request, wherein the environment parameters are used for identifying the client and determining the access address matched with the client. And inquiring the matched at least one access address according to the environment parameters. In addition, the address configuration server may also determine the access address according to other identification information of the client, and may set the access address according to needs, which is not limited in the embodiments of the present invention.
The address configuration server may use the access address only matched with the access address obtaining request as at least one access address matched with the client, and may also use the full access address as at least one access address matched with the client, which is not limited in the embodiments of the present invention.
The access address matched with the environmental parameters is obtained through the address configuration server, so that the access address required by the client can be accurately determined, and the client can be ensured to accurately access the server.
Optionally, before obtaining at least one access address matching with the client, the method further includes: acquiring access address data of the client sent by an access address collection module; the access address collection module is configured to query access address data in the client, and replace the access address data in the client by using a preset template, so that the client accesses a specified server to which the access address points through the address acquisition module and the replaced data, where the access address data includes at least one of the following items: at least one environment parameter, an access address matched with each environment parameter, a context of each environment parameter and a dependency relationship of each environment parameter.
The access address stored by the address configuration server is acquired by packaging and uploading from the client. The address configuration server stores the access address and the matched environment parameters, and establishes a corresponding relation between the access address and the matched environment parameters so as to feed back the access address according to the environment parameters provided by the client.
Specifically, before the client is released or put into use formally, for example, in a development environment or a test environment, the access address data of the client is collected through an access address collection module configured on the client. The access address collection module is used for inquiring data associated with the access address, such as the access address and the environment parameter, in a file associated with the client. The access address collection module is specifically used for inquiring access address data in the client, packaging and uploading the access address data to the address configuration server, and updating and replacing the access address data stored in the client so as to ensure that the client can normally operate the replaced data.
The access address collection module can screen the access address data, remove redundant data, only reserve the access addresses and the environment parameters matched with the access addresses, and upload the access addresses and the environment parameters to the address configuration server, so that the address configuration server receives at least one access address accessible by the client and the environment parameters matched with the access addresses and stores the access addresses and the environment parameters.
The access address data is actually data stored locally by the client in association with the access address. It should be noted that the actual development of the client and the management of the access address are independent of each other, and meanwhile, the access address in the client is written in a configuration file, which is actually configured by the developer of the client. That is, the operation of the address configuration server for obtaining the access address in the client and the development process of the client are independent from each other, and the access address needs to be extracted from the configuration file of the client and replaced with data fed back from the address configuration server.
In fact, this replacement method is not simple data replacement, specifically, the client stores, in addition to the access address in the configuration file, the environment parameter matched with the access address, the context of the environment parameter, and other interfaces or other data on which the environment parameter depends, and the aforementioned associated data all need to be replaced to ensure that the client operates correctly.
The preset template is used for replacing or updating the access address data in the client. For example, the first access address may be configured as variable a, and all the first access addresses in the client may be replaced with variable a. The client side obtains the access address through the address obtaining module and fills the access address into the replaced data, so that when the client side runs the program corresponding to the replaced data, the client side can accurately access the server based on the obtained access address to obtain the service provided by the server.
The access address data in the client side sent by the access address collection module in the client side is extracted, the access address and the associated environment parameters are extracted and stored, the access address is automatically obtained, so that the access address is subsequently provided for the client side, meanwhile, the access address collection module automatically collects the access address data in the client side, the labor cost for collecting the access address data is reduced, data change of the client side is automatically realized, the adjustment process of the client side is simplified, the difficulty is reduced, the labor cost for data change of the client side is reduced, and the realization cost for unified management of the access address of the client side is reduced.
The address configuration server sends the access address matched with the client to the client through the address acquisition module to indicate the client under the specified environment to access the specified server, and through realizing unified management of the access address, the difficulty and the cost of singly updating the access address by distinguishing the clients in different environments can be reduced, the updating operation of the access address is simplified, and the updating efficiency of the access address is improved.
EXAMPLE III
Fig. 3 is a schematic diagram of a data access device in a third embodiment of the present invention. The third embodiment is a corresponding apparatus for implementing the data access method provided in the first embodiment of the present invention, and the apparatus may be implemented in a software and/or hardware manner, and may be generally integrated in a computer device, specifically, a client of the computer device.
Accordingly, the apparatus of the present embodiment may include:
an access address obtaining module 310, configured to, when a client runs, obtain, by the address obtaining module, at least one access address sent by an address configuration server, where the access address is used for the client to access a specified server in a specified environment;
an access request receiving module 320, configured to receive an access request, and query, from each of the access addresses, a target access address matching the access request;
and the server access module 330 is configured to access the target designated server pointed by the target access address.
The client side acquires the access address through the address acquisition module address configuration server and accesses the designated server based on the access address in the designated environment, so that the problems of high updating cost and high difficulty of the access address caused by the fact that the client side in the designated environment accesses the designated server through the locally stored access address in the prior art are solved.
Further, the access address obtaining module 310 includes: an environment parameter obtaining unit, configured to obtain an environment parameter and generate an access address obtaining request, where the environment parameter includes an environment where the client is located and an operating system of the client; and calling an address acquisition module, and sending the access address acquisition request to an address configuration server to receive at least one access address fed back by the address configuration server according to the environment parameters.
Further, the access address includes: the standard prefix information of the access address and the standard prefix information of the uploading interface corresponding to the access address.
Further, the specified environment includes: a local environment, a development environment, a test environment, a new integrated test environment, a thermal remediation environment, a pre-production environment, or a production environment.
Further, the client includes an application program of a personal computer or an application program of a mobile terminal.
The device can execute the method provided by the first embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example four
Fig. 4 is a schematic diagram of a data access apparatus in a fourth embodiment of the present invention. The fourth embodiment is a corresponding apparatus for implementing the data access method provided by the second embodiment of the present invention, and the apparatus may be implemented in a software and/or hardware manner, and may be generally integrated into a computer device, specifically, an address configuration server.
Accordingly, the apparatus of the present embodiment may include:
an access address obtaining module 410, configured to obtain at least one access address matching with the client;
an access address sending module 420, configured to feed back each access address to the client through an address obtaining module, where the access address is used for the client in a specified environment to access a specified server.
The address configuration server sends the access address matched with the client to the client through the address acquisition module to indicate the client under the specified environment to access the specified server, and through realizing unified management of the access address, the difficulty and the cost of singly updating the access address by distinguishing the clients in different environments can be reduced, the updating operation of the access address is simplified, and the updating efficiency of the access address is improved.
Further, the access address obtaining module 410 includes: an access address acquisition request receiving unit, configured to receive, by an address acquisition module, an access address acquisition request sent by the client; extracting environment parameters from the access address acquisition request, wherein the environment parameters comprise the environment of the client and the operating system of the client; and inquiring at least one access address matched with the environment parameters.
Further, the data access apparatus further includes: the access address data collection module is used for acquiring the access address data of the client sent by the access address collection module before acquiring at least one access address matched with the client; the access address collection module is configured to query access address data in the client, and replace the access address data in the client by using a preset template, so that the client accesses a specified server to which the access address points through the address acquisition module and the replaced data, where the access address data includes at least one of the following items: at least one environment parameter, an access address matched with each environment parameter, a context of each environment parameter and a dependency relationship of each environment parameter.
The device can execute the method provided by the second embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
EXAMPLE five
Fig. 5 is a schematic structural diagram of a computer device according to a fifth embodiment of the present invention. FIG. 5 illustrates a block diagram of an exemplary computer device 12 suitable for use in implementing embodiments of the present invention. The computer device 12 shown in FIG. 5 is only an example and should not bring any limitations to the functionality or scope of use of embodiments of the present invention.
As shown in FIG. 5, computer device 12 is in the form of a general purpose computing device. The components of computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16. The computer device 12 may be a device that is attached to a bus.
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and PerIPheral Component Interconnect (PCI) bus.
Computer device 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by computer device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)30 and/or cache memory 32. Computer device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 5, and commonly referred to as a "hard drive"). Although not shown in FIG. 5, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a Compact disk Read-Only Memory (CD-ROM), Digital Video disk (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. System memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
Computer device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with computer device 12, and/or with any devices (e.g., network card, modem, etc.) that enable computer device 12 to communicate with one or more other computing devices. Such communication may be through an Input/Output (I/O) interface 22. Also, computer device 12 may communicate with one or more networks (e.g., Local Area Network (LAN), Wide Area Network (WAN)) via Network adapter 20. As shown, Network adapter 20 communicates with other modules of computer device 12 via bus 18. it should be understood that although not shown in FIG. 5, other hardware and/or software modules may be used in conjunction with computer device 12, including but not limited to microcode, device drivers, Redundant processing units, external disk drive Arrays of Inesponsive Disks (RAID) systems, tape drives, data backup storage systems, and the like.
The processing unit 16 executes various functional applications and data processing, such as implementing the methods provided by any of the embodiments of the present invention, by executing programs stored in the system memory 28.
EXAMPLE six
A sixth embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the data access method provided in all the embodiments of the present invention:
that is, the program when executed by the processor implements: when a client runs, the client acquires at least one access address sent by an address configuration server through an address acquisition module, wherein the access address is used for the client to access a specified server in a specified environment; the client receives an access request, and inquires a target access address matched with the access request from each access address; and the client accesses the target appointed server pointed by the target access address.
Alternatively, the program when executed by the processor implements: the address configuration server acquires at least one access address matched with the client; and the address configuration server feeds back each access address to the client through an address acquisition module, wherein the access address is used for the client to access the specified server in the specified environment.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a RAM, a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM), a flash Memory, an optical fiber, a portable CD-ROM, an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, Radio Frequency (RF), etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a LAN or a WAN, or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method of data access, comprising:
when a client runs, the client acquires at least one access address sent by an address configuration server through an address acquisition module, wherein the access address is used for the client to access a specified server in a specified environment;
the client receives an access request, and inquires a target access address matched with the access request from each access address;
and the client accesses the target appointed server pointed by the target access address.
2. The method of claim 1, wherein requesting an access address from an address configuration server via an address acquisition module comprises:
the client side obtains environment parameters and generates an access address obtaining request, wherein the environment parameters comprise the environment where the client side is located and an operating system of the client side;
and the client calls an address acquisition module and sends the access address acquisition request to an address configuration server so as to receive at least one access address fed back by the address configuration server aiming at the environment parameters.
3. The method of claim 1, wherein accessing the address comprises: the standard prefix information of the access address and the standard prefix information of the uploading interface corresponding to the access address.
4. The method of claim 1, wherein the specified environment comprises: a local environment, a development environment, a test environment, a new integrated test environment, a thermal remediation environment, a pre-production environment, or a production environment.
5. The method of claim 1, wherein the client comprises an application of a personal computer or an application of a mobile terminal.
6. A method of data access, comprising:
the address configuration server acquires at least one access address matched with the client;
and the address configuration server feeds back each access address to the client through an address acquisition module, wherein the access address is used for the client to access the specified server in the specified environment.
7. The method of claim 6, wherein the address configuration server obtains at least one access address matching the client, comprising:
the address configuration server receives an access address acquisition request sent by the client through an address acquisition module;
the address configuration server extracts environment parameters from the access address acquisition request, wherein the environment parameters comprise the environment of the client and the operating system of the client;
the address configuration server inquires at least one access address matched with the environment parameters.
8. The method of claim 6, further comprising, prior to obtaining at least one access address matching the client:
the address configuration server acquires the access address data of the client sent by an access address collection module;
the access address collection module is configured to query access address data in the client, and replace the access address data in the client by using a preset template, so that the client accesses a specified server to which the access address points through the address acquisition module and the replaced data, where the access address data includes at least one of the following items: at least one environment parameter, an access address matched with each environment parameter, a context of each environment parameter and a dependency relationship of each environment parameter.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the data access method according to any one of claims 1-8 when executing the program.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the data access method according to any one of claims 1 to 8.
CN202010511812.8A 2020-06-08 2020-06-08 Data access method, computer device and storage medium Active CN111711713B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010511812.8A CN111711713B (en) 2020-06-08 2020-06-08 Data access method, computer device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010511812.8A CN111711713B (en) 2020-06-08 2020-06-08 Data access method, computer device and storage medium

Publications (2)

Publication Number Publication Date
CN111711713A true CN111711713A (en) 2020-09-25
CN111711713B CN111711713B (en) 2023-07-04

Family

ID=72539489

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010511812.8A Active CN111711713B (en) 2020-06-08 2020-06-08 Data access method, computer device and storage medium

Country Status (1)

Country Link
CN (1) CN111711713B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112734056A (en) * 2020-12-29 2021-04-30 望海康信(北京)科技股份公司 Operation and maintenance system, method and corresponding equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102761532A (en) * 2011-04-29 2012-10-31 腾讯科技(深圳)有限公司 Information processing system and method for network video
CN105357175A (en) * 2015-09-25 2016-02-24 互联网域名系统北京市工程研究中心有限公司 Query method and device for domain name security of source address
CN110362762A (en) * 2019-07-11 2019-10-22 北京达佳互联信息技术有限公司 Content-data methods of exhibiting, device, electronic equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102761532A (en) * 2011-04-29 2012-10-31 腾讯科技(深圳)有限公司 Information processing system and method for network video
CN105357175A (en) * 2015-09-25 2016-02-24 互联网域名系统北京市工程研究中心有限公司 Query method and device for domain name security of source address
CN110362762A (en) * 2019-07-11 2019-10-22 北京达佳互联信息技术有限公司 Content-data methods of exhibiting, device, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112734056A (en) * 2020-12-29 2021-04-30 望海康信(北京)科技股份公司 Operation and maintenance system, method and corresponding equipment and storage medium

Also Published As

Publication number Publication date
CN111711713B (en) 2023-07-04

Similar Documents

Publication Publication Date Title
CN107196788B (en) Method and device for processing buried point data, server and client
US9444899B2 (en) Use of internet information services logging to collect user information in an asynchronous manner
CN109543462B (en) Equipment identification determination method, device, server and storage medium
CN110891057B (en) Protocol conversion method, device, equipment and storage medium
CN109672722B (en) Data deployment method and device, computer storage medium and electronic equipment
CN111818145B (en) File transmission method, device, system, equipment and storage medium
CN110134869B (en) Information pushing method, device, equipment and storage medium
US9223672B1 (en) Method and system for providing error repair status data to an application user
CN111654495B (en) Method, apparatus, device and storage medium for determining traffic generation source
CN110677307B (en) Service monitoring method, device, equipment and storage medium
CN111711713B (en) Data access method, computer device and storage medium
CN111443992B (en) Docker mirror image difference derivation method, computer storage medium and electronic device
CN113094236A (en) System data acquisition method and device, computer equipment and storage medium
CN112328272B (en) Algorithm upgrading method, device, equipment and storage medium
CN113763008A (en) Application promotion tracking method, device, server, equipment and medium
CN111367500A (en) Data processing method and device
CN115629784A (en) Method, system, equipment and computer readable storage medium for updating machine file
CN114201234A (en) File processing method, device, system, equipment and storage medium
CN114297495A (en) Service data searching method and device, electronic equipment and storage medium
CN110515807B (en) Database table monitoring method, device, equipment and storage medium
CN113341929A (en) Electronic control unit calibration data management system, method, device and equipment
CN111324374B (en) Application program registration method and device based on application performance management system
CN110958243A (en) Network vulnerability submitting method and device, storage medium and electronic equipment
CN112084114A (en) Method and apparatus for testing an interface
US7823149B2 (en) Method and system for restoring an operating environment on a computer system

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