Environment isolation method and system for service registration and discovery based on identifier identification

Through the service registration and discovery method based on identity identification, combined with environment, tenant and namespace identification, multi-dimensional isolation is achieved, solving the isolation problem of service registration and discovery in multi-tenant and multi-environment scenarios in the existing technology, reducing the Management and operation and maintenance costs extend the compatibility of the registration center.

CN119094596APending Publication Date: 2024-12-06CHINA CITIC BANK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411023497.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-29
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

The existing technology cannot effectively achieve environmental isolation between service registration and discovery in multi-tenant and multi-environment scenarios, resulting in high management and operation and maintenance costs, low resource utilization, and inability to compatible with different environments.

Method used

Adopt the service registration and discovery method based on identity identification, and perform service registration and discovery operations by receiving, analyzing and using environment identifiers. Multi-dimensional isolation is achieved by combining tenant and namespace identification, avoiding the usage scenario limitations of namespace and tenant isolation, and expanding Registration Center compatibility.

Benefits of technology

It realizes multi-dimensional isolation between service registration and discovery, reduces management and operation and maintenance costs, expands usage scenarios, simplifies technical operation thresholds, and realizes compatibility of the registration center.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119094596A_ABST
    Figure CN119094596A_ABST
Patent Text Reader

Abstract

The invention relates to an environment isolation method and system for service registration and discovery based on identifier identification, electronic equipment and a computer readable storage medium. The method comprises the following steps: when a service request is received, an interface-level application adopts an HTTP protocol and a short link mode, and forwards the request after an environment identifier is added through a proxy server; and the application-level application directly sends a request carrying the environment identifier through a GRPC protocol and a long link mode, if the service request does not carry the environment identifier, the system uses a default value to ensure normal processing, and the environment identifier is combined with the tenant identifier and the namespace identifier to serve as identifiers for data isolation. By adopting the scheme disclosed by the invention, multi-dimensional isolation is realized, the use scene limitation of namespace and tenant isolation is avoided, the use scene is expanded, registration center compatibility can be realized, and the technical operation threshold and the management cost are simplified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cloud computing and service registration and discovery technology, and in particular to an environment isolation method, system, electronic device and computer-readable storage medium for service registration and discovery based on identification recognition. Background Art

[0002] In software development technology, service registration and discovery are important links to ensure that various services can be discovered, called and managed. The interaction between services is becoming increasingly complex, especially in multi-tenant and multi-environment scenarios. Effective management and isolation of services has become an important technical challenge.

[0003] For example, the Chinese invention patent disclosure CN112087333B discloses a microservice registry cluster and its information processing method, including: the registry gateway cluster monitors the capacity and working status of different business domain registry clusters to complete the sharding and switching of the business domain registry cluster; the registry gateway cluster forwards the URL request to different business domain registry clusters according to the configured routing information to complete the service registration, service renewal, service offline, and service discovery operations. If the service discovery operation is completed, the business domain registry cluster returns the corresponding service list to the client through the registry gateway cluster, and the client parses the returned service list. However, this method does not fully consider the isolation of identification and cannot reduce the management and operation costs.

[0004] In the existing technology, service registration and discovery are based on a unified registration center, usually based on a namespace or tenant isolation environment, and there are limitations in the use scenarios. Namespace isolation requires certain technical means and management costs. The namespace is subject to lifecycle management constraints during creation, use, and destruction, and most of them are bound to hardware resources, resulting in low resource utilization. At the same time, the concept of namespace isolation already exists in most companies, and there is a need to deploy multiple environments under the same namespace, which limits the use scenarios. Tenant isolation needs to be bound to the organization. In most companies, it is impossible to bind the existing organization to the specific operating environment one by one, which limits the use scenarios, and it is impossible to achieve registration center compatibility, and it is impossible to reduce management and operation costs. Summary of the invention

[0005] To address the deficiencies of the prior art, the present invention proposes an environment isolation method, system, electronic device, and computer-readable storage medium for service registration and discovery based on identification recognition.

[0006] To achieve the above objectives, the technical solutions adopted by the present invention include:

[0007] An environment isolation method for service registration and discovery based on identification recognition, characterized by comprising:

[0008] S1. receiving a service request from an interface-level application or an application-level application, wherein the service request contains multiple identifiers;

[0009] S2. parsing the environment identifier in the service request;

[0010] S3. Execute a service registration operation or a service discovery operation according to the environment identifier;

[0011] S4. Return the execution result corresponding to the operation.

[0012] Furthermore, the step S1 further includes: the interface-level application sends the service request to the proxy server via the HTTP protocol and a short link, and the proxy server adds the environment identifier to the service request header and forwards it; the application-level application directly sends the service request carrying the environment identifier via the GRPC protocol and a long link.

[0013] Furthermore, when the interface-level application directly sends the service request through the HTTP protocol, or when the service request of the application-level application does not carry the environment identifier, a default value is used as the environment identifier.

[0014] Furthermore, the step S3 also includes: using the environment identifier as an identifier for data isolation.

[0015] Furthermore, using the environment identifier as a data isolation identifier further includes: using the environment identifier in combination with a tenant identifier and a namespace identifier as a data isolation identifier, wherein the tenant identifier and the namespace identifier are obtained by parsing the service request.

[0016] Optionally, returning the execution result corresponding to the operation in step S4 further includes: for the service discovery operation, returning a list of service providers matching the environment identifier; for the service registration operation, storing service provider information in a storage location corresponding to the environment identifier.

[0017] In addition, the present invention also relates to an environment isolation system for service registration and discovery based on identification recognition, which is characterized by comprising:

[0018] A request receiving module, receiving a service request from an interface-level application or an application-level application, wherein the service request contains a plurality of identifiers;

[0019] A request parsing module, used for parsing the environment identifier in the service request;

[0020] An operation execution module, used to execute a service registration operation or a service discovery operation according to the environment identifier;

[0021] The result returning module is used to return the execution result corresponding to the operation.

[0022] Furthermore, the request receiving module further includes:

[0023] An interface-level application receiving unit, configured to receive a service request of the interface-level application, wherein the service request is sent to the proxy server via the HTTP protocol and a short link, and the proxy server adds the environment identifier to the service request header and forwards the request;

[0024] The application-level application receiving unit is used to receive the service request carrying the environment identifier directly sent by the application-level application through the GRPC protocol and long link mode.

[0025] Furthermore, the request receiving module is also used for:

[0026] When the interface-level application directly sends the service request through the HTTP protocol, or when the service request of the application-level application does not carry the environment identifier, a default value is used as the environment identifier.

[0027] Optionally, the operation execution module is further used to:

[0028] The environment identifier is used as an identifier for data isolation.

[0029] Optionally, the operation execution module is further used to:

[0030] The environment identifier is used in combination with a tenant identifier and a namespace identifier as an identifier for data isolation, wherein the tenant identifier and the namespace identifier are obtained by parsing the service request.

[0031] Optionally, the result returning module is further used to:

[0032] For the service discovery operation, a service provider list matching the environment identifier is returned; for the service registration operation, service provider information is stored in a storage location corresponding to the environment identifier.

[0033] In addition, the present invention also relates to an electronic device, characterized in that it comprises a processor and a memory;

[0034] The memory is used to store operation instructions;

[0035] The processor is used to execute the above method by calling the operation instruction.

[0036] In addition, the present invention also relates to a computer-readable storage medium, characterized in that a computer program is stored on the storage medium, and the computer program implements the above method when executed by a processor.

[0037] By adopting the solution provided by this application, when receiving a service request, the interface-level application uses the HTTP protocol and short link method, and forwards the request after adding the environment identifier through the proxy server; while the application-level application directly sends the request carrying the environment identifier through the GRPC protocol and long link method. If the service request does not carry the environment identifier, the system will use the default value to ensure normal processing, and use the environment identifier in combination with the tenant identifier and the namespace identifier as the identifier for data isolation. Therefore, the above technical solution is adopted to achieve multi-dimensional isolation, avoid the usage scenario limitations of namespace and tenant isolation, expand the usage scenarios, achieve registration center compatibility, and simplify the technical operation threshold and management costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 A schematic diagram of a software development center framework provided in an embodiment of the present application;

[0039] Figure 2 A flow chart of an environment isolation method for service registration and discovery based on identification recognition provided in an embodiment of the present application;

[0040] Figure 3 A schematic diagram of the structure of an environment isolation system for service registration and discovery based on identity recognition provided in an embodiment of the present application;

[0041] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0042] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be interpreted as limiting the present invention.

[0043] Those skilled in the art can understand that, unless otherwise stated, the singular forms "one", "an", "said" and "the" used herein may also include plural forms, and the "first", "second", etc., are only used to distinguish and define objects for the purpose of introducing the scheme clearly, and do not limit the objects themselves. Of course, the objects defined by "first" and "second" may be the same terminal, device, user, etc., or the same type of terminal, device and user. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.

[0044] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.

[0045] In order to more clearly introduce the technical solution of the present application, some concepts, terms or devices that may be involved in the following embodiments are introduced below to help understand the environmental isolation solution disclosed in the present application:

[0046] The first generation of unified registration center based on interface-level service registration and discovery: As the core component in the microservice architecture, it is mainly responsible for service registration and discovery. Services are registered according to interfaces rather than specific service instances. However, it cannot meet the requirements of large data volumes for high performance, high reliability, high availability, and high scalability of products. Currently, it requires multiple environments to be deployed, resulting in serious waste of software and hardware resources, high operating costs, and data interoperability.

[0047] The second generation of unified registration center based on interface-level service registration and discovery: Based on the inheritance of the first generation functions, it has been significantly improved and expanded to support richer service metadata and provide more powerful service routing and governance strategies. However, it does not solve the multi-environment problem and is not compatible with the first generation of service registration and discovery based on interface-level service.

[0048] like Figure 1The software development center framework shown in the figure has a unified registration center and two development departments, among which, the first and second development departments can operate independently, and are independent of each other in resources and management. They do not interfere with each other and are isolated in a tenant manner. The departments are responsible for the research and development of different applications. The first development department develops two applications, APP-1 and APP-2, among which APP-1 is an application registered at the interface level, and APP-2 is an application registered at the application level; the second development department develops two applications, APP-3 and APP-4, among which APP-3 is registered at the interface level, and APP-4 is registered at the application level; at the same time, each application development also involves iterative development, and iterations are isolated through namespaces. Different environments within each iteration, FT and PT environments, and interface-level registered applications are isolated through FT agents and PT agents.

[0049] Specifically, Figure 2 The following is a flow chart of an environment isolation method for service registration and discovery based on identification recognition provided by an embodiment of the present application, which specifically includes:

[0050] S1. receiving a service request from an interface-level application or an application-level application, wherein the service request contains multiple identifiers;

[0051] Further, for the FT-functional test environment, the interface-level application (existing application) sends the service request to the proxy-FT server through the HTTP protocol and the short link method, and the proxy-FT server adds the environment identifier (APP_ENV=FT) to the service request header and forwards it to the unified service registration center; the application-level application (new application) directly sends the service request carrying the environment identifier (APP_ENV=FT) through the GRPC protocol and the long link method;

[0052] Furthermore, when the interface-level application directly sends the service request through the HTTP protocol, or when the service request of the application-level application does not carry the environment identifier, a default value (PROD) is used as the environment identifier.

[0053] Long links and short links provide different communication methods, allowing service registration and discovery to adapt to the needs of different scenarios.

[0054] S2. The unified service registration center obtains the environment identification information in the service request, that is, APP_ENV=FT;

[0055] S3. Execute a service registration operation or a service discovery operation according to the environment identifier;

[0056] Furthermore, the environment identifier is used in combination with a tenant identifier and a namespace identifier as an identifier for data isolation, wherein the tenant identifier and the namespace identifier are obtained by parsing the service request.

[0057] The namespace and tenant isolation scenarios are simulated through environment identification, and are compatible with interface-level and application-level service registration and discovery functions. By combining tenant identification and namespace identification as data isolation identifiers, the registration center achieves three-level isolation and expands the usage scenarios of the registration center.

[0058] S4. Return the execution result corresponding to the operation.

[0059] Furthermore, for the service discovery operation, a service provider list matching the environment identifier is returned; and for the service registration operation, service provider information is stored in a storage location corresponding to the environment identifier.

[0060] By adopting the solution provided by this application, when receiving a service request, the interface-level application uses the HTTP protocol and short link method, and forwards the request after adding the environment identifier through the proxy server; while the application-level application directly sends the request carrying the environment identifier through the GRPC protocol and long link method. If the service request does not carry the environment identifier, the system will use the default value to ensure normal processing, and use the environment identifier in combination with the tenant identifier and the namespace identifier as the identifier for data isolation. Therefore, the above technical solution is adopted to achieve multi-dimensional isolation, avoid the usage scenario limitations of namespace and tenant isolation, expand the usage scenarios, achieve registration center compatibility, and simplify the technical operation threshold and management costs.

[0061] based on Figure 2 The environment isolation method for service registration and discovery based on identification recognition is shown, and on the other hand, it also relates to an environment isolation system for service registration and discovery based on identification recognition, such as Figure 3 As shown, including:

[0062] A request receiving module 301 receives a service request from an interface-level application or an application-level application, wherein the service request contains multiple identifiers;

[0063] A request parsing module 302, used to parse the environment identifier in the service request;

[0064] An operation execution module 303, used to execute a service registration operation or a service discovery operation according to the environment identifier;

[0065] The result returning module 304 is used to return the execution result corresponding to the operation.

[0066] Furthermore, the request receiving module 301 further includes:

[0067] The interface-level application receiving unit 3011 is used to receive the service request of the interface-level application, and the service request is sent to the proxy server through the HTTP protocol and a short link. The proxy server adds the environment identifier to the service request header and forwards it;

[0068] The application-level application receiving unit 3012 is used to receive the service request carrying the environment identifier directly sent by the application-level application through the GRPC protocol and the long link method.

[0069] Furthermore, the request receiving module 301 is further used for:

[0070] When the interface-level application directly sends the service request through the HTTP protocol, or when the service request of the application-level application does not carry the environment identifier, a default value is used as the environment identifier.

[0071] Optionally, the operation execution module 303 is further used to:

[0072] The environment identifier is used as an identifier for data isolation.

[0073] Optionally, the operation execution module 303 is further used to:

[0074] The environment identifier is used in combination with a tenant identifier and a namespace identifier as an identifier for data isolation, wherein the tenant identifier and the namespace identifier are obtained by parsing the service request.

[0075] Optionally, the result returning module 304 is further used to:

[0076] For the service discovery operation, a service provider list matching the environment identifier is returned; for the service registration operation, service provider information is stored in a storage location corresponding to the environment identifier.

[0077] By using this system, the above method can be executed and the corresponding technical effects can be achieved.

[0078] An embodiment of the present invention further provides an electronic device for executing the above method, as an implementation device of the method, comprising a processor and a memory;

[0079] A memory, used for storing operation instructions;

[0080] The processor is used to execute the environment isolation method provided in any embodiment of the present application by calling an operation instruction.

[0081] As an example, Figure 4 A schematic diagram of the structure of an electronic device applicable to the embodiment of the present application is shown. Figure 4As shown, the electronic device 400 includes: a processor 401 and a memory 403. The processor 401 and the memory 403 are connected, such as being connected via a bus 402. Optionally, the electronic device 400 may further include a transceiver 404. It should be noted that in actual applications, the transceiver 404 is not limited to one. It is understandable that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the specific structure of the electronic device 400. In other embodiments of the present application, the electronic device 400 may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware. Optionally, the electronic device may further include a display screen 405 for displaying images, or receiving user operation instructions when necessary.

[0082] The processor 401 is applied in the embodiment of the present application to implement the method shown in the above method embodiment. The transceiver 404 may include a receiver and a transmitter. The transceiver 404 is applied in the embodiment of the present application to implement the function of the electronic device of the embodiment of the present application communicating with other devices when executed.

[0083] Processor 401 may be a CPU (Central Processing Unit), a general purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 401 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.

[0084] The processor 401 may also include one or more processing units, for example, the processor 401 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and / or a neural network processor (Neural-network Processing Unit, NPU), etc. Different processing units may be independent devices or integrated into one or more processors. Among them, the controller may be the nerve center and command center of the electronic device 400. The controller may generate an operation control signal according to the instruction opcode and the timing signal to complete the control of fetching and executing instructions. A memory may also be set in the processor 401 for storing instructions and data. In some embodiments, the memory in the processor 401 is a high-speed cache memory. The memory may store instructions or data that the processor 401 has just used or circulated. If the processor 401 needs to use the instruction or data again, it can be directly called from the memory. Repeated access is avoided, the waiting time of the processor 401 is reduced, and the efficiency of the system is improved.

[0085] The processor 401 can run the environmental isolation method provided in the embodiment of the present application to reduce the user's operation complexity, improve the intelligence of the terminal device, and enhance the user experience. The processor 401 can include different devices. For example, when the CPU and GPU are integrated, the CPU and GPU can cooperate to execute the environmental isolation method provided in the embodiment of the present application, and some algorithms are executed by the CPU, and other algorithms are executed by the GPU to obtain faster processing efficiency.

[0086] The bus 402 may include a path to transmit information between the above components. The bus 402 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 402 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0087] The memory 403 may be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory), or may include a high-speed random access memory, or may include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), a disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to this.

