CN115904921A - Service registration information sending method, device, equipment and computer readable medium - Google Patents

Service registration information sending method, device, equipment and computer readable medium Download PDF

Info

Publication number
CN115904921A
CN115904921A CN202110962090.2A CN202110962090A CN115904921A CN 115904921 A CN115904921 A CN 115904921A CN 202110962090 A CN202110962090 A CN 202110962090A CN 115904921 A CN115904921 A CN 115904921A
Authority
CN
China
Prior art keywords
service
registration
service interface
connection
service registration
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110962090.2A
Other languages
Chinese (zh)
Inventor
诸发瑜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Duodian Life Chengdu Technology Co ltd
Original Assignee
Duodian Life Chengdu Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Duodian Life Chengdu Technology Co ltd filed Critical Duodian Life Chengdu Technology Co ltd
Priority to CN202110962090.2A priority Critical patent/CN115904921A/en
Publication of CN115904921A publication Critical patent/CN115904921A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the disclosure discloses a method, a device, equipment and a computer readable medium for sending service registration information. One embodiment of the method comprises: acquiring test parameter information input by a user; in response to receiving the service registration request, determining the number of long connections according to the number of service interfaces and the number of services of the reuse connection; grouping the service interface sets according to the long connection number to obtain a service interface set; registering each unregistered service instance of each service interface in the service interface group set to a registration center, and recording service registration information to obtain a service registration information set; and sending the service registration information set to a display terminal for displaying. The implementation method realizes dynamic establishment of the connection between the client and the registry according to the test requirements, can simulate the registration process of the service instance more truly, further more effectively evaluates the bearing limit of the registry, and improves the evaluation accuracy.

Description

Service registration information sending method, device, equipment and computer readable medium
Technical Field
Embodiments of the present disclosure relate to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a computer-readable medium for sending service registration information.
Background
The bearing limit of the registration center is accurately and comprehensively evaluated, and the service architecture can be better perfected. Currently, when evaluating the load limit of the registry, the following methods are generally adopted: and evaluating the bearing limit of the registration center by adopting a model to simulate the number of services and the number of service instances carried by the registration center or evaluating the bearing limit of the registration center by adopting a pressure measurement tool.
However, when the above-mentioned method is used to evaluate the carrying capacity of the registry, the following technical problems often exist:
firstly, the model only adopts a small number of long connections to complete the registration of a large number of service instances, so that when the bearing limit of a registration center is evaluated, the obtained test result is inaccurate, and the evaluation accuracy is further reduced;
secondly, when the pressure measurement tool is used for evaluating the bearing limit of the registration center, a large number of server resources are needed, and a large number of scenes of connection requests built by clients at the same time cannot be simulated, so that the evaluation accuracy is reduced.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
Some embodiments of the present disclosure propose a service registration information transmission method, apparatus, device and computer readable medium to solve one or more of the technical problems mentioned in the background section above.
In a first aspect, some embodiments of the present disclosure provide a method for sending service registration information, where the method includes: acquiring test parameter information input by a user, wherein the test parameter information comprises: the number of service interfaces, the number of service registration starting ports, the number of service instances and the number of services of reuse connection; responding to the received service registration request, and determining the number of long connections according to the number of the service interfaces and the number of the services of the reuse connection; grouping the service interface sets according to the long connection number to obtain a service interface group set; in response to determining that the number of registered service interface groups in the service interface group set is smaller than the long connection number and the number of registered service instances corresponding to the service interface group set is smaller than the number of the service instances, registering each unregistered service instance of each service interface in the service interface group set to a registration center, and recording service registration information to obtain a service registration information set; and sending the service registration information set to a display terminal for displaying.
In a second aspect, some embodiments of the present disclosure provide an apparatus for transmitting service registration information, the apparatus including: an obtaining unit configured to obtain test parameter information input by a user, wherein the test parameter information includes: the number of service interfaces, the number of service registration starting ports, the number of service instances and the number of services of reuse connection; a receiving unit configured to determine a number of long connections according to the number of service interfaces and the number of services of the reuse connection in response to receiving a service registration request; the grouping unit is configured to group the service interface sets according to the long connection number to obtain a service interface group set; a registration unit configured to register each unregistered service instance of each service interface in the service interface group set to a registration center and record service registration information to obtain a service registration information set in response to determining that the number of registered service interface groups in the service interface group set is smaller than the long connection number and the number of registered service instances corresponding to the service interface group set is smaller than the number of service instances; and the sending unit is configured to send the service registration information set to a display terminal for displaying.
In a third aspect, some embodiments of the present disclosure provide an electronic device, comprising: one or more processors; a storage device having one or more programs stored thereon, which when executed by one or more processors, cause the one or more processors to implement the method described in any of the implementations of the first aspect.
In a fourth aspect, some embodiments of the present disclosure provide a computer readable medium on which a computer program is stored, wherein the program, when executed by a processor, implements the method described in any of the implementations of the first aspect.
The above embodiments of the present disclosure have the following advantages: by the service registration information sending method of some embodiments of the disclosure, the accuracy of evaluating the bearing limit of the registration center can be improved. Specifically, when evaluating the load limit of the registry, the reason for the inaccuracy of the test results is: the model only uses a small number of long connections to complete registration of a large number of service instances. Based on this, the service registration information sending method according to some embodiments of the present disclosure first obtains test parameter information input by a user. Wherein, the test parameter information includes: the number of service interfaces, the number of service registration start ports, the number of service instances and the number of services of the reuse connection. Then, in response to receiving the service registration request, determining the number of long connections according to the number of service interfaces and the number of services of the reused connection. Therefore, the number of long connections between the service interface set and the registration center can be dynamically determined according to the input test parameter information. And then, grouping the service interface sets according to the long connection number to obtain a service interface group set. Thus, each service interface group in the service interface set can be determined according to the long connection number. And then, in response to the fact that the number of the registered service interface groups in the service interface group set is smaller than the long connection number and the number of the registered service instances corresponding to the service interface group set is smaller than the number of the service instances, registering each unregistered service instance of each service interface in the service interface group set to a registration center, and recording service registration information to obtain a service registration information set. The resulting set of service registration information may thus provide data support for evaluating the bearer limits of the registry. And finally, sending the service registration information set to a display terminal for displaying. Therefore, the bearing limit of the registration center can be evaluated by simulating the number of the services and the number of the service instances carried by the registration center. And the connection between the client and the registration center can be dynamically established according to the test requirements, so that the influence of the registration of a large number of service instances by adopting a small number of long connections on the test result is avoided, and the evaluation accuracy is further improved.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and elements are not necessarily drawn to scale.
Fig. 1 is a schematic diagram of an application scenario of a service registration information transmission method of some embodiments of the present disclosure;
fig. 2 is a flow diagram of some embodiments of a method of service registration information transmission according to the present disclosure;
fig. 3 is a schematic structural diagram of some embodiments of a service registration information transmitting apparatus according to the present disclosure;
FIG. 4 is a schematic block diagram of an electronic device suitable for use in implementing some embodiments of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings. The embodiments and features of the embodiments in the present disclosure may be combined with each other without conflict.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 is a schematic diagram of an application scenario of a service registration information sending method according to some embodiments of the present disclosure.
In the application scenario of fig. 1, first, the computing device 101 may obtain test parameter information 102 input by a user, where the test parameter information 102 includes: the number of service interfaces, the number of service registration start ports, the number of service instances and the number of services of the reuse connection. Then, the computing device 101 may determine the number of long connections 104 from the number of service interfaces and the number of services of the reused connection in response to receiving the service registration request 103. Then, the computing device 101 may group the service interface sets 105 according to the long connection number 104 to obtain a service interface group set 106. Then, in response to determining that the number of the registered service interface groups in the service interface group set 106 is smaller than the long connection number 104 and the number of the registered service instances corresponding to the service interface group set 106 is smaller than the number of the service instances, the computing device 101 may register each unregistered service instance of each service interface in the service interface group set 106 to the registry 107, and record service registration information, so as to obtain a service registration information set 108. Finally, the computing device 101 may send the set of service registration information 108 described above to the display terminal 109 for display.
The computing device 101 may be hardware or software. When the computing device is hardware, it may be implemented as a distributed cluster composed of multiple servers or terminal devices, or may be implemented as a single server or a single terminal device. When the computing device is embodied as software, it may be installed in the hardware devices enumerated above. It may be implemented, for example, as multiple software or software modules to provide distributed services, or as a single software or software module. And is not particularly limited herein.
It should be understood that the number of computing devices in FIG. 1 is merely illustrative. There may be any number of computing devices, as the implementation requires.
With continued reference to fig. 2, a flow 200 of some embodiments of a method of service registration information transmission according to the present disclosure is shown. The method for sending the service registration information comprises the following steps:
step 201, obtaining the test parameter information input by the user.
In some embodiments, an executing agent (e.g., the computing device 101 shown in fig. 1) of the service registration information sending method may obtain test parameter information input by a user, where the test parameter information may be a set of test parameters input by a test registry load limit. The test parameter information includes: the number of service interfaces, the number of service registration start ports, the number of service instances and the number of services of the reuse connection. The number of services of the reused connection may be the number of services for calling the same long connection to perform service registration.
Step 202, in response to receiving the service registration request, determining the number of long connections according to the number of service interfaces and the number of services of the reused connections.
In some embodiments, the execution agent may determine, in response to receiving the service registration request, the number of long connections according to the number of service interfaces and the number of services of the reuse connection. The long connection number may be a number of paths for service registration. In practice, the execution body may use a ratio of the acquired number of service interfaces to the acquired number of services of the reuse connection as the number of long connections. Therefore, the number of long connections between the service interface set and the registration center can be dynamically determined according to the input test parameter information.
In some optional implementation manners of some embodiments, the execution main body may perform rounding-up on a ratio of the number of the service interfaces to the number of the services of the reuse connection to obtain the number of the long connections. Therefore, the number of the long connections to be generated can be dynamically determined according to the acquired number of the service interfaces and the acquired number of the services of the reuse connection.
And 203, grouping the service interface sets according to the long connection number to obtain a service interface set.
In some embodiments, the execution body may group the service interface sets according to the long connection number to obtain a service interface group set. The service interface may be an interface for providing a service. In practice, the upper execution body may group the service interface sets in a sequential allocation manner according to the long connection number to obtain a service interface set. The above sequential allocation may be performed in a sequential manner, in which the service interfaces are sequentially allocated to the service interface group 1, so that the service interface group 1 reaches a preset number of service interfaces, and then the service interfaces are sequentially allocated to the service interface group 2, and so on. The preset number may be the number of services of the reuse connection. Thus, each service interface group in the service interface set can be determined according to the long connection number.
As an example, the service interface set may be { service interface 1, service interface 2, service interface 3, service interface 4, service interface 5, service interface 6}, the service interface set 1 may be [ service interface 1, service interface 2, service interface 3], the service interface set 2 may be [ service interface 4, service interface 5, service interface 6], and the service interface set may be { [ service interface 1, service interface 2, service interface 3], [ service interface 4, service interface 5, service interface 6] }.
Step 204, in response to determining that the number of the registered service interface groups in the service interface group set is smaller than the long connection number and the number of the registered service instances corresponding to the service interface group set is smaller than the number of the service instances, registering each unregistered service instance of each service interface in the service interface group set to a registration center, and recording service registration information to obtain a service registration information set.
In some embodiments, the execution agent may register, in response to determining that the number of registered service interface groups in the service interface group set is smaller than the long connection number and the number of registered service instances corresponding to the service interface group set is smaller than the number of service instances, each unregistered service instance of each service interface in the service interface group set to a registration center, and record service registration information to obtain a service registration information set. Service registration information generated during the service registration process may be logged. The registered service interface group may be a service interface group in which service registration is completed for each service instance of each service interface in the service interface group. The number of registered service instances corresponding to the service interface group set may be the number of service instances for calling the service interfaces in the service interface group set to complete service registration. The resulting set of service registration information may thus provide data support for evaluating the bearer limits of the registry.
In some optional implementations of some embodiments, in response to determining that the number of registered service interface groups in the service interface group set is less than the long connection number and the number of registered service instances corresponding to the service interface group set is less than the number of service instances, registering each unregistered service instance of each service interface in the service interface group set to the registry, and recording service registration information, the method may include:
first, target information of the registration center is obtained.
Wherein, the target information includes a service registration port number. The execution subject may acquire the target information of the registry at a preset time interval. Thus, the port number of the registry can be acquired by acquiring the target information of the registry.
And secondly, determining the long connection called when the unregistered service instance executes the service registration operation according to the service registration port number included in the target information.
In practice, the executing body may use the long connection corresponding to the service registration port number as the long connection called when the unregistered service instance executes the service registration operation. The long connection corresponding to the service registration port number may be a long connection calling the service registration port number. Thereby, the long connection invoked at the time of the service registration operation can be determined from the service registration port number.
In some optional implementation manners of some embodiments, the determining, according to the service registration port number included in the target information, a long connection invoked when the unregistered service instance performs a service registration operation may include the following steps:
and in response to determining that the number of the service interfaces calling the service registration port number in the service interface group set is smaller than the number of the services of the reuse connection, determining the long connection corresponding to the service registration port number as the long connection called when the unregistered service instance executes service registration operation, and recording the current time as registration start time.
Therefore, whether the long connection corresponding to the service registration port number can be called for service registration can be determined according to the number of times of calling the service registration port number for service registration.
Optionally, the determining, according to the service registration port number included in the target information, a long connection called when the unregistered service instance performs a service registration operation may further include:
in the first step, a new port number is generated in response to determining that the number of service interfaces calling the service registration port number in the service interface group set is equal to the number of services of the reuse connection.
In practice, the executing body may first determine whether the number of service interfaces invoking the service registration port number in the service interface group set is equal to the number of services of the reuse connection. Then, in response to a determination that the port number is greater than the predetermined threshold, the execution body may generate a new port number by port number accumulation. For example, the service registration port number may be 111, and the new port number may be 112.
And secondly, determining the long connection corresponding to the new port number as the long connection called when the unregistered service instance executes service registration operation, and recording the current time as registration starting time.
Therefore, whether a new service registration port number needs to be created or not can be determined according to the number of times of calling the service registration port number for service registration, so that service registration can be performed by adopting a new long connection corresponding to the new service registration port number.
And thirdly, registering the unregistered service instance to the registration center by using the long connection, and recording the registration ending time and the registration result.
In practice, the execution agent may register the unregistered service instance with the registry by calling the long connection, and record a registration end time and a registration result. The registration result includes a service registration port number called when the unregistered service instance is registered in the registry. Therefore, data support can be provided for analyzing the bearing limit of the registry by recording the registration end time and the service registration port number after the service instance is registered to the registry.
Alternatively, the execution main body may determine the registration start time, the registration end time, and the registration result as one piece of service registration information. Thus, data support can be provided for analyzing the bearer limits of the registry.
Step 205, sending the service registration information set to the display terminal for displaying.
In some embodiments, the execution principal may send the set of service registration information to a display terminal for display. In practice, the execution agent may send the service registration information set to a computer for display. Therefore, the bearing limit of the registration center can be evaluated by simulating the number of the services and the number of the service instances carried by the registration center.
In some optional implementations of some embodiments, before the obtaining of the test parameter information input by the user, the execution subject may perform a context recovery process on the registry. In practice, before the obtaining of the test parameter information input by the user, the executing entity may restore the test environment by deleting the service provider information, the service caller information, the service configuration information, and the metadata information of the registry. The metadata information is information describing data. Therefore, the influence of original test data on the evaluation of the bearing pressure of the registration center is avoided, and the test accuracy is improved.
Optionally, the execution main body may perform rounding-up on a ratio of the number of service interfaces to the number of services reused for connection, determine a product value of the rounded result and the number of the service instances as the number of connections generated in the test process and the number of interfaces generated in the test process, and send the number of connections and the number of interfaces to the display terminal. Wherein the number of the connections is equal to the number of the interfaces. The number of connections is the number of connections established during the test. The number of connections includes the number of connections between the registry and the service interface group in the service interface set and the number of connections between the service interface group and the service instance in the service interface set. The number of the interfaces is the number of ports called when the connection is established. Therefore, the number of connections generated and the number of occupied ports in the test process can be judged.
Optionally, the execution main body may determine, in response to that after the service number, the service instance number, or the connection number of the service registration is increased, the registered service heartbeat cannot be normally reported or the registration center is abnormal in function, the service number, the service instance number, and the connection number as a bearer limit of the registration center. The function abnormality of the registration center may be that the network traffic of the registration center, the utilization rate of a central processing unit CPU, or the occupancy rate of a memory is not within a preset range. The preset range may be a preset range, and the setting of the preset range is not limited herein.
The above embodiments of the present disclosure have the following advantages: by the service registration information sending method of some embodiments of the disclosure, the accuracy of evaluating the bearing limit of the registration center can be improved. Specifically, when evaluating the load limit of the registry, the reason for inaccurate test results is that: the model only uses a small number of long connections to complete registration of a large number of service instances. Based on this, the service registration information sending method according to some embodiments of the present disclosure first obtains test parameter information input by a user. Wherein, the test parameter information includes: the number of service interfaces, the number of service registration start ports, the number of service instances and the number of services of the reuse connection. Then, in response to receiving the service registration request, determining the number of long connections according to the number of service interfaces and the number of services of the reused connection. Therefore, the number of long connections between the service interface set and the registration center can be dynamically determined according to the input test parameter information. And then, grouping the service interface sets according to the long connection number to obtain a service interface group set. Thus, each service interface group in the service interface set can be determined according to the long connection number. And then, in response to the fact that the number of the registered service interface groups in the service interface group set is smaller than the long connection number and the number of the registered service instances corresponding to the service interface group set is smaller than the number of the service instances, registering each unregistered service instance of each service interface in the service interface group set to a registration center, and recording service registration information to obtain a service registration information set. The resulting set of service registration information may thus provide data support for evaluating the bearer limit of the registry. And finally, sending the service registration information set to a display terminal for displaying. Therefore, the bearing limit of the registration center can be evaluated by simulating the number of the services and the number of the service instances carried by the registration center. And the connection between the client and the registration center can be dynamically established according to the test requirements, so that the influence of the registration of a large number of service instances by adopting a small number of long connections on the test result is avoided, and the evaluation accuracy is further improved.
With further reference to fig. 3, as an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a service registration information sending apparatus, which correspond to those shown in fig. 2, and which may be applied in various electronic devices in particular.
As shown in fig. 3, the service registration information transmitting apparatus 300 of some embodiments includes: an acquisition unit 301, a reception unit 302, a grouping unit 303, a registration unit 304, and a transmission unit 305. The obtaining unit 301 is configured to obtain test parameter information input by a user, where the test parameter information includes: the number of service interfaces, the number of service registration starting ports, the number of service instances and the number of services of reuse connection; the receiving unit 302 is configured to determine, in response to receiving the service registration request, a number of long connections according to the number of service interfaces and the number of services of the reuse connection; the grouping unit 303 is configured to group the service interface sets according to the long connection number to obtain a service interface group set; the registration unit 304 is configured to register each unregistered service instance of each service interface in the service interface group set to a registration center and record service registration information to obtain a service registration information set in response to determining that the number of registered service interface groups in the service interface group set is smaller than the long connection number and the number of registered service instances corresponding to the service interface group set is smaller than the number of service instances; and the transmitting unit 305 is configured to transmit the set of service registration information to the display terminal for display.
It will be understood that the units described in the apparatus 300 correspond to the various steps in the method described with reference to fig. 2. Thus, the operations, features and resulting advantages described above with respect to the method are also applicable to the apparatus 300 and the units included therein, and are not described herein again.
Referring now to FIG. 4, a block diagram of an electronic device (such as computing device 101 shown in FIG. 1) 400 suitable for use in implementing some embodiments of the present disclosure is shown. The electronic device shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 4, electronic device 400 may include a processing device (e.g., central processing unit, graphics processor, etc.) 401 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM) 402 or a program loaded from a storage device 408 into a Random Access Memory (RAM) 403. In the RAM 403, various programs and data necessary for the operation of the electronic apparatus 400 are also stored. The processing device 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
Generally, the following devices may be connected to the I/O interface 405: input devices 406 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 407 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage devices 408 including, for example, magnetic tape, hard disk, etc.; and a communication device 409. The communication means 409 may allow the electronic device 400 to communicate wirelessly or by wire with other devices to exchange data. While fig. 4 illustrates an electronic device 400 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided. Each block shown in fig. 4 may represent one device or may represent multiple devices as desired.
In particular, according to some embodiments of the present disclosure, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, some embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In some such embodiments, the computer program may be downloaded and installed from a network through the communication device 409, or from the storage device 408, or from the ROM 402. The computer program, when executed by the processing apparatus 401, performs the above-described functions defined in the methods of some embodiments of the present disclosure.
It should be noted that the computer readable medium described in some embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In some embodiments of the disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In some embodiments of the present disclosure, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring test parameter information input by a user, wherein the test parameter information comprises: the number of service interfaces, the service registration starting port, the number of service instances and the number of services of the reuse connection. And responding to the received service registration request, and determining the number of the long connections according to the number of the service interfaces and the number of the services of the reused connections. And grouping the service interface sets according to the long connection number to obtain a service interface group set. And in response to determining that the number of the registered service interface groups in the service interface group set is smaller than the long connection number and the number of the registered service instances corresponding to the service interface group set is smaller than the number of the service instances, registering each unregistered service instance of each service interface in the service interface group set to a registration center, and recording service registration information to obtain a service registration information set. And sending the service registration information set to a display terminal for displaying.
Computer program code for carrying out operations for embodiments of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in some embodiments of the present disclosure may be implemented by software, and may also be implemented by hardware. The described units may also be provided in a processor, and may be described as: a processor includes an acquisition unit, a reception unit, a grouping unit, a registration unit, and a transmission unit. Where the names of these units do not in some cases constitute a limitation on the unit itself, for example, the acquiring unit may also be described as a "unit that acquires test parameter information input by a user".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems on a chip (SOCs), complex Programmable Logic Devices (CPLDs), and the like.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the embodiments of the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is made without departing from the inventive concept as defined above. For example, the above features and (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure are mutually replaced to form the technical solution.

Claims (10)

1. A method for sending service registration information comprises the following steps:
acquiring test parameter information input by a user, wherein the test parameter information comprises: the number of service interfaces, the number of service registration starting ports, the number of service instances and the number of services of reuse connection;
in response to receiving a service registration request, determining the number of long connections according to the number of service interfaces and the number of services of the reused connections;
grouping the service interface sets according to the long connection number to obtain a service interface set;
in response to determining that the number of registered service interface groups in the service interface group set is smaller than the long connection number and the number of registered service instances corresponding to the service interface group set is smaller than the number of service instances, registering each unregistered service instance of each service interface in the service interface group set to a registration center, and recording service registration information to obtain a service registration information set;
and sending the service registration information set to a display terminal for displaying.
2. The method of claim 1, wherein prior to said obtaining user-entered test parameter information, the method further comprises:
and carrying out environment recovery processing on the registration center.
3. The method of claim 1, wherein the determining a number of long connections based on the number of service interfaces and the number of services of the reused connection comprises:
and rounding up the ratio of the number of the service interfaces to the number of the services of the reuse connection to obtain the number of the long connections.
4. The method of claim 1, wherein registering the respective unregistered service instance for each service interface in the set of service interface groups with a registry and recording service registration information comprises:
acquiring target information of the registration center, wherein the target information comprises a service registration port number;
determining a long connection called when the unregistered service instance executes service registration operation according to a service registration port number included in the target information;
and registering the unregistered service instance to the registration center by using the long connection, and recording registration end time and a registration result, wherein the registration result comprises a service registration port number called when the unregistered service instance is registered to the registration center.
5. The method of claim 4, wherein the determining, according to the service registration port number included in the target information, the long connection invoked when the unregistered service instance performs a service registration operation comprises:
and in response to the fact that the number of the service interfaces for calling the service registration port number in the service interface group set is smaller than the service number of the reuse connection, determining the long connection corresponding to the service registration port number as the long connection called when the unregistered service instance executes service registration operation, and recording the current time as registration starting time.
6. The method of claim 4, wherein the determining, according to the service registration port number included in the target information, the long connection invoked when the unregistered service instance performs a service registration operation further comprises:
generating a new port number in response to determining that the number of service interfaces in the set of service interface groups invoking the service registration port number is equal to the number of services of the reuse connection;
and determining the long connection corresponding to the new port number as the long connection called when the unregistered service instance executes service registration operation, and recording the current time as registration starting time.
7. The method of any of claims 4-6, wherein registering the unregistered service instance for each service interface in the set of service interface groups with a registry and recording service registration information further comprises:
and determining the registration starting time, the registration ending time and the registration result as a piece of service registration information.
8. A service registration information transmission apparatus comprising:
an obtaining unit configured to obtain test parameter information input by a user, wherein the test parameter information includes: the number of service interfaces, the number of service registration starting ports, the number of service instances and the number of services of reuse connection;
a receiving unit configured to determine a number of long connections according to the number of service interfaces and the number of services of the reuse connection in response to receiving a service registration request;
the grouping unit is configured to group the service interface sets according to the long connection number to obtain a service interface group set;
a registration unit configured to register each unregistered service instance of each service interface in the service interface group set to a registration center and record service registration information to obtain a service registration information set in response to determining that the number of registered service interface groups in the service interface group set is smaller than the long connection number and the number of registered service instances corresponding to the service interface group set is smaller than the number of service instances;
a sending unit configured to send the set of service registration information to a display terminal for display.
9. An electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon;
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-7.
10. A computer-readable medium, on which a computer program is stored, wherein the program, when executed by a processor, implements the method of any one of claims 1 to 7.
CN202110962090.2A 2021-08-20 2021-08-20 Service registration information sending method, device, equipment and computer readable medium Pending CN115904921A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110962090.2A CN115904921A (en) 2021-08-20 2021-08-20 Service registration information sending method, device, equipment and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110962090.2A CN115904921A (en) 2021-08-20 2021-08-20 Service registration information sending method, device, equipment and computer readable medium

Publications (1)

Publication Number Publication Date
CN115904921A true CN115904921A (en) 2023-04-04

Family

ID=86469718

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110962090.2A Pending CN115904921A (en) 2021-08-20 2021-08-20 Service registration information sending method, device, equipment and computer readable medium

Country Status (1)

Country Link
CN (1) CN115904921A (en)

Similar Documents

Publication Publication Date Title
CN110753089B (en) Method, device, medium and electronic equipment for managing client
WO2022105591A1 (en) Cache server performance test method and apparatus, device, and medium
CN111581291A (en) Data processing method and device, electronic equipment and readable medium
CN112328419A (en) Test case generation method and device for remote procedure call interface, storage medium and electronic equipment
CN112416632B (en) Event communication method and device, electronic equipment and computer readable medium
CN115640285B (en) Power abnormality information transmission method, device, electronic equipment and medium
CN113144620A (en) Detection method, device, platform, readable medium and equipment for frame synchronization game
CN110730109A (en) Method and apparatus for generating information
CN114465919B (en) Network service testing method, system, electronic equipment and storage medium
CN115102992B (en) Data publishing method and device, electronic equipment and computer readable medium
CN109462491B (en) System, method and apparatus for testing server functionality
CN115904921A (en) Service registration information sending method, device, equipment and computer readable medium
CN114035861A (en) Cluster configuration method and device, electronic equipment and computer readable medium
CN114785770A (en) Mirror layer file sending method and device, electronic equipment and computer readable medium
CN114764627A (en) Data contribution capacity determination method and device based on transverse joint learning participants
CN114116480A (en) Method, device, medium and equipment for determining application program test coverage rate
CN112464039A (en) Data display method and device of tree structure, electronic equipment and medium
CN109614137B (en) Software version control method, device, equipment and medium
CN113094272A (en) Application testing method and device, electronic equipment and computer readable medium
CN112667119A (en) Measuring point batch correlation method and device, electronic equipment and computer readable medium
CN116319322B (en) Power equipment node communication connection method, device, equipment and computer medium
CN111404824B (en) Method, apparatus, electronic device, and computer-readable medium for forwarding request
CN113537028B (en) Control method, apparatus, device and medium for face recognition system
CN113406962B (en) Method and device for determining test information of automatic driving vehicle and electronic equipment
CN111274150B (en) Service instance access method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination