WO2024041335A1 - 一种寻址测试的方法、装置、存储介质及电子设备 - Google Patents

一种寻址测试的方法、装置、存储介质及电子设备 Download PDF

Info

Publication number
WO2024041335A1
WO2024041335A1 PCT/CN2023/110637 CN2023110637W WO2024041335A1 WO 2024041335 A1 WO2024041335 A1 WO 2024041335A1 CN 2023110637 W CN2023110637 W CN 2023110637W WO 2024041335 A1 WO2024041335 A1 WO 2024041335A1
Authority
WO
WIPO (PCT)
Prior art keywords
address
channel
user
middleware
addressing
Prior art date
Application number
PCT/CN2023/110637
Other languages
English (en)
French (fr)
Inventor
高坤
Original Assignee
支付宝(杭州)信息技术有限公司
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 支付宝(杭州)信息技术有限公司 filed Critical 支付宝(杭州)信息技术有限公司
Publication of WO2024041335A1 publication Critical patent/WO2024041335A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Definitions

  • the present application relates to the field of computers, and in particular to a method, device, storage medium and electronic equipment for addressing testing.
  • cloud operators provide a lot of convenient and fast middleware to better serve users while protecting user privacy. Users can complete the middleware through standardized application programming interfaces (Application Programming Interface, API). Call the middleware to obtain the services provided by the called middleware.
  • API Application Programming Interface
  • middleware In addition to the middleware that provides services to users, there is also a special middleware whose function is to find users for users. Therefore, it is very important for users whether the addressing middleware can accurately locate the address of the middleware that needs to be called. , that is, the addressing accuracy of addressing middleware has a crucial impact on all users, so how to test the addressing accuracy of addressing middleware is an urgent problem that needs to be solved.
  • This specification provides an addressing test method, device, storage medium and electronic equipment to at least partially solve the above problems existing in related technologies.
  • This specification adopts the following technical solution: This specification provides an addressing test method, which includes: in response to a received virtual middleware creation request, creating a virtual middleware; in response to the virtual middleware configuration request, in the Among the actual addresses of each node included in the cloud architecture, select at least one actual address as the address of the virtual middleware, and establish the virtual middleware to the cloud architecture according to the address of the virtual middleware.
  • the user's channel when testing the addressing middleware, run a test case through the addressing middleware; the test case contains an addressing request for addressing the virtual middleware; by The addressing middleware, based on the attribute information of the user who sent the addressing request and the channel, determines the address of the addressed virtual middleware as a test address; compares the test address with the standard address. By comparison, the test results of the addressing middleware are obtained; the standard address is determined in advance based on the user's attribute information and the channel.
  • the channel includes a shared channel; establishing a channel from the virtual middleware to the user in the cloud architecture specifically includes: for each address of the virtual middleware, when establishing the virtual middleware When the address reaches the shared channel of the users in the cloud architecture, the address is configured as the address corresponding to the shared channel, and the attribute information of the user who is allowed to access the address is configured for the shared channel; the attribute information includes At least one of the logical computer room where the user is located, the physical computer room where the user is located, and the geographical area where the user is located.
  • the channel includes a dedicated channel; users in the cloud architecture include logical control center LDC users; establishing a channel from the virtual middleware to users in the cloud architecture specifically includes: targeting the virtual For each address of the middleware, when establishing a dedicated channel from this address of the virtual middleware to the LDC user in the cloud architecture, configure this address as the address corresponding to the dedicated channel, and will need to establish
  • the LDC user of the dedicated channel is determined to be the LDC user allowed to access the address, and the attribute information of the LDC user allowed to access the address is configured for the dedicated channel; the attribute information includes the tenant to which the LDC user belongs, the location of the LDC user At least one of the logical computer room, the physical computer room where the LDC user is located, and the geographical area where the LDC user is located.
  • the channel includes a dedicated channel;
  • the users in the cloud architecture include non-logical control center LDC users;
  • establishing a channel from the virtual middleware to the users in the cloud architecture specifically includes: for the For each address of the virtual middleware, when establishing a dedicated channel from the address of the virtual middleware to a non-LDC user in the cloud architecture, configure the address as the address corresponding to the dedicated channel, and
  • the non-LDC user who needs to establish the dedicated channel is determined as a non-LDC user allowed to access the address, and the attribute information of the non-LDC user allowed to access the address is configured for the dedicated channel;
  • the attribute information includes the non-LDC user to whom At least one of the tenants, the physical computer room where non-LDC users are located, and the geographical area where non-LDC users are located.
  • the addressing middleware determine the address of the addressed virtual middleware based on the attribute information of the user who sent the addressing request and the channel, specifically including: for each channel, Through the addressing middleware, it is determined whether the configuration of the channel contains at least one attribute information of the user who sent the addressing request, and if so, it is determined that the channel matches the attribute information of the user who sent the addressing request. channel, otherwise, determine that the channel is not a channel that matches the attribute information of the user who sent the addressing request; determine the address corresponding to the channel that matches the attribute information of the user that sent the addressing request as the addressed The address of the virtual middleware.
  • the method further includes: determining the environment filtering conditions corresponding to the established channel; determining that the channel is related to sending the addressing request. Before the user's attribute information matches the channel, the method further includes: determining that the environment where the user who sent the addressing request is located satisfies the environment filtering condition corresponding to the channel.
  • the address of the virtual middleware includes more than two actual addresses; the test address is compared with the standard address to obtain the test result of the addressing middleware, which specifically includes: judging the test obtained by addressing. Whether the address corresponds to the standard address one-to-one; if yes, it is determined that the addressing result of the addressing middleware is accurate; if not, it is determined that the addressing result of the addressing middleware is inaccurate.
  • This specification provides an addressing test device, including: a creation module, used to create virtual middleware in response to a received virtual middleware creation request; a configuration module, used to respond to the configuration request of the virtual middleware, where Among the actual addresses of each node included in the cloud architecture, select at least one actual address as the address of the virtual middleware, and establish the virtual middleware to the cloud architecture according to the address of the virtual middleware.
  • test cases include a module for addressing the virtual middleware Addressing request; addressing module for Through the addressing middleware, based on the attribute information of the user who sent the addressing request and the channel, the address of the addressed virtual middleware is determined as a test address; a comparison module is used to compare the The test address is compared with the standard address to obtain the test result of the addressing middleware; the standard address is determined in advance based on the attribute information of the user who sent the addressing request and the channel.
  • the channel includes a shared channel;
  • the configuration module is specifically configured to, for each address of the virtual middleware, when establishing the address of the virtual middleware to be shared by users in the cloud architecture
  • configure the address as the address corresponding to the shared channel, and configure the attribute information of the user who is allowed to access the address for the shared channel
  • the attribute information includes the logical computer room where the user is located, the physical computer room where the user is located, At least one of the geographical areas where the user is located.
  • the channel includes a dedicated channel; users in the cloud architecture include logical control center LDC users; the configuration module is specifically configured to, for each address of the virtual middleware, when establishing the virtual middleware When the address of the middleware reaches the dedicated channel of the LDC user in the cloud architecture, the address is configured as the address corresponding to the dedicated channel, and the LDC user who needs to establish the dedicated channel is determined to be allowed access. For the LDC user at this address, configure the attribute information of the LDC user that is allowed to access this address for the dedicated channel; the attribute information includes the tenant to which the LDC user belongs, the logical computer room where the LDC user is located, the physical computer room where the LDC user is located, and the LDC At least one of the geographical areas where the user is located.
  • the channel includes a dedicated channel; users in the cloud architecture include non-logical control center LDC users; the configuration module is specifically configured to, for each address of the virtual middleware, when establishing the When the address of the virtual middleware reaches the dedicated channel of a non-LDC user in the cloud architecture, configure the address as the address corresponding to the dedicated channel, and determine the non-LDC user who needs to establish the dedicated channel.
  • the attribute information of the non-LDC users allowed to access the address is configured for the dedicated channel; the attribute information includes the tenant to which the non-LDC user belongs, the physical computer room where the non-LDC user is located, and the non-LDC user's physical computer room. At least one of the geographical areas where the LDC user is located.
  • the addressing module is specifically configured to, for each channel, determine through the addressing middleware whether the configuration of the channel contains at least one attribute information of the user who sent the addressing request. If so, , determine that the channel is a channel that matches the attribute information of the user who sent the addressing request, otherwise, determine that the channel is not a channel that matches the attribute information of the user that sent the addressing request; The address corresponding to the channel whose attribute information of the requested user matches is determined to be the address of the addressed virtual middleware.
  • the configuration module is also used to, after establishing a channel from the virtual middleware to the user in the cloud architecture, determine the environment filtering conditions corresponding to the established channel; the addressing module is also used to, Before determining that the channel is a channel that matches the attribute information of the user who sent the addressing request, it is determined that the environment where the user who sent the addressing request satisfies the environment filtering conditions corresponding to the channel.
  • the address of the virtual middleware includes more than two actual addresses; the comparison module is specifically used to determine whether the test address obtained by addressing corresponds to the standard address; if so, determine whether the sought address address middleware The addressing result is accurate. If not, it is determined that the addressing result of the addressing middleware is inaccurate.
  • the storage medium stores a computer program.
  • the computer program is executed by a processor, the above addressing test method is implemented.
  • This specification provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor.
  • the processor executes the program, the above addressing test method is implemented.
  • a virtual middleware is created based on the real address in the cloud architecture, and the virtual middleware is established based on the address of the virtual middleware.
  • the channel from the middleware to the user in the cloud architecture, through the addressing middleware determines the address of the addressed virtual middleware based on the attribute information of the user who sends the addressing request and the channel, as the test address, according to
  • the attribute information of the user who sent the addressing request and the channel determine the standard address, compare the test address with the standard address, and obtain the test results of the addressing middleware, thereby completing the test of the addressing middleware.
  • this method simulates the channel between the middleware and the user in the cloud architecture by obtaining real nodes, and accurately tests the addressing results of the addressing middleware, and this method does not It is limited to actual application scenarios and can be expanded arbitrarily, which ensures accuracy and saves costs.
  • Figure 1 is a flow chart of an addressing test method in this manual
  • Figure 2 is a schematic diagram of allocating actual addresses to virtual middleware provided in this specification
  • Figure 3 is a schematic diagram of a configured virtual middleware provided in this specification.
  • Figure 4 is a schematic diagram of establishing a channel provided in this specification.
  • Figure 5 is a schematic diagram of an addressing test device provided in this specification.
  • FIG. 6 is a schematic diagram of the electronic device corresponding to FIG. 1 provided in this specification.
  • Figure 1 is a schematic flowchart of an addressing test method provided in this specification, which specifically includes the following steps S100 to S108.
  • middleware In order not to affect the normal operation of the actual middleware to provide services to users, you can create a virtual middleware before performing the addressing test.
  • the so-called middleware is an independent system software or service program that connects two independent applications or independent system software. It is used to manage computer resources and network communications. Distributed application software uses this software to be shared between different technologies. resource.
  • the virtual middleware created in the embodiment of this specification is a middleware created based on real nodes in the cloud architecture. It does not actually provide services to users, but has an actual address and is used to test the addressing accuracy of the addressing middleware.
  • a creation request for creating virtual middleware can be sent to the central management and control area in the cloud architecture.
  • the central management and control area creates virtual middleware in response to the request to create virtual middleware, and simulates actual middleware for addressing testing.
  • S102 In response to the configuration request of the virtual middleware, select at least one actual address from the actual addresses of each node included in the cloud architecture as the address of the virtual middleware, and select it according to the address of the virtual middleware. address, establishing a channel from the virtual middleware to the user in the cloud architecture.
  • the virtual middleware is created in the central management and control area through step S100, although the virtual middleware does not actually provide services to users, it must have an address, otherwise it cannot be used for addressing testing. Therefore, after the central management and control area creates the virtual middleware, it is also necessary to configure the address of the virtual middleware.
  • the address assigned by the central control area to the virtual middleware is selected from the actual addresses of each node included in the cloud architecture, and at least one actual address is selected as the address of the virtual middleware.
  • the address may be an Internet Protocol (IP) address.
  • IP Internet Protocol
  • the user can access the middleware through the IP address of the middleware to obtain services.
  • multiple virtual middlewares including virtual middleware 1 to 3 are created.
  • 4 actual addresses can be selected and configured as the addresses of virtual middleware 1.
  • the addresses are IP1 and IP2 of nodes located in physical computer room 1 in Region 1, and IP3 and IP4 of nodes located in physical computer room 2 of Region 2.
  • the central management and control area After the virtual middleware has an address, it needs to simulate the addressing logic of the addressing middleware to establish a channel between the virtual middleware and the user before it can be used for addressing testing. Therefore, after assigning the actual address to the virtual middleware, the central management and control area also needs to establish a channel from the virtual middleware to the user in the cloud architecture.
  • the established channel is shown in Figure 3.
  • the central management and control area has established a channel from virtual middleware 1 to From channel 1, channel 2, and channel 3 of user A in the cloud architecture, the central management and control area has established virtual middleware 1 to channel 4, channel 5, and channel 6 of user B in the cloud architecture.
  • Channel is the correspondence between middleware and users. Establishing a channel means establishing a correspondence between the address of middleware and the attribute information of qualified users.
  • channel 1 is the address of virtual middleware 1.
  • the corresponding relationship is that channel 2 is the corresponding relationship between the address IP1 of virtual middleware 1 and the attribute information 2 of user B.
  • Channel 3 is the corresponding relationship between the address IP2 of virtual middleware 1 and the attribute information 1 of user A.
  • Channel 4 is the corresponding relationship between the virtual middleware 1 and the attribute information 1 of user A.
  • Channel 5 is the corresponding relationship between the address IP3 of virtual middleware 1 and the attribute information 2 of user B.
  • Channel 5 is the corresponding relationship between the address IP4 of virtual middleware 1 and the attribute information 2 of user B.
  • Channel 6 is the corresponding relationship between the address IP4 of virtual middleware 1 and user A.
  • test case When testing the addressing middleware, run a test case through the addressing middleware; the test case includes an addressing request for addressing the virtual middleware.
  • the addressing middleware can be tested based on the virtual middleware configured above.
  • test case before testing the addressing middleware, a test case may be created first.
  • the test case at least includes the user's addressing request for addressing the virtual middleware.
  • it may also include sending the addressing request.
  • the user ID of the requesting user which may also contain attribute information of the user who sent the addressing request.
  • the central management and control area can run test cases through the addressing middleware, and the addressing middleware can obtain the address of the virtual middleware through the following step S106.
  • S106 Use the addressing middleware to determine the address of the addressed virtual middleware as a test address based on the attribute information of the user who sent the addressing request and the channel.
  • the addressing middleware can obtain the attribute information of the user after running the test case, so the addressing middleware
  • the IP address of the virtual middleware corresponding to the attribute information of the user can be queried according to the channel configured for the virtual middleware in step S102 (that is, the correspondence between the address of the middleware and the attribute information of the qualified user), and the obtained The IP address of the virtual middleware is used as the test address.
  • the test case created above contains the addressing request sent by the user and the user ID of the user who sent the addressing request
  • the user's attribute information can be found based on the user's user ID.
  • the addressing middleware can query the IP address of the virtual middleware corresponding to the user's attribute information according to the channel configured for the virtual middleware in step S102, and obtain the IP address of the virtual middleware as a test address.
  • S108 Compare the test address with the standard address to obtain the test result of the addressing middleware; the standard address is determined in advance based on the attribute information of the user who sends the addressing request and the channel.
  • the address of the virtual middleware corresponding to the user's attribute information in the test case can be manually determined, and this address is the standard address.
  • the addressing middleware obtains the test address, it can directly compare the obtained test address with the standard address. Ratio, if the two are the same, it means that the addressing result of the addressing middleware is accurate; otherwise, it means that the addressing result of the addressing middleware is inaccurate.
  • the address of the virtual middleware includes more than two actual addresses, it can be determined whether the test address obtained by addressing corresponds to the standard address. If so, it is determined that the addressing result of the addressing middleware is accurate. If not, it is determined that the addressing result of the addressing middleware is inaccurate.
  • user A needs to find the address of virtual middleware 1.
  • the actual node IP addresses of virtual middleware 1 are IP1, IP2, IP3 and IP4.
  • the standard addresses are IP1, IP2 and IP4, then, if the addresses addressed by the addressing middleware based on the attribute information of user A and the channel between user A and virtual middleware 1 are IP1, IP2 and IP4, it means that the test results are accurate. Otherwise, assuming that the addressing middleware If the addressing result of the addressing middleware is only one or two of IP1, IP2, and IP4, or even no address is addressed, or the addressed test result includes IP4, it means that the addressing middleware The addressing results for the file are inaccurate.
  • test data used to test the above addressing middleware can also be cleaned to prevent impact on other operations, for example, clean up the virtual middleware created by the central control area in steps S100 and S102 and
  • the addresses and channels configured for the virtual middleware can also be cleared from the test cases created in step S104, and the test addresses and standard addresses determined in steps S106 and S108 can also be cleared.
  • this method simulates the channel between the middleware and the user in the cloud architecture by obtaining real nodes, and accurately tests the addressing results of the addressing middleware, and this method does not It is limited to actual application scenarios and can be expanded arbitrarily, because the middleware used for testing in this method is temporarily created virtual middleware. Any number of virtual middleware can be created according to the testing needs, or any type of virtual middleware can be created. The addresses and channels of these virtual middleware can be configured arbitrarily. These virtual middleware and their addresses and channels do not affect the operation of the actual middleware and can be tested smoothly, which not only ensures the accuracy of the test but also saves costs.
  • the central management and control area configured the created virtual middleware, assigned an actual address to the virtual middleware, and established a channel from the virtual middleware to the user in the cloud architecture (i.e., the address of the middleware). and the attribute information of qualified users).
  • the addressing middleware can complete the basic addressing function, but correspondingly, the addressing efficiency of the addressing middleware is relatively low.
  • Tenant isolation refers to the behavior of one tenant operating cloud computing resources. Others Tenants cannot sense it.
  • users can be divided into logical control center (Logic Data Center, LDC) tenants and non-logical control center (Logic Data Center, LDC) tenants. The difference between the two is that non-LDC tenants use the user's physical computer room.
  • LDC tenants can isolate tenants in the user's logical computer room.
  • the physical computer room is an actual computer room that stores many hosts.
  • the cloud service provider provides its own cloud resources to users.
  • the logical computer room is essentially a logical split of the physical computer room, creating the illusion of one or more larger physical computer rooms. For more smaller computer rooms, physical computer rooms can be grouped into areas Carry out logical splitting.
  • the channels between the established virtual middleware and users are the same, users of different tenant types may queue up and wait to access the same channel, and the addressing efficiency of the addressing middleware is low.
  • the channels are classified, different types of users can obtain addresses by accessing different channels when addressing through the addressing middleware, which can improve the addressing efficiency of the addressing middleware.
  • the established channels can be divided into two types: shared channels and dedicated channels.
  • the process of establishing a common channel from the virtual middleware to users in the cloud architecture specifically includes:
  • the address For each address of the virtual middleware, when a common channel from the address of the virtual middleware to the user in the cloud architecture is established, the address is configured as the address corresponding to the common channel, and is configured as the address corresponding to the common channel.
  • the shared channel configuration allows attribute information of the user who accesses the address; the attribute information includes at least one of the logical computer room where the user is located, the physical computer room where the user is located, and the geographical area where the user is located.
  • dedicated channels are divided into dedicated channels for LDC tenants and dedicated channels for non-LDC tenants.
  • the establishment process specifically includes: for each address of the virtual middleware, when establishing the exclusive channel from the address of the virtual middleware to the LDC tenant in the cloud architecture, This address is configured as the address corresponding to the dedicated channel, and the LDC tenant that needs to establish the dedicated channel is determined as the LDC tenant that is allowed to access this address, and the LDC tenant that is allowed to access this address is configured for the dedicated channel.
  • Attribute information includes at least one of the tenant to which the LDC tenant belongs, the logical computer room where the LDC tenant is located, the physical computer room where the LDC tenant is located, and the geographical area where the LDC tenant is located.
  • the establishment process specifically includes: for each address of the virtual middleware, when establishing a dedicated channel from the address of the virtual middleware to the non-LDC tenant in the cloud architecture , configure the address as the address corresponding to the dedicated channel, determine the non-LDC tenant who needs to establish the dedicated channel as the non-LDC tenant allowed to access the address, configure the dedicated channel to allow access to the address
  • the attribute information of the non-LDC tenant includes at least one of the tenant to which the non-LDC tenant belongs, the physical computer room where the non-LDC tenant is located, and the geographical area where the non-LDC tenant is located.
  • the central management and control area creates virtual middleware 1 and assigns IP addresses (IP1 to IP4) to virtual middleware 1.
  • Tenant 1 is an LDC tenant
  • tenant 2 is an LDC tenant.
  • Configure IP1 ⁇ IP4 as follows: Channel 1: Configure channel 1 between virtual middleware 1 and the user whose tenant is tenant 1 as a dedicated channel for LDC tenants. Connect one of the logical computer rooms of tenant 1 (i.e.
  • Channel 4 Configuration Channel 4 between virtual middleware 1 and the user whose tenant is tenant 2 is a shared channel.
  • Configure IP3 as the address corresponding to channel 4.
  • channel 5 Configure channel 5 between virtual middleware 1 and the user whose tenant is tenant 2 as a dedicated channel for non-LDC tenants.
  • Region 3 and tenant 2 are configured as channel 5 to allow access to the attribute information of IP4 users;
  • channel 6 configure channel 6 between virtual middleware 1 and users whose tenant is tenant 1 as a dedicated channel for LDC tenants , configure one of the logical computer rooms (area 4-4), physical computer room 4, area 1, and tenant 1 of tenant 1 as channel 6 to allow access to the attribute information of IP4 users.
  • the corresponding addressing logic is as follows: for each channel, use the addressing middleware to determine whether the configuration of the channel contains at least one attribute information of the user who sent the addressing request. If so, , determine that the channel is a channel that matches the attribute information of the user who sent the addressing request, otherwise, determine that the channel is not a channel that matches the attribute information of the user that sent the addressing request, and will match the attribute information of the user who sent the addressing request.
  • the address corresponding to the channel whose attribute information of the requested user matches is determined to be the address of the addressed virtual middleware.
  • the common channel is a channel created directly by the cloud provider for the virtual middleware. That is, the cloud service provider directly configures the attribute information of the user who is allowed to access the virtual middleware address for the common channel. If the user wants to access The shared channel obtains the address of the virtualization middleware corresponding to the shared channel, and determines whether the cloud service provider's configuration for the shared channel contains at least one attribute information of the user who sent the addressing request. If so, the user can access The common channel obtains the address of the virtual middleware. Otherwise, the user cannot access the common channel to obtain the address of the virtual middleware.
  • the dedicated channel means that the user needs to create a channel between the user and the virtual middleware.
  • the cloud service provider then establishes a channel between the user and the virtual middleware for the user.
  • the cloud service provider will need the attribute information of the user who creates the channel.
  • the attribute information of the user configured as the private channel to allow access to the virtual middleware address. If other users want to access the private channel to obtain the address of the virtualized middleware corresponding to the private channel, determine whether the shared channel is configured. Whether it contains at least one attribute information of the user who sent the addressing request, that is, whether the attribute information of the user who created the exclusive channel contains at least one attribute information of the user who sent the addressing request. If so, the user can Access the common channel to obtain the address of the virtual middleware. Otherwise, the user cannot access the common channel to obtain the address of the virtual middleware.
  • the tenant to which user A belongs is tenant 1
  • the tenant to which user B belongs is tenant 2
  • the attribute information of user A is area 1-1 (that is, the logical computer room to which B belongs)
  • physical computer room 1 that is, the logical computer room to which B belongs
  • tenant 1 the attribute information of user A is area 1-1 (that is, the logical computer room to which B belongs)
  • physical computer room 1 region 1
  • tenant 1 user B’s attribute information is physical computer room 7, region 1, tenant 2.
  • channel 1 For channel 1, through the addressing middleware, it is determined that the type of channel 1 is a dedicated channel, and it is determined that the logical computer room (area 1-1) in the attribute information of user A is not the same as the attribute information of the user who is allowed to access IP1 in channel 1.
  • channel 2 For channel 2, through the addressing middleware, it is determined that the type of channel 2 is a shared channel. It is determined that the attribute information of user B in the physical computer room 7 is different from the attribute information of the user who is allowed to access IP1 in channel 2. Continue to determine the attribute information of user B. The attribute information of region 1 in the attribute information and the attribute information of users allowed to access IP1 by channel 2 are different. Continue to determine that the attribute information of tenant 2 in the attribute information of user B is the same as the attribute information of users allowed to access IP1 by channel 2, so IP1 is returned to user B.
  • the method further includes determining environmental filtering conditions corresponding to the established channel. Before determining that the channel is a channel that matches the attribute information of the user who sent the addressing request, the method further includes: determining that the environment where the user who sent the addressing request is located satisfies the environment filtering condition corresponding to the channel.
  • the environment refers to the difference in the production link between different users belonging to the same tenant.
  • user C, user D, user E and user F all belong to the same tenant, but the production link where user C is located
  • the link is development, the production link where user D and user F are in is testing, and the production link where user E is in is operation and maintenance, then user D and user F belong to the same environment, and user C and other users (users D ⁇ F) Do not belong to the same environment.
  • User E and other users do not belong to the same environment.
  • the environment corresponding to a channel is testing, then user D and user F belong to the same environment as the channel, while user C and user E belong to different environments from the channel.
  • the environment filtering condition means that the user who sends the addressing request and the channel for addressing access are in the same environment, only then can it be determined that the channel matches the attribute information of the user who sends the addressing request; if the user who sends the addressing request If the user and the channel accessed by the addressing are in different environments, it cannot be determined that the channel matches the attribute information of the user who sent the addressing request.
  • a test case is created based on the configuration in the above step S104.
  • the central management and control area can run the test case through the addressing middleware.
  • the middleware can obtain the address of the virtual middleware through step S106. Before proceeding to step S106, it can determine whether the environment of the user who sent the addressing request satisfies the environmental filtering conditions corresponding to the channel. If satisfied, continue to execute step S106. , if not satisfied, it is determined that the channel does not match the attribute information of the user who sent the addressing request.
  • step S106 if the configuration of the channel contains at least one attribute information of the user who sent the addressing request, continue to determine whether the environment of the user who sent the addressing request satisfies the environment corresponding to the channel. If the filtering condition is met, it is determined that the channel matches the attribute information of the user who sent the addressing request; if it is not met, it is determined that the channel does not match the attribute information of the user who sent the addressing request.
  • the address of the middleware can be determined as the test address, and finally the test address can be compared with the standard address to complete the test.
  • Figure 5 is a schematic diagram of an addressing test device provided in this specification, which specifically includes: a creation module 501, used to create a virtual middleware in response to a received virtual middleware creation request; a configuration module 502, used to respond to the virtual middleware Configuration request of the software, select at least one actual address from the actual addresses of each node included in the cloud architecture as the address of the virtual middleware, and establish the virtual middleware according to the address of the virtual middleware A channel to users in the cloud architecture; the running module 503 is used to run test cases through the addressing middleware when testing the addressing middleware; the test cases include a method for testing the addressing middleware.
  • a creation module 501 used to create a virtual middleware in response to a received virtual middleware creation request
  • a configuration module 502 used to respond to the virtual middleware Configuration request of the software, select at least one actual address from the actual addresses of each node included in the cloud architecture as the address of the virtual middleware, and establish the virtual middleware according to the address of the virtual middle
  • the virtual middleware performs an addressing request for addressing; the addressing module 504 is configured to use the addressing middleware to determine the addressed address based on the attribute information of the user who sends the addressing request and the channel.
  • the address of the virtual middleware is used as the test address; the comparison module 505 is used to compare the test address with the standard address to obtain the test result of the addressing middleware; the standard address is based on sending the addressing middleware in advance.
  • the attribute information of the user requested by the address and the channel are determined.
  • the channel includes a shared channel;
  • the configuration module 502 is specifically configured to, for each address of the virtual middleware, when establishing the address of the virtual middleware to the user in the cloud architecture
  • configure the address as the address corresponding to the shared channel, and configure the attribute information of the user who is allowed to access the address for the shared channel
  • the attribute information includes the logical computer room where the user is located, and the physical computer room where the user is located. , at least one of the geographical areas where the user is located.
  • the channel includes a dedicated channel;
  • the users in the cloud architecture include logical control center LDC users;
  • the configuration module 502 is specifically configured to, for each address of the virtual middleware, when establishing the virtual middleware.
  • the address of the middleware reaches the dedicated channel of the LDC user in the cloud architecture, the address is configured as the address corresponding to the dedicated channel, and the LDC user who needs to establish the dedicated channel is determined to be allowed access.
  • the attribute information includes the tenant to which the LDC user belongs, the logical computer room where the LDC user is located, the physical computer room where the LDC user is located, and the LDC At least one of the geographical areas where the user is located.
  • the channel includes a dedicated channel; users in the cloud architecture include non-logical control center LDC users; the configuration module 502 is specifically configured to, for each address of the virtual middleware, when establishing all When the address of the virtual middleware reaches the private channel of a non-LDC user in the cloud architecture, configure the address as the address corresponding to the private channel, and assign the non-LDC user who needs to establish the private channel For the non-LDC users determined to be allowed to access the address, configure the attribute information of the non-LDC users allowed to access the address for the dedicated channel; the attribute information includes the tenant to which the non-LDC user belongs, the physical computer room where the non-LDC user is located, At least one of the geographical areas where non-LDC users are located.
  • the addressing module 504 is specifically configured to, for each channel, determine through the addressing middleware whether the configuration of the channel contains at least one attribute information of the user who sent the addressing request, If so, determine that the channel is a channel that matches the attribute information of the user who sent the addressing request; otherwise, determine that the channel is not a channel that matches the attribute information of the user that sent the addressing request; The address corresponding to the channel that matches the attribute information of the user in the address request is determined to be the address of the addressed virtual middleware.
  • the configuration module 502 is also configured to, after establishing a channel from the virtual middleware to the user in the cloud architecture, determine the environment filtering conditions corresponding to the established channel; the addressing module 504 also uses Before determining that the channel is a channel that matches the attribute information of the user who sent the addressing request, it is determined that the environment where the user who sent the addressing request satisfies the environment filtering condition corresponding to the channel.
  • the address of the virtual middleware includes more than two actual addresses; the comparison module 505 is specifically used to determine whether the test address obtained by addressing corresponds to the standard address; if so, determine whether the The addressing result of the addressing middleware is accurate. If not, it is determined that the addressing result of the addressing middleware is inaccurate.
  • This specification also provides a computer-readable storage medium that stores a computer program.
  • the computer program can be used to execute the addressing test method provided in Figure 1 above.
  • the unmanned driving equipment includes a processor, internal bus, network interface, memory and non-volatile storage, and of course may also include other hardware required by the business.
  • the processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to implement the addressing test method described in Figure 1 above.
  • this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc. That is to say, the execution subject of the following processing flow is not limited to each logical unit, and may also be hardware or logic device.
  • PLD Programmable Logic Device
  • FPGA Field Programmable Gate Array
  • HDL Hardware Description Language
  • HDL High-Speed Integrated Circuit Hardware Description Language
  • ABEL Advanced Boolean Expression Language
  • AHDL Advanced Boolean Expression Language
  • Confluence CUPL
  • HDCal Component Description Language
  • JHDL Java Hardware Description Language
  • Lava Lava
  • Lola MyHDL
  • PALASM RHDL
  • VHDL Very-High-Speed Integrated Circuit Hardware Description Language
  • Verilog Verilog
  • the controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code (eg, software or firmware) executable by the (micro)processor. , logic gates, switches, Application Specific Integrated Circuit (ASIC), programmable logic controllers and embedded microcontrollers.
  • controllers include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, For Microchip PIC18F26K20 and Silicone Labs C8051F320, the memory controller can also be implemented as part of the memory's control logic.
  • the controller in addition to implementing the controller in the form of pure computer-readable program code, the controller can be completely programmed with logic gates, switches, application-specific integrated circuits, programmable logic controllers and embedded logic by logically programming the method steps. Microcontroller, etc. to achieve the same function. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be considered as structures within the hardware component. Or even, the means for implementing various functions can be considered as structures within hardware components as well as software modules implementing the methods.
  • a typical implementation device is a computer.
  • the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or A combination of any of these devices.
  • embodiments of the present application may be provided as methods, systems, or computer program products. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment that combines software and hardware aspects. Furthermore, the present application may employ computer-usable program code embodied therein in one or more The form of a computer program product implemented on a computer usable storage medium (including but not limited to disk storage, CD-ROM, optical storage, etc.).
  • These computer program instructions may also be stored in a computer-readable memory that causes a computer or other programmable data processing apparatus to operate in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction means, the instructions
  • the device implements the functions specified in a process or processes of the flowchart and/or a block or blocks of the block diagram.
  • These computer program instructions may also be loaded onto a computer or other programmable data processing device, causing a series of operating steps to be performed on the computer or other programmable device to produce computer-implemented processing, thereby executing on the computer or other programmable device.
  • Instructions provide steps for implementing the functions specified in a process or processes of a flowchart diagram and/or a block or blocks of a block diagram.
  • a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
  • processors CPUs
  • input/output interfaces network interfaces
  • memory volatile and non-volatile memory
  • Memory may include non-permanent storage in computer-readable media, random access memory (RAM) and/or non-volatile memory in the form of read-only memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
  • RAM random access memory
  • ROM read-only memory
  • flash RAM flash random access memory
  • Computer-readable media includes both persistent and non-volatile, removable and non-removable media that can be implemented by any method or technology for storage of information.
  • Information may be computer-readable instructions, data structures, modules of programs, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), and read-only memory.
  • PRAM phase change memory
  • SRAM static random access memory
  • DRAM dynamic random access memory
  • RAM random access memory
  • read-only memory read-only memory
  • ROM read-only memory
  • EEPROM electrically erasable programmable read-only memory
  • flash memory or other memory technology
  • compact disc read-only memory CD-ROM
  • DVD digital versatile disc
  • Magnetic tape cassettes tape magnetic disk storage or other magnetic storage devices or any other non-transmission medium can be used to store information that can be accessed by a computing device.
  • computer-readable media does not include transitory media, such as modulated data signals and carrier waves.
  • embodiments of the present specification may be provided as methods, systems, or computer program products.
  • the present description may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment that combines software and hardware aspects.
  • the present description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk memory, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
  • program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types.
  • the present description may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through communications networks.
  • program modules may be located in both local and remote computer storage media including storage devices.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本说明书公开了一种寻址测试的方法、装置、存储介质及电子设备,在本说明书提供的寻址测试方法中,根据云架构中的真实地址创建虚拟中间件,并建立虚拟中间件到云架构中的用户的通道,通过寻址中间件,基于寻址的用户的属性信息以及通道确定寻址到的虚拟中间件的地址,作为测试地址,根据寻址用户的属性信息以及通道确定标准地址,对比测试地址与标准地址得到测试结果,从而完成对寻址中间件的测试。从上述方法中可以看出,本方法通过获取真实节点实现对云架构中的中间件与用户之间的通道的模拟,对寻址中间件的寻址结果进行了准确的测试,并且本方法不限制于实际应用场景,可任意扩展,即保证了准确性又节省了成本,还有利于隐私保护。

Description

一种寻址测试的方法、装置、存储介质及电子设备 技术领域
本申请涉及计算机领域,特别涉及一种寻址测试的方法、装置、存储介质及电子设备。
背景技术
随着互联网技术和数字化经济的不断发展,各行业业务形态走向开放和互联网化,为了应对互联网业务形态下突发性业务对资源的弹性需求,分布式架构逐渐进化成弹性混合云架构,即分布式架构和云原生结合。
在云原生时代,云运营商在保护用户隐私的同时提供了很多方便快捷的中间件以便更好的为用户服务,用户通过标准化的应用程序编程接口(Application Programming Interface,API)就可以完成对中间件的调用,从而获得调用的中间件提供的服务。
除了为用户提供服务的中间件,还有一种特殊的中间件,它的功能是为用户寻找用户因此寻址中间件能否精准地定位需要调用的中间件的地址对用户而言是非常重要的,即寻址中间件的寻址准确性对所有用户的影响至关重要,所以如何对寻址中间件的寻址准确性进行测试是一个亟待解决的问题。
发明内容
本说明书提供一种寻址测试方法、装置、存储介质及电子设备,以至少部分的解决相关技术存在的上述问题。
本说明书采用下述技术方案:本说明书提供了一种寻址测试方法,包括:响应于接收的虚拟中间件的创建请求,创建虚拟中间件;响应于所述虚拟中间件的配置请求,在所述云架构包含的各节点的实际地址中,选择至少一个实际地址,作为所述虚拟中间件的地址,并根据所述虚拟中间件的地址,建立所述虚拟中间件到所述云架构中的用户的通道;当对所述寻址中间件进行测试时,通过所述寻址中间件运行测试用例;所述测试用例中包含用于对所述虚拟中间件进行寻址的寻址请求;通过所述寻址中间件,基于发送所述寻址请求的用户的属性信息以及所述通道,确定寻址到的所述虚拟中间件的地址,作为测试地址;将所述测试地址与标准地址进行对比,得到所述寻址中间件的测试结果;所述标准地址是预先根据所述用户的属性信息以及所述通道确定的。
可选地,所述通道包括共有通道;建立所述虚拟中间件到所述云架构中的用户的通道,具体包括:针对所述虚拟中间件的每个地址,当建立所述虚拟中间件的该地址到所述云架构中的用户的共有通道时,将该地址配置为所述共有通道对应的地址,并为所述共有通道配置允许访问该地址的用户的属性信息;所述属性信息包括用户所在的逻辑机房、用户所在的物理机房、用户所在的地理区域中的至少一种。
可选地,所述通道包括专有通道;所述云架构中的用户包括逻辑控制中心LDC用户;建立所述虚拟中间件到所述云架构中的用户的通道,具体包括:针对所述虚拟中间件的每个地址,当建立所述虚拟中间件的该地址到所述云架构中的LDC用户的专有通道时,将该地址配置为所述专有通道对应的地址,并将需要建立所述专有通道的LDC用户确定为允许访问该地址的LDC用户,为所述专有通道配置允许访问该地址的LDC用户的属性信息;所述属性信息包括LDC用户所属的租户、LDC用户所在的逻辑机房、LDC用户所在的物理机房、LDC用户所在的地理区域中的至少一种。
可选地,所述通道包括专有通道;所述云架构中的用户包括非逻辑控制中心LDC用户;建立所述虚拟中间件到所述云架构中的用户的通道,具体包括:针对所述虚拟中间件的每个地址,当建立所述虚拟中间件的该地址到所述云架构中的非LDC用户的专有通道时,将该地址配置为所述专有通道对应的地址,并将需要建立所述专有通道的非LDC用户确定为允许访问该地址的非LDC用户,为所述专有通道配置允许访问该地址的非LDC用户的属性信息;所述属性信息包括非LDC用户所属的租户、非LDC用户所在的物理机房、非LDC用户所在的地理区域中的至少一种。
可选地,通过所述寻址中间件,基于发送所述寻址请求的用户的属性信息以及所述通道,确定寻址到的所述虚拟中间件的地址,具体包括:针对每个通道,通过所述寻址中间件,判断该通道的配置中是否包含发送所述寻址请求的用户的至少一种属性信息,若是,确定该通道为与发送所述寻址请求的用户的属性信息匹配的通道,否则,确定该通道不是与发送所述寻址请求的用户的属性信息匹配的通道;将与发送所述寻址请求的用户的属性信息匹配的通道对应的地址确定为寻址到的所述虚拟中间件的地址。
可选地,建立所述虚拟中间件到所述云架构中的用户的通道之后,所述方法还包括:确定建立的通道对应的环境筛选条件;确定该通道为与发送所述寻址请求的用户的属性信息匹配的通道之前,所述方法还包括:确定发送所述寻址请求的用户所在的环境满足该通道对应的环境筛选条件。
可选地,所述虚拟中间件的地址包括两个以上的实际地址;将所述测试地址与标准地址进行对比,得到所述寻址中间件的测试结果,具体包括:判断寻址得到的测试地址与所述标准地址是否一一对应;若是,确定所述寻址中间件的寻址结果准确,若否,确定所述寻址中间件的寻址结果不准确。
本说明书提供了一种寻址测试装置,包括:创建模块,用于响应接收的虚拟中间件的创建请求,创建虚拟中间件;配置模块,用于响应所述虚拟中间件的配置请求,在所述云架构包含的各节点的实际地址中,选择至少一个实际地址,作为所述虚拟中间件的地址,并根据所述虚拟中间件的地址,建立所述虚拟中间件到所述云架构中的用户的通道;运行模块,用于当对所述寻址中间件进行测试时,通过所述寻址中间件运行测试用例;所述测试用例中包含用于对所述虚拟中间件进行寻址的寻址请求;寻址模块,用于 通过所述寻址中间件,基于发送所述寻址请求的用户的属性信息以及所述通道,确定寻址到的所述虚拟中间件的地址,作为测试地址;对比模块,用于将所述测试地址与标准地址进行对比,得到所述寻址中间件的测试结果;所述标准地址是预先根据发送所述寻址请求的用户的属性信息以及所述通道确定的。
可选地,所述通道包括共有通道;所述配置模块具体用于,针对所述虚拟中间件的每个地址,当建立所述虚拟中间件的该地址到所述云架构中的用户的共有通道时,将该地址配置为所述共有通道对应的地址,并为所述共有通道配置允许访问该地址的用户的属性信息;所述属性信息包括用户所在的逻辑机房、用户所在的物理机房、用户所在的地理区域中的至少一种。
可选地,所述通道包括专有通道;所述云架构中的用户包括逻辑控制中心LDC用户;所述配置模块具体用于,针对所述虚拟中间件的每个地址,当建立所述虚拟中间件的该地址到所述云架构中的LDC用户的专有通道时,将该地址配置为所述专有通道对应的地址,并将需要建立所述专有通道的LDC用户确定为允许访问该地址的LDC用户,为所述专有通道配置允许访问该地址的LDC用户的属性信息;所述属性信息包括LDC用户所属的租户、LDC用户所在的逻辑机房、LDC用户所在的物理机房、LDC用户所在的地理区域中的至少一种。
可选地,所述通道包括专有通道;所述云架构中的用户包括非逻辑控制中心LDC用户;所述配置模块具体用于,针对所述虚拟中间件的每个地址,当建立所述虚拟中间件的该地址到所述云架构中的非LDC用户的专有通道时,将该地址配置为所述专有通道对应的地址,并将需要建立所述专有通道的非LDC用户确定为允许访问该地址的非LDC用户,为所述专有通道配置允许访问该地址的非LDC用户的属性信息;所述属性信息包括非LDC用户所属的租户、非LDC用户所在的物理机房、非LDC用户所在的地理区域中的至少一种。
可选地,所述寻址模块具体用于,针对每个通道,通过所述寻址中间件,判断该通道的配置中是否包含发送所述寻址请求的用户的至少一种属性信息,若是,确定该通道为与发送所述寻址请求的用户的属性信息匹配的通道,否则,确定该通道不是与发送所述寻址请求的用户的属性信息匹配的通道;将与发送所述寻址请求的用户的属性信息匹配的通道对应的地址确定为寻址到的所述虚拟中间件的地址。
可选地,所述配置模块还用于,在建立所述虚拟中间件到所述云架构中的用户的通道之后,确定建立的通道对应的环境筛选条件;所述寻址模块还用于,在确定该通道为与发送所述寻址请求的用户的属性信息匹配的通道之前,确定发送所述寻址请求的用户所在的环境满足该通道对应的环境筛选条件。
可选地,所述虚拟中间件的地址包括两个以上的实际地址;所述对比模块具体用于,判断寻址得到的测试地址与所述标准地址是否一一对应;若是,判定所述寻址中间件的 寻址结果准确,若否,判定所述寻址中间件的寻址结果不准确。
本说明书提供了一种计算机可读存储介质,所述存储介质存储有计算机程序,所述计算机程序被处理器执行时实现上述寻址测试方法。
本说明书提供了一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现上述寻址测试方法。
本说明书采用的上述至少一个技术方案能够达到以下有益效果:在本说明书提供的寻址测试方法中,根据云架构中的真实地址创建虚拟中间件,根据所述虚拟中间件的地址建立所述虚拟中间件到云架构中的用户的通道,通过寻址中间件,基于发送寻址请求的用户的属性信息以及所述通道,确定寻址到的所述虚拟中间件的地址,作为测试地址,根据发送所述寻址请求的用户的属性信息以及所述通道确定标准地址,将测试地址与标准地址进行对比,得到寻址中间件的测试结果,从而完成了对寻址中间件的测试。
从上述方法中可以看出,本方法通过获取真实节点实现对云架构中的中间件与用户之间的通道的模拟,对寻址中间件的寻址结果进行了准确的测试,并且本方法不限制于实际应用场景,可任意扩展,即保证了准确性又节省了成本。
附图说明
此处所说明的附图用来提供对本说明书的进一步理解,构成本说明书的一部分,本说明书的示意性实施例及其说明用于解释本说明书,并不构成对本说明书的不当限定。在附图中:
图1为本说明书中一种寻址测试方法的流程示意图;
图2为本说明书中提供的一种给虚拟中间件分配实际地址的示意图;
图3为本说明书中提供的一种配置完成的虚拟中间件的示意图;
图4为本说明书中提供的一种建立通道的示意图;
图5为本说明书提供的一种寻址测试装置的示意图;
图6为本说明书提供的对应于图1的电子设备示意图。
具体实施方式
为使本说明书的目的、技术方案和优点更加清楚,下面将结合本说明书具体实施例及相应的附图对本说明书技术方案进行清楚、完整地描述。显然,所描述的实施例仅是本说明书一部分实施例,而不是全部的实施例。基于本说明书中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
以下结合附图,详细说明本说明书各实施例提供的技术方案。
图1为本说明书提供的一种寻址测试方法的流程示意图,具体包括以下步骤S100至步骤S108。
S100:响应于接收的虚拟中间件的创建请求,创建虚拟中间件。
为了不影响实际中间件正常运行为用户提供服务,进行寻址测试前,可先创建虚拟中间件。所谓的中间件是连接两个独立应用程序或独立系统软件的一种独立的系统软件或服务程序,用于管理计算机资源和网络通讯,分布式应用软件借助这种软件在不同的技术之间共享资源。本说明书实施例中创建的虚拟中间件是根据云架构中的真实节点创建的中间件,并不实际为用户提供服务,但具有实际地址,用于测试寻址中间件的寻址准确性。
具体的,可向云架构中的中央管控区发送用于创建虚拟中间件的创建请求,中央管控区响应于创建虚拟中间件的请求创建虚拟中间件,模拟实际中间件用于寻址测试。
另外,在进行测试前,可先对与本次测试无关且不影响实际中间件运行的数据进行清理,这些无关数据可能是之前测试产生的。测试前清理无关数据可以避免无关数据对测试结果产生影响,进而导致测试结果不准确。
S102:响应于所述虚拟中间件的配置请求,在所述云架构包含的各节点的实际地址中,选择至少一个实际地址,作为所述虚拟中间件的地址,并根据所述虚拟中间件的地址,建立所述虚拟中间件到所述云架构中的用户的通道。
通过步骤S100在中央管控区中创建了虚拟中间件后,虽然该虚拟中间件并不实际为用户提供服务,但一定要具有地址,否则无法用于寻址测试。因此中央管控区创建虚拟中间件后,还需要配置虚拟中间件的地址。
为保证测试的真实性,中央管控区给虚拟中间件分配的地址,是在云架构包含的各节点的实际地址中选择的,选择至少一个实际地址作为所述虚拟中间件的地址。所述地址可以是网络互联协议(Internet Protocol,IP)地址,用户获得一个中间件的IP地址后,就可以通过该中间件的IP地址访问该中间件获得服务了。如图2所示,创建了包括虚拟中间件1~3在内的多个虚拟中间件,对于虚拟中间件1,可选择4个实际地址配置为该虚拟中间件1的地址,这4个实际地址分别是位于地区1的物理机房1内的节点的IP1和IP2,以及位于地区2的物理机房2内的节点IP3和IP4。
虚拟中间件拥有地址后,还需要模拟寻址中间件的寻址逻辑建立虚拟中间件与用户之间的通道才能用于寻址测试。因此,给虚拟中间件分配实际地址后,中央管控区还需要建立所述虚拟中间件到云架构中的用户的通道建立好的通道如图3所示,中央管控区建立了虚拟中间件1到云架构中的用户A的通道1、通道2、通道3,中央管控区建立了虚拟中间件1到云架构中的用户B的通道4、通道5、通道6。通道是中间件和用户之间的对应关系,建立通道是指建立中间件的地址与符合条件的用户的属性信息之间的对应关系,如图3所示,通道1是虚拟中间件1的地址IP1与用户A的属性信息1的对 应关系,通道2是虚拟中间件1的地址IP1与用户B的属性信息2的对应关系,通道3是虚拟中间件1的地址IP2与用户A的属性信息1的对应关系,通道4是虚拟中间件1的地址IP3与用户B的属性信息2的对应关系,通道5是虚拟中间件1的地址IP4与用户B的属性信息2的对应关系,通道6是虚拟中间件1的地址IP4与用户A的属性信息1的对应关系。通过中间件的地址与符合条件的用户的属性信息之间的对应关系,寻址中间件就可以通过用户自身的属性信息获得该属性信息对应的中间件的地址,以达到寻址的目的。
S104:当对所述寻址中间件进行测试时,通过所述寻址中间件运行测试用例;所述测试用例中包含用于对所述虚拟中间件进行寻址的寻址请求。
在预先通过上述S100和S102创建了虚拟中间件并配置了虚拟中间件的地址和通道后,即可基于上述配置的虚拟中间件对寻址中间件进行测试。
具体的,在测试寻址中间件之前,可先创建测试用例,所述测试用例至少包含用户对所述虚拟中间件进行寻址的寻址请求,除此之外,还可包括发送该寻址请求的用户的用户标识,也可以包含发送该寻址请求的用户的属性信息。
在测试的过程中,中央管控区可通过寻址中间件运行测试用例,寻址中间件即可通过下述的步骤S106得到虚拟中间件的地址。
S106:通过所述寻址中间件,基于发送所述寻址请求的用户的属性信息以及所述通道,确定寻址到的所述虚拟中间件的地址,作为测试地址。
当上述创建的测试用例中包含用户发送的寻址请求及发送该寻址请求的用户的属性信息时,寻址中间件运行测试用例后,即可获得该用户的属性信息,因此寻址中间件可根据步骤S102中为虚拟中间件配置的通道(即中间件的地址与符合条件的用户的属性信息之间的对应关系)查询该用户的属性信息对应的虚拟中间件的IP地址,将得到的虚拟中间件的IP地址作为测试地址。
当上述创建的测试用例中包含用户发送的寻址请求及发送该寻址请求的用户的用户标识时,寻址中间件运行测试用例后,可根据该用户的用户标识,查找该用户的属性信息,查找到该用户的属性信息后,寻址中间件可根据步骤S102中为虚拟中间件配置的通道查询该用户的属性信息对应的虚拟中间件的IP地址,将得到的虚拟中间件的IP地址作为测试地址。
S108:将所述测试地址与标准地址进行对比,得到所述寻址中间件的测试结果;所述标准地址是预先根据发送寻址请求的用户的属性信息以及所述通道确定的。
在本说明书实施例中,通过上述步骤102配置了虚拟中间件的IP地址和通道后,可人工确定测试用例中用户的属性信息对应的虚拟中间件的地址,该地址就是标准地址。则步骤S106寻址中间件得到测试地址后,可直接将得到的测试地址与标准地址进行对 比,若二者相同,则说明寻址中间件的寻址结果准确,否则说明寻址中间件的寻址结果不准确。
如果所述虚拟中间件的地址包括两个以上的实际地址,则可判断寻址得到的测试地址与所述标准地址是否一一对应,若是,确定所述寻址中间件的寻址结果准确,若否,确定所述寻址中间件的寻址结果不准确。
例如,如图3所示,用户A需要寻找虚拟中间件1的地址,虚拟中间件1的实际节点IP地址为IP1、IP2、IP3和IP4,根据预先配置的通道,可确定标准地址是IP1、IP2和IP4,那么,寻址中间件根据用户A的属性信息及用户A与虚拟中间件1之间的通道寻址到的地址如果是IP1、IP2和IP4,说明测试结果准确,否则,假设寻址中间件寻址到的结果只有IP1、IP2、IP4中的一个或两个,甚至是未寻址到任何地址,亦或是寻址到的测试结果中包括了IP4,则都说明寻址中间件的寻址结果不准确。
可选地,测试结束后,还可以对用于测试上述寻址中间件的测试数据进行清理,防止对其他操作造成影响,例如,清理步骤S100和步骤S102中中央管控区创建的虚拟中间件以及为虚拟中间件配置的地址和通道,也可以清理步骤S104中创建的测试用例,还可以清理步骤S106和步骤S108中确定的测试地址和标准地址。
从上述方法中可以看出,本方法通过获取真实节点实现对云架构中的中间件与用户之间的通道的模拟,对寻址中间件的寻址结果进行了准确的测试,并且本方法不限制于实际应用场景,可任意扩展,因为本方法用于测试的中间件是临时创建出来的虚拟中间件,根据测试需要可以创建任意数量的虚拟中间件,也可以创建任意种类的虚拟中间件,又可以任意配置这些虚拟中间件的地址和通道,这些虚拟中间件及其地址和通道既不影响实际中间件的运行又能顺利进行测试,既保证了测试准确性又节省了成本。
上述步骤S102中,中央管控区对已创建的虚拟中间件进行了配置,给虚拟中间件分配实际地址后建立了所述虚拟中间件到所述云架构中的用户的通道(即中间件的地址与符合条件的用户的属性信息之间的对应关系)。在实际应用中,如果建立的通道的类型都相同,寻址中间件可以完成基本的寻址功能,但相应地,寻址中间件的寻址效率比较低。
在实际应用中,由于云服务提供商为很多不同的租户提供服务,所以不同租户之间需要加以区分,区分不同租户被称为租户隔离,租户隔离是指一个租户操作云计算资源的行为,其他租户感知不到。根据租户隔离的条件不同可将用户分为逻辑控制中心(Logic Data Center,LDC)租户与非逻辑控制中心(Logic Data Center,LDC)租户,二者的区别是,非LDC租户以用户的物理机房作为租户隔离的必要条件,而LDC租户可以以用户的逻辑机房对租户进行隔离。物理机房是实际存在的机房,存放着很多主机,云服务提供商将自己的云资源提供给用户,逻辑机房本质上是将物理机房进行逻辑拆分,将一个或多个较大的物理机房假象为更多个较小的机房,通过区域分组实现将物理机房 进行逻辑拆分。
针对上述不同租户类型的用户,如果建立的虚拟中间件与用户之间的通道都相同,可能会出现不同租户类型的用户排队等待访问同一个通道的情况,寻址中间件的寻址效率较低,如果将通道分类,不同类型用户通过寻址中间件寻址时可以通过访问不同通道得到地址,可提高寻址中间件的寻址效率。为使寻址中间件的寻址效率提高,可选地,可将建立的通道分为两种:共有通道和专有通道。
将中央管控区直接为虚拟中间件建立的通道命名为共有通道,将用户需要使用虚拟中间件所以中央管控区响应用户的建立通道请求后创建的虚拟化中间件到该用户的通道命名为专有通道,建立过程具体可以如下所述。
建立所述虚拟中间件到所述云架构中的用户的共有通道的过程具体包括:
针对所述虚拟中间件的每个地址,当建立所述虚拟中间件的该地址到所述云架构中的用户的共有通道时,将该地址配置为所述共有通道对应的地址,并为所述共有通道配置允许访问该地址的用户的属性信息;所述属性信息包括用户所在的逻辑机房、用户所在的物理机房、用户所在的地理区域中的至少一种。
根据用户所属的租户类型不同将专有通道分为针对LDC租户的专有通道和针对非LDC租户的专有通道。
针对LDC租户的专有通道,建立过程具体包括:针对所述虚拟中间件的每个地址,当建立所述虚拟中间件的该地址到所述云架构中的LDC租户的专有通道时,将该地址配置为所述专有通道对应的地址,并将需要建立所述专有通道的LDC租户确定为允许访问该地址的LDC租户,为所述专有通道配置允许访问该地址的LDC租户的属性信息;所述属性信息包括LDC租户所属的租户、LDC租户所在的逻辑机房、LDC租户所在的物理机房、LDC租户所在的地理区域中的至少一种。
针对非LDC租户的专有通道,建立过程具体包括:针对所述虚拟中间件的每个地址,当建立所述虚拟中间件的该地址到所述云架构中的非LDC租户的专有通道时,将该地址配置为所述专有通道对应的地址,并将需要建立所述专有通道的非LDC租户确定为允许访问该地址的非LDC租户,为所述专有通道配置允许访问该地址的非LDC租户的属性信息;所述属性信息包括非LDC租户所属的租户、非LDC租户所在的物理机房、非LDC租户所在的地理区域中的至少一种。
具体地,如图4所示,如步骤S100和S102所述,中央管控区创建虚拟中间件1并给虚拟中间件1分配了IP地址(IP1~IP4),租户1为LDC租户,租户2为非LDC租户。为IP1~IP4进行如下配置:通道1:配置虚拟中间件1与所属租户为租户1的用户之间的通道1为针对LDC租户的专有通道,将租户1的其中一个逻辑机房(即区域4-1)、物理机房4、地区1、租户1配置为通道1允许访问IP1的用户的属性信息;通道2:配置虚拟中间件1与所属租户为租户2的用户之间的通道2为针对非LDC租户的专有通 道,将租户2的其中一个物理机房(物理机房4)、地区3、租户2配置为通道2允许访问IP1的用户的属性信息;通道3:配置虚拟中间件1与所属租户为租户1的用户之间的通道3为共有通道,将IP2配置为通道3对应的地址,为通道3配置允许访问该地址的用户的属性信息为物理机房1、租户1或租户2、地区1;通道4:配置虚拟中间件1与所属租户为租户2的用户之间的通道4为共有通道,将IP3配置为通道4对应的地址,为通道4配置允许访问该地址的用户的属性信息为物理机房1、租户1或租户2、地区1;通道5:配置虚拟中间件1与所属租户为租户2的用户之间的通道5为针对非LDC租户的专有通道,将租户2的其中一个物理机房(物理机房4)、地区3、租户2配置为通道5允许访问IP4的用户的属性信息;通道6:配置虚拟中间件1与所属租户为租户1的用户之间的通道6为针对LDC租户的专有通道,将租户1的其中一个逻辑机房(区域4-4)、物理机房4、地区1、租户1配置为通道6允许访问IP4的用户的属性信息。
针对上述例子的通道,对应地寻址逻辑如下:针对每个通道,通过所述寻址中间件,判断该通道的配置中是否包含发送所述寻址请求的用户的至少一种属性信息,若是,确定该通道为与发送所述寻址请求的用户的属性信息匹配的通道,否则,确定该通道不是与发送所述寻址请求的用户的属性信息匹配的通道,将与发送所述寻址请求的用户的属性信息匹配的通道对应的地址确定为寻址到的所述虚拟中间件的地址。
需要说明的是,所述共有通道是云提供商直接为虚拟中间件创建的通道,即云服务商直接为所述共有通道配置允许访问该虚拟中间件地址的用户的属性信息,若用户想访问该共有通道获得该共有通道对应的虚拟化中间件的地址,判断云服务商给该共有通道的配置中是否包含发送所述寻址请求的用户的至少一种属性信息,若是,该用户能访问该共有通道获得虚拟中间件的地址,否则,该用户不能访问该共有通道获得虚拟中间件的地址。所述专有通道是用户需要在用户与虚拟中间件之间创建通道,云服务商再为该用户建立该用户与虚拟中间件之间的通道,云服务商将需要创建通道的用户的属性信息配置为所述专有通道允许访问该虚拟中间件地址的用户的属性信息,若其他用户想要访问该专有通道获得该专有通道对应的虚拟化中间件的地址,判断该共有通道配置中是否包含发送所述寻址请求的用户的至少一种属性信息,即创建该专有通道的用户的属性信息是否包含发送所述寻址请求的用户的至少一种属性信息,若是,该用户能访问该共有通道获得虚拟中间件的地址,否则,该用户不能访问该共有通道获得虚拟中间件的地址。
继续沿用上例,具体地,如图4所示,用户A所属的租户是租户1,用户B所属的租户是租户2,用户A的属性信息是区域1-1(即B所属的逻辑机房)、物理机房1、地区1、租户1,用户B属性信息是物理机房7、地区1、租户2。
针对每一个用户,具体寻址如下:
用户A:发送寻址虚拟化中间件1的请求。
针对通道1,通过所述寻址中间件,判断通道1的类型为专有通道,判断用户A的属性信息中的逻辑机房(区域1-1)与通道1允许访问IP1的用户的属性信息不相同,继续判断用户A的属性信息中的物理机房1与通道1允许访问IP1的用户的属性信息不相同,继续判断用户A的属性信息中的地区1与通道1允许访问IP1的用户的属性信息相同,所以返回IP1给用户A;针对通道3,通过所述寻址中间件,判断通道3的类型为共有通道,判断用户A的属性信息中物理机房1与通道3允许访问IP2的用户的属性信息相同,所以返回IP2给用户A;针对通道6,通过所述寻址中间件,判断通道6的类型为专有通道,判断用户A的属性信息中的逻辑机房(区域1-1)与通道6允许访问IP4的用户的属性信息不相同,则继续判断用户A的属性信息中的物理机房1与通道6允许访问IP4的用户的属性信息不相同,继续判断用户A的属性信息中的地区1与通道6允许访问IP4的用户的属性信息相同,所以返回IP4给用户A。
用户B:发送寻址虚拟化中间件1的请求。
针对通道2,通过所述寻址中间件,判断通道2的类型为共有通道,判断用户B的属性信息中物理机房7与通道2允许访问IP1的用户的属性信息不相同,继续判断用户B的属性信息中的地区1与通道2允许访问IP1的用户的属性信息不相同,继续判断用户B的属性信息中的租户2与通道2允许访问IP1的用户的属性信息相同,所以返回IP1给用户B;针对通道4,通过所述寻址中间件,判断通道4的类型为共有通道,判断用户B的属性信息中物理机房7与通道4允许访问IP3的用户的属性信息不相同,继续判断用户B的属性信息中地区1与通道4允许访问IP3的用户的属性信息相同,所以返回IP3给用户B;针对通道5,通过所述寻址中间件,判断通道5的类型为专有通道,判断用户B的属性信息中物理机房7与通道5允许访问IP4的用户的属性信息不相同,继续判断用户B的属性信息中的地区1与通道5允许访问IP4的用户的属性信息不相同,继续判断用户B的属性信息中的租户2与通道5允许访问IP4的用户的属性信息相同,所以返回IP4给用户B。
可选地,建立所述虚拟中间件到所述云架构中的用户的通道之后,所述方法还包括,确定建立的通道对应的环境筛选条件。确定该通道为与发送所述寻址请求的用户的属性信息匹配的通道之前,所述方法还包括:确定发送所述寻址请求的用户所在的环境满足该通道对应的环境筛选条件。
所述环境是指属于同一个租户中的不同的用户之间所处的生产环节的不同,例如,用户C、用户D、用户E和用户F都属于同一个租户,但用户C所处的生产环节是开发,用户D和用户F所处的生产环节是测试,用户E所处的生产环节是运维,则用户D和用户F属于同一个环境,用户C和其他用户(用户D~F)都不属于同一个环境,用户E和其他用户(用户C、D和F)都不属于同一个环境。相应地,如果一个通道对应的环境是测试,那么用户D和用户F与该通道属于同一个环境,而用户C和用户E与该通道属于不同环境。
所述环境筛选条件是指发送寻址请求的用户与寻址访问的通道处于同一个环境下,才能确定该通道为与发送所述寻址请求的用户的属性信息匹配;若发送寻址请求的用户与寻址访问的通道处于不同的环境下,则不能确定该通道与发送所述寻址请求的用户的属性信息匹配。
可选地,如上述步骤S100~102创建虚拟中间件并配置所述虚拟中间件后,在上述步骤S104中基于配置创建了测试用例,中央管控区可通过寻址中间件运行测试用例,寻址中间件即可通过步骤S106得到虚拟中间件的地址,可以在进行步骤S106前,确定发送所述寻址请求的用户所在的环境是否满足该通道对应的环境筛选条件,若满足,继续执行步骤S106,若不满足,则确定该通道与发送所述寻址请求的用户的属性信息不匹配。也可以在进行步骤S106后,若该通道的配置中包含发送所述寻址请求的用户的至少一种属性信息,继续判断发送所述寻址请求的用户所在的环境是否满足该通道对应的环境筛选条件,若满足,确定该通道与发送所述寻址请求的用户的属性信息匹配,若不满足,则确定该通道与发送所述寻址请求的用户的属性信息不匹配。
确定了与上述用户A~C的属性信息匹配的通道后,则可确定中间件的地址,作为测试地址,最后对比测试地址与标准地址完成测试即可。
以上为本说明书的一个或多个实施例提供的寻址测试方法,基于同样的思路,本说明书还提供了相应的寻址测试装置,如图4所示。
图5为本说明书提供的一种寻址测试装置示意图,具体包括:创建模块501,用于响应接收的虚拟中间件的创建请求,创建虚拟中间件;配置模块502,用于响应所述虚拟中间件的配置请求,在所述云架构包含的各节点的实际地址中,选择至少一个实际地址,作为所述虚拟中间件的地址,并根据所述虚拟中间件的地址,建立所述虚拟中间件到所述云架构中的用户的通道;运行模块503,用于当对所述寻址中间件进行测试时,通过所述寻址中间件运行测试用例;所述测试用例中包含用于对所述虚拟中间件进行寻址的寻址请求;寻址模块504,用于通过所述寻址中间件,基于发送所述寻址请求的用户的属性信息以及所述通道,确定寻址到的所述虚拟中间件的地址,作为测试地址;对比模块505,用于将所述测试地址与标准地址进行对比,得到所述寻址中间件的测试结果;所述标准地址是预先根据发送所述寻址请求的用户的属性信息以及所述通道确定的。
可选地,所述通道包括共有通道;所述配置模块502具体用于,针对所述虚拟中间件的每个地址,当建立所述虚拟中间件的该地址到所述云架构中的用户的共有通道时,将该地址配置为所述共有通道对应的地址,并为所述共有通道配置允许访问该地址的用户的属性信息;所述属性信息包括用户所在的逻辑机房、用户所在的物理机房、用户所在的地理区域中的至少一种。
可选地,所述通道包括专有通道;所述云架构中的用户包括逻辑控制中心LDC用户;
所述配置模块502具体用于,针对所述虚拟中间件的每个地址,当建立所述虚拟中 间件的该地址到所述云架构中的LDC用户的专有通道时,将该地址配置为所述专有通道对应的地址,并将需要建立所述专有通道的LDC用户确定为允许访问该地址的LDC用户,为所述专有通道配置允许访问该地址的LDC用户的属性信息;所述属性信息包括LDC用户所属的租户、LDC用户所在的逻辑机房、LDC用户所在的物理机房、LDC用户所在的地理区域中的至少一种。
可选地,所述通道包括专有通道;所述云架构中的用户包括非逻辑控制中心LDC用户;所述配置模块502具体用于,针对所述虚拟中间件的每个地址,当建立所述虚拟中间件的该地址到所述云架构中的非LDC用户的专有通道时,将该地址配置为所述专有通道对应的地址,并将需要建立所述专有通道的非LDC用户确定为允许访问该地址的非LDC用户,为所述专有通道配置允许访问该地址的非LDC用户的属性信息;所述属性信息包括非LDC用户所属的租户、非LDC用户所在的物理机房、非LDC用户所在的地理区域中的至少一种。
可选地,所述寻址模块504具体用于,针对每个通道,通过所述寻址中间件,判断该通道的配置中是否包含发送所述寻址请求的用户的至少一种属性信息,若是,确定该通道为与发送所述寻址请求的用户的属性信息匹配的通道,否则,确定该通道不是与发送所述寻址请求的用户的属性信息匹配的通道;将与发送所述寻址请求的用户的属性信息匹配的通道对应的地址确定为寻址到的所述虚拟中间件的地址。
可选地,所述配置模块502还用于,在建立所述虚拟中间件到所述云架构中的用户的通道之后,确定建立的通道对应的环境筛选条件;所述寻址模块504还用于,在确定该通道为与发送所述寻址请求的用户的属性信息匹配的通道之前,确定发送所述寻址请求的用户所在的环境满足该通道对应的环境筛选条件。
可选地,所述虚拟中间件的地址包括两个以上的实际地址;所述对比模块505具体用于,判断寻址得到的测试地址与所述标准地址是否一一对应;若是,判定所述寻址中间件的寻址结果准确,若否,判定所述寻址中间件的寻址结果不准确。
本说明书还提供了一种计算机可读存储介质,该存储介质存储有计算机程序,计算机程序可用于执行上述图1提供的寻址测试方法。
本说明书还提供了图6所示的电子设备的结构示意图。如图6所述,在硬件层面,该无人驾驶设备包括处理器、内部总线、网络接口、内存以及非易失性存储器,当然还可能包括其他业务所需要的硬件。处理器从非易失性存储器中读取对应的计算机程序到内存中然后运行,以实现上述图1所述的寻址测试方法。当然,除了软件实现方式之外,本说明书并不排除其他实现方式,比如逻辑器件抑或软硬件结合的方式等等,也就是说以下处理流程的执行主体并不限定于各个逻辑单元,也可以是硬件或逻辑器件。
在20世纪90年代,对于一个技术的改进可以很明显地区分是硬件上的改进(例如,对二极管、晶体管、开关等电路结构的改进)还是软件上的改进(对于方法流程的改进)。然而,随着技术的发展,当今的很多方法流程的改进已经可以视为硬件电路结构的直接改进。设计人员几乎都通过将改进的方法流程编程到硬件电路中来得到相应的硬件电路 结构。因此,不能说一个方法流程的改进就不能用硬件实体模块来实现。例如,可编程逻辑器件(Programmable Logic Device,PLD)(例如现场可编程门阵列(Field Programmable Gate Array,FPGA))就是这样一种集成电路,其逻辑功能由用户对器件编程来确定。由设计人员自行编程来把一个数字系统“集成”在一片PLD上,而不需要请芯片制造厂商来设计和制作专用的集成电路芯片。而且,如今,取代手工地制作集成电路芯片,这种编程也多半改用“逻辑编译器(logic compiler)”软件来实现,它与程序开发撰写时所用的软件编译器相类似,而要编译之前的原始代码也得用特定的编程语言来撰写,此称之为硬件描述语言(Hardware Description Language,HDL),而HDL也并非仅有一种,而是有许多种,如ABEL(Advanced Boolean Expression Language)、AHDL(Altera Hardware Description Language)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL(Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby Hardware Description Language)等,目前最普遍使用的是VHDL(Very-High-Speed Integrated Circuit Hardware Description Language)与Verilog。本领域技术人员也应该清楚,只需要将方法流程用上述几种硬件描述语言稍作逻辑编程并编程到集成电路中,就可以很容易得到实现该逻辑方法流程的硬件电路。
控制器可以按任何适当的方式实现,例如,控制器可以采取例如微处理器或处理器以及存储可由该(微)处理器执行的计算机可读程序代码(例如软件或固件)的计算机可读介质、逻辑门、开关、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程逻辑控制器和嵌入微控制器的形式,控制器的例子包括但不限于以下微控制器:ARC 625D、Atmel AT91SAM、Microchip PIC18F26K20以及Silicone Labs C8051F320,存储器控制器还可以被实现为存储器的控制逻辑的一部分。本领域技术人员也知道,除了以纯计算机可读程序代码方式实现控制器以外,完全可以通过将方法步骤进行逻辑编程来使得控制器以逻辑门、开关、专用集成电路、可编程逻辑控制器和嵌入微控制器等的形式来实现相同功能。因此这种控制器可以被认为是一种硬件部件,而对其内包括的用于实现各种功能的装置也可以视为硬件部件内的结构。或者甚至,可以将用于实现各种功能的装置视为既可以是实现方法的软件模块又可以是硬件部件内的结构。
上述实施例阐明的系统、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机。具体的,计算机例如可以为个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任何设备的组合。
为了描述的方便,描述以上装置时以功能分为各种单元分别描述。当然,在实施本说明书时可以把各单元的功能在同一个或多个软件和/或硬件中实现。
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的 计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。
本领域技术人员应明白,本说明书的实施例可提供为方法、系统或计算机程序产品。因此,本说明书可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本说明书可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本说明书可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。也可以在分布式计算环境中实践本说明书,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
以上所述仅为本说明书的实施例而已,并不用于限制本说明书。对于本领域技术人员来说,本说明书可以有各种更改和变化。凡在本说明书的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本申请的权利要求范围之内。

Claims (16)

  1. 一种寻址测试的方法,所述方法应用于测试云架构中的寻址中间件,所述方法包括:
    响应于接收的虚拟中间件的创建请求,创建虚拟中间件;
    响应于所述虚拟中间件的配置请求,在所述云架构包含的各节点的实际地址中,选择至少一个实际地址,作为所述虚拟中间件的地址,并根据所述虚拟中间件的地址,建立所述虚拟中间件到所述云架构中的用户的通道;
    当对所述寻址中间件进行测试时,通过所述寻址中间件运行测试用例;所述测试用例中包含用于对所述虚拟中间件进行寻址的寻址请求;
    通过所述寻址中间件,基于发送所述寻址请求的用户的属性信息以及所述通道,确定寻址到的所述虚拟中间件的地址,作为测试地址;
    将所述测试地址与标准地址进行对比,得到所述寻址中间件的测试结果;所述标准地址是预先根据发送所述寻址请求的用户的属性信息以及所述通道确定的。
  2. 如权利要求1所述的方法,所述通道包括共有通道;
    建立所述虚拟中间件到所述云架构中的用户的通道,包括:
    针对所述虚拟中间件的每个地址,当建立所述虚拟中间件的该地址到所述云架构中的用户的共有通道时,将该地址配置为所述共有通道对应的地址,并为所述共有通道配置允许访问该地址的用户的属性信息;
    所述属性信息包括用户所在的逻辑机房、用户所在的物理机房、用户所在的地理区域中的至少一种。
  3. 如权利要求1所述的方法,所述通道包括专有通道;所述云架构中的用户包括逻辑控制中心LDC用户;
    建立所述虚拟中间件到所述云架构中的用户的通道,包括:
    针对所述虚拟中间件的每个地址,当建立所述虚拟中间件的该地址到所述云架构中的LDC用户的专有通道时,将该地址配置为所述专有通道对应的地址,并将需要建立所述专有通道的LDC用户确定为允许访问该地址的LDC用户,为所述专有通道配置允许访问该地址的LDC用户的属性信息;
    所述属性信息包括LDC用户所属的租户、LDC用户所在的逻辑机房、LDC用户所在的物理机房、LDC用户所在的地理区域中的至少一种。
  4. 如权利要求1所述的方法,所述通道包括专有通道;所述云架构中的用户包括非逻辑控制中心LDC用户;
    建立所述虚拟中间件到所述云架构中的用户的通道,包括:
    针对所述虚拟中间件的每个地址,当建立所述虚拟中间件的该地址到所述云架构中的非LDC用户的专有通道时,将该地址配置为所述专有通道对应的地址,并将需要建立所述专有通道的非LDC用户确定为允许访问该地址的非LDC用户,为所述专有通道配置允许访问该地址的非LDC用户的属性信息;
    所述属性信息包括非LDC用户所属的租户、非LDC用户所在的物理机房、非LDC用户所在的地理区域中的至少一种。
  5. 如权利要求2~4任一所述的方法,通过所述寻址中间件,基于发送所述寻址请求的用户的属性信息以及所述通道,确定寻址到的所述虚拟中间件的地址,包括:
    针对每个通道,通过所述寻址中间件,判断该通道的配置中是否包含发送所述寻址请求的用户的至少一种属性信息,若是,确定该通道为与发送所述寻址请求的用户的属性信息匹配的通道,否则,确定该通道不是与发送所述寻址请求的用户的属性信息匹配的通道;
    将与发送所述寻址请求的用户的属性信息匹配的通道对应的地址确定为寻址到的所述虚拟中间件的地址。
  6. 如权利要求5所述的方法,建立所述虚拟中间件到所述云架构中的用户的通道之后,所述方法还包括:
    确定建立的通道对应的环境筛选条件;
    确定该通道为与发送所述寻址请求的用户的属性信息匹配的通道之前,所述方法还包括:
    确定发送所述寻址请求的用户所在的环境满足该通道对应的环境筛选条件。
  7. 如权利要求1所述的方法,所述虚拟中间件的地址包括两个以上的实际地址;
    将所述测试地址与标准地址进行对比,得到所述寻址中间件的测试结果,包括:
    判断寻址得到的测试地址与所述标准地址是否一一对应;
    若是,确定所述寻址中间件的寻址结果准确,
    若否,确定所述寻址中间件的寻址结果不准确。
  8. 一种寻址测试装置,所述装置应用于测试云架构中的寻址中间件,所述装置包括:
    创建模块,用于响应接收的虚拟中间件的创建请求,创建虚拟中间件;
    配置模块,用于响应所述虚拟中间件的配置请求,在所述云架构包含的各节点的实际地址中,选择至少一个实际地址,作为所述虚拟中间件的地址,并根据所述虚拟中间件的地址,建立所述虚拟中间件到所述云架构中的用户的通道;
    运行模块,用于当对所述寻址中间件进行测试时,通过所述寻址中间件运行测试用例;所述测试用例中包含用于对所述虚拟中间件进行寻址的寻址请求;
    寻址模块,用于通过所述寻址中间件,基于发送所述寻址请求的用户的属性信息以及所述通道,确定寻址到的所述虚拟中间件的地址,作为测试地址;
    对比模块,用于将所述测试地址与标准地址进行对比,得到所述寻址中间件的测试结果;所述标准地址是预先根据发送所述寻址请求的用户的属性信息以及所述通道确定的。
  9. 如权利要求8所述的装置,所述通道包括共有通道;
    所述配置模块用于,针对所述虚拟中间件的每个地址,当建立所述虚拟中间件的该 地址到所述云架构中的用户的共有通道时,将该地址配置为所述共有通道对应的地址,并为所述共有通道配置允许访问该地址的用户的属性信息;所述属性信息包括用户所在的逻辑机房、用户所在的物理机房、用户所在的地理区域中的至少一种。
  10. 如权利要求8所述的装置,所述通道包括专有通道;所述云架构中的用户包括逻辑控制中心LDC用户;
    所述配置模块用于,针对所述虚拟中间件的每个地址,当建立所述虚拟中间件的该地址到所述云架构中的LDC用户的专有通道时,将该地址配置为所述专有通道对应的地址,并将需要建立所述专有通道的LDC用户确定为允许访问该地址的LDC用户,为所述专有通道配置允许访问该地址的LDC用户的属性信息;所述属性信息包括LDC用户所属的租户、LDC用户所在的逻辑机房、LDC用户所在的物理机房、LDC用户所在的地理区域中的至少一种。
  11. 如权利要求9所述的装置,所述通道包括专有通道;所述云架构中的用户包括非逻辑控制中心LDC用户;
    所述配置模块用于,针对所述虚拟中间件的每个地址,当建立所述虚拟中间件的该地址到所述云架构中的非LDC用户的专有通道时,将该地址配置为所述专有通道对应的地址,并将需要建立所述专有通道的非LDC用户确定为允许访问该地址的非LDC用户,为所述专有通道配置允许访问该地址的非LDC用户的属性信息;所述属性信息包括非LDC用户所属的租户、非LDC用户所在的物理机房、非LDC用户所在的地理区域中的至少一种。
  12. 如权利要求9~11任一所述的装置,所述寻址模块用于,针对每个通道,通过所述寻址中间件,判断该通道的配置中是否包含发送所述寻址请求的用户的至少一种属性信息,若是,确定该通道为与发送所述寻址请求的用户的属性信息匹配的通道,否则,确定该通道不是与发送所述寻址请求的用户的属性信息匹配的通道;将与发送所述寻址请求的用户的属性信息匹配的通道对应的地址确定为寻址到的所述虚拟中间件的地址。
  13. 如权利要求12所述的装置,所述配置模块还用于,在建立所述虚拟中间件到所述云架构中的用户的通道之后,确定建立的通道对应的环境筛选条件;
    所述寻址模块还用于,在确定该通道为与发送所述寻址请求的用户的属性信息匹配的通道之前,确定发送所述寻址请求的用户所在的环境满足该通道对应的环境筛选条件。
  14. 如权利要求8所述的装置,所述虚拟中间件的地址包括两个以上的实际地址;
    所述对比模块用于,判断寻址得到的测试地址与所述标准地址是否一一对应;若是,判定所述寻址中间件的寻址结果准确,若否,判定所述寻址中间件的寻址结果不准确。
  15. 一种计算机可读存储介质,所述存储介质存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1~7中任一项所述的方法。
  16. 一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现权利要求1~7中任一项所述的方法。