[0088] Optionally, the memory 403 is used to store application code for executing the solution of the present application, and the execution is controlled by the processor 401. The processor 401 is used to execute the application code stored in the memory 403 to implement the environment isolation method provided in any embodiment of the present application.

[0089] The memory 403 can be used to store computer executable program codes, which include instructions. The processor 401 executes various functional applications and data processing of the electronic device 400 by running the instructions stored in the memory 403. The memory 403 may include a program storage area and a data storage area. Among them, the program storage area may store the code of the operating system, application program, etc. The data storage area may store data created during the use of the electronic device 400 (such as images, videos, etc. collected by the camera application), etc.

[0090] The memory 403 may also store one or more computer programs corresponding to the environmental isolation method provided in the embodiment of the present application. The one or more computer programs are stored in the above-mentioned memory 403 and are configured to be executed by the one or more processors 401, and the one or more computer programs include instructions, and the above-mentioned instructions can be used to execute each step in the above-mentioned corresponding embodiment.

[0091] Of course, the code of the environment isolation method provided in the embodiment of the present application can also be stored in an external memory.

[0092] The display screen 405 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Miniled, a MicroLed, a Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 400 may include 1 or N display screens 405, where N is a positive integer greater than 1. The display screen 405 may be used to display information input by a user or information provided to a user and various graphical user interfaces (GUIs). For example, the display screen 405 may display photos, videos, web pages, or files, etc.

[0093] The electronic device provided in the embodiment of the present application is applicable to any embodiment of the above method. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, which will not be repeated here.

[0094] An embodiment of the present invention also provides a computer-readable storage medium capable of implementing all the steps in the method in the above embodiment, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, all the steps in the method in the above embodiment are implemented.

[0095] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0096] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A system that specifies the functions of a box or multiple boxes.

[0097] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction system, which is implemented in the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0098] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps of the functions specified in a box or multiple boxes. Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they know the basic creative concept. Therefore, the attached claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0099] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. An environment isolation method for service registration and discovery based on identification recognition, characterized in that: include: S1. receiving a service request from an interface-level application or an application-level application, wherein the service request contains multiple identifiers; S2. parsing the environment identifier in the service request; S3. Execute a service registration operation or a service discovery operation according to the environment identifier; S4. Return the execution result corresponding to the operation.

2. The method according to claim 1, characterized in that: The step S1 further includes: the interface-level application sends the service request to the proxy server via the HTTP protocol and a short link, and the proxy server adds the environment identifier to the service request header and forwards it; the application-level application directly sends the service request carrying the environment identifier via the GRPC protocol and a long link.

3. The method according to claim 2, characterized in that When the interface-level application directly sends the service request through the HTTP protocol, or when the service request of the application-level application does not carry the environment identifier, a default value is used as the environment identifier.

4. The method according to claim 1 or 3, characterized in that: The step S3 also includes: using the environment identifier as an identifier for data isolation.

5. The method according to claim 1, characterized in that Using the environment identifier as a data isolation identifier further includes: using the environment identifier in combination with a tenant identifier and a namespace identifier as a data isolation identifier, wherein the tenant identifier and the namespace identifier are obtained by parsing the service request.

6. The method according to claim 1, characterized in that Returning the execution result corresponding to the operation in step S4 further includes: for the service discovery operation, returning a service provider list matching the environment identifier; for the service registration operation, storing service provider information in a storage location corresponding to the environment identifier.

7. An environment isolation system for service registration and discovery based on identification recognition, characterized in that: include: A request receiving module, receiving a service request from an interface-level application or an application-level application, wherein the service request contains a plurality of identifiers; A request parsing module, used for parsing the environment identifier in the service request; An operation execution module, used to execute a service registration operation or a service discovery operation according to the environment identifier; The result returning module is used to return the execution result corresponding to the operation.

8. The system according to claim 7, characterized in that The request receiving module further includes: An interface-level application receiving unit, configured to receive a service request of the interface-level application, wherein the service request is sent to the proxy server via the HTTP protocol and a short link, and the proxy server adds the environment identifier to the service request header and forwards the request; The application-level application receiving unit is used to receive the service request carrying the environment identifier directly sent by the application-level application through the GRPC protocol and long link mode.

9. An electronic device, characterized in that: including a processor and a memory; The memory is used to store operation instructions; The processor is used to execute the method according to any one of claims 1 to 6 by calling the operation instruction.

10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.