PCT/CN2023/110637 2022-08-26 2023-08-01 一种寻址测试的方法、装置、存储介质及电子设备 WO2024041335A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211034234.9 2022-08-26
CN202211034234.9A CN115617648A (zh) 2022-08-26 2022-08-26 一种寻址测试的方法、装置、存储介质及电子设备

Publications (1)

Publication Number Publication Date
WO2024041335A1 true WO2024041335A1 (zh) 2024-02-29

Family

ID=84856374

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/110637 WO2024041335A1 (zh) 2022-08-26 2023-08-01 一种寻址测试的方法、装置、存储介质及电子设备

Country Status (2)

Country Link
CN (1) CN115617648A (zh)
WO (1) WO2024041335A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115617648A (zh) * 2022-08-26 2023-01-17 支付宝(杭州)信息技术有限公司 一种寻址测试的方法、装置、存储介质及电子设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160105393A1 (en) * 2014-10-13 2016-04-14 Vmware, Inc Cross-cloud namespace management for multi-tenant environments
CN108616572A (zh) * 2018-03-29 2018-10-02 阿里巴巴集团控股有限公司 通信方法、装置及设备
CN109993530A (zh) * 2019-03-29 2019-07-09 北京柏链基石科技有限公司 一种虚拟资源管理方法、装置及电子设备
CN115617648A (zh) * 2022-08-26 2023-01-17 支付宝(杭州)信息技术有限公司 一种寻址测试的方法、装置、存储介质及电子设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160105393A1 (en) * 2014-10-13 2016-04-14 Vmware, Inc Cross-cloud namespace management for multi-tenant environments
CN108616572A (zh) * 2018-03-29 2018-10-02 阿里巴巴集团控股有限公司 通信方法、装置及设备
CN109993530A (zh) * 2019-03-29 2019-07-09 北京柏链基石科技有限公司 一种虚拟资源管理方法、装置及电子设备
CN115617648A (zh) * 2022-08-26 2023-01-17 支付宝(杭州)信息技术有限公司 一种寻址测试的方法、装置、存储介质及电子设备

Also Published As

Publication number Publication date
CN115617648A (zh) 2023-01-17

Similar Documents

Publication Publication Date Title
US10963270B2 (en) Identifiers across application instances
US11385930B2 (en) Automatic workflow-based device switching
US9940123B1 (en) Updating device code through a bus
US20110231525A1 (en) Configuring cloud resources
WO2024041335A1 (zh) 一种寻址测试的方法、装置、存储介质及电子设备
TWI736123B (zh) Ble通信方法、裝置、設備及儲存媒體
US20220244998A1 (en) Method and apparatus for acquiring device information, storage medium and electronic device
US10157120B2 (en) Role-oriented testbed environments for use in test automation
WO2020119310A1 (zh) 查找表存储方法、装置及计算机可读存储介质
CN113141405B (zh) 服务访问方法、中间件系统、电子设备和存储介质
US10725890B1 (en) Program testing service
US11095608B2 (en) Cross protocol association for internet addresses for metadata association systems and methods
US8873527B2 (en) System and method for managing routers and communication interfaces on a computing device
EP3685553B1 (en) Virtualizing dcb settings for virtual network adapters
CN113037795B (zh) 瘦终端系统及其处理方法
EP3887934B1 (en) Configuration of workflows for coordinated device environments
CN115328662A (zh) 一种进程线程资源管理控制方法及系统
US10860358B2 (en) Virtualizing datacenter bridging settings for virtual network adapters
US11206175B1 (en) Path analysis service for identifying network configuration settings that block paths in virtual private clouds (VPCs)
CN107453950A (zh) 一种信息处理方法及监控系统
US10320890B1 (en) Generating client applications from service model descriptions
CN110198266B (zh) 实时数据流处理方法及系统
US20240095104A1 (en) Asynchronous communication in cluster infrastructures
CN117041980B (zh) 一种网元管理方法、装置、存储介质及电子设备
WO2023198128A1 (zh) 一种分布式资源共享方法及相关装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23856425

Country of ref document: EP

Kind code of ref document: A1