Information query method and device and storage medium

By pre-establishing a set of identification information on the PaaS platform, obtaining link identifiers and querying link information, the problem of cross-language and cross-application resource log synchronization is solved, convenient full-link monitoring is achieved, coupling problems caused by code intrusion are avoided, and the maintenance process is simplified.

CN116260857BActive Publication Date: 2026-03-27CHINA UNITED NETWORK COMM GRP CO LTD +2
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-08
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

On Platform as a Service (PaaS) platforms, it is difficult to synchronize resource log information across languages ​​and applications, making end-to-end monitoring difficult. Furthermore, existing technologies that monitor through instrumentation are highly intrusive, resulting in strong coupling between business functions and monitoring components, making them difficult to maintain.

Method used

By pre-establishing a set of identification information, obtaining the time and instance identifier to be queried, determining the link identifier, and querying the link information of the business link based on the link identifier, the intrusion into the business code is avoided. The link identifier and time relationship are stored using a pre-defined interface set, enabling convenient link information query.

Benefits of technology

It enables convenient querying of link information on the PaaS platform, avoids the coupling problem between business functions and monitoring components caused by code intrusion, and simplifies the maintenance process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116260857B_ABST
    Figure CN116260857B_ABST
Patent Text Reader

Abstract

The application provides an information query method and device and a storage medium, relates to the technical field of computers, and is used to solve the technical problem that general technology has strong code invasiveness when performing full-link monitoring on a PaaS platform. The method comprises the following steps: acquiring a to-be-queried time and a to-be-queried instance identifier corresponding to a to-be-queried resource instance; determining a to-be-queried link identifier based on the to-be-queried time, the to-be-queried instance identifier and a pre-established identifier information set; the identifier information set comprises a plurality of link identifier sub-sets corresponding to a plurality of instance identifiers in a one-to-one manner; the link identifier sub-set comprises a plurality of link identifiers corresponding to a plurality of historical times in a one-to-one manner; the to-be-queried link identifier is used to identify a service link associated with the to-be-queried resource instance; and link information of the service link associated with the to-be-queried resource instance is determined based on the to-be-queried link identifier.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of computers, and particularly relates to an information query method and device and a storage medium. BACKGROUND

[0002] Platform as a Service (PaaS) is a service mode in which multiple functions are integrated in a server platform, and the server platform is provided to users as a service. Therefore, in this service mode, multiple resources need to be called across languages, applications and servers to provide business services for users.

[0003] However, log information of multiple resources in different languages or different applications is difficult to synchronize, and it is difficult to implement full-link monitoring of the PaaS platform based on the log information, thereby performing performance analysis and abnormal positioning on the PaaS platform. In general technology, a method of embedding points in each link is generally used, and corresponding monitoring information can be obtained when needed, thereby implementing full-link monitoring of the PaaS platform.

[0004] However, this method has strong code invasiveness, which can easily lead to strong coupling between business functions and monitoring components in the PaaS platform, and is not easy to maintain. SUMMARY

[0005] The present application provides an information query method, device and storage medium, which are used to solve the technical problem of strong code invasiveness when a general technology performs full-link monitoring on a PaaS platform.

[0006] To achieve the above object, the present application adopts the following technical solution:

[0007] In a first aspect, an information query method is provided, comprising: obtaining a to-be-queried time and a to-be-queried instance identifier corresponding to a to-be-queried resource instance; determining a to-be-queried link identifier based on the to-be-queried time, the to-be-queried instance identifier and a pre-established identifier information set; the identifier information set comprises a plurality of link identifier sub-sets corresponding to a plurality of instance identifiers one by one; the link identifier sub-set comprises a plurality of link identifiers corresponding to a plurality of historical times one by one; the to-be-queried link identifier is used to identify a business link associated with the to-be-queried resource instance; and determining link information of the business link associated with the to-be-queried resource instance based on the to-be-queried link identifier.

[0008] Optionally, the information query method further comprises: receiving a resource update request sent by the terminal for updating the target resource instance; the resource update request comprises request path information, a target instance identifier and a target link identifier; the target link identifier is used to identify a service link associated with the resource update request; determining a target interface corresponding to the resource update request based on the request path information; when the target interface exists in a preset interface set, storing a correspondence between the target link identifier and a current time in a link identifier sub-set corresponding to the target instance identifier in the identifier information set; the preset interface set comprises at least one interface used to provide an instance update service.

[0009] Optionally, the method for determining the to-be-queried link identifier based on the to-be-queried time, the to-be-queried instance identifier and the pre-established identifier information set comprises: determining a link identifier sub-set corresponding to the to-be-queried instance identifier in the identifier information set as a target sub-set; and determining a link identifier corresponding to a first historical time before the to-be-queried time in the target sub-set as the to-be-queried link identifier.

[0010] Optionally, the method for determining the link information of the service link associated with the to-be-queried resource instance based on the to-be-queried link identifier comprises: reading route request information and log information corresponding to the to-be-queried link identifier to obtain the link information.

[0011] In a second aspect, an information query apparatus is provided, comprising: an obtaining unit and a determining unit.

[0012] The obtaining unit is configured to obtain a to-be-queried time and a to-be-queried instance identifier corresponding to a to-be-queried resource instance.

[0013] The determining unit is configured to determine a to-be-queried link identifier based on the to-be-queried time, the to-be-queried instance identifier and a pre-established identifier information set; the identifier information set comprises a plurality of link identifier sub-sets corresponding to a plurality of instance identifiers one by one; the link identifier sub-set comprises a plurality of link identifiers corresponding to a plurality of historical times one by one; and the to-be-queried link identifier is used to identify a service link associated with the to-be-queried resource instance.

[0014] The determining unit is further configured to determine link information of the service link associated with the to-be-queried resource instance based on the to-be-queried link identifier.

[0015] Optionally, the information query apparatus further comprises a storage unit.

[0016] The obtaining unit is further configured to receive a resource update request sent by the terminal for updating a target resource instance; the resource update request comprises request path information, a target instance identifier and a target link identifier; the target link identifier is used to identify a service link associated with the resource update request.

[0017] The determining unit is further configured to determine a target interface corresponding to the resource update request based on the request path information.

[0018] The storage unit is configured to store the correspondence between the target link identifier and the current time in a link identifier sub-set corresponding to the target instance identifier in the identifier information set when the target interface exists in the preset interface set. The preset interface set includes at least one interface for providing an instance update service.

[0019] Optionally, the determining unit is further configured to determine a link identifier sub-set corresponding to the to-be-queried instance identifier in the identifier information set as a target sub-set.

[0020] The determining unit is further configured to determine a link identifier corresponding to a first historical time before the to-be-queried time in the target sub-set as a to-be-queried link identifier.

[0021] Optionally, the determining unit is specifically configured to:

[0022] read the routing request information and the log information corresponding to the to-be-queried link identifier to obtain link information.

[0023] In a third aspect, an information query apparatus is provided, including a memory and a processor. The memory is configured to store computer-executed instructions, and the processor is connected to the memory through a bus. When the information query apparatus is running, the processor executes the computer-executed instructions stored in the memory, so that the information query apparatus executes the information query method in the first aspect.

[0024] The information query apparatus can be a terminal or a part of the terminal, for example, a chip system in the terminal. The chip system is configured to support the terminal to implement the functions involved in the first aspect and any possible implementation manner thereof, for example, receiving, determining, and splitting the data and / or information involved in the information query method. The chip system includes a chip and can also include other discrete devices or circuit structures.

[0025] In a fourth aspect, a computer-readable storage medium is provided, including computer-executed instructions. When the computer-executed instructions run on a computer, the computer executes the information query method in the first aspect.

[0026] It should be noted that the above computer instructions can be stored on the first computer-readable storage medium in whole or in part. The first computer-readable storage medium can be packaged together with the processor of the information query apparatus or packaged separately from the processor of the information query apparatus, and the present application does not limit this.

[0027] In the present application, the name of the information query device does not constitute a limitation on the device or functional module itself, and in actual implementation, these devices or functional modules can appear with other names. As long as the functions of each device or functional module are similar to those of the present application, they belong to the scope of the claims of the present application and their equivalents.

[0028] These aspects or other aspects of the present application will be more apparent in the following description.

[0029] The technical solutions provided by the present application at least have the following beneficial effects:

[0030] Based on any of the above aspects, in the present application, the server can obtain a to-be-queried instance identifier corresponding to a to-be-queried time and a to-be-queried resource instance, and since the server stores a pre-established identifier information set, and the identifier information set includes a plurality of link identifier sub-sets corresponding one-to-one to a plurality of instance identifiers, and the link identifier sub-set includes a plurality of link identifiers corresponding one-to-one to a plurality of historical times. Therefore, the server can determine a to-be-queried link identifier based on the to-be-queried time, the to-be-queried instance identifier, and the pre-established identifier information set, and further determine the link information of the service link associated with the to-be-queried resource instance based on the to-be-queried link identifier.

[0031] In this way, the present application can realize a scheme of conveniently querying link information based on link identifiers by pre-establishing an identifier information set. Compared with the scheme of monitoring the PaaS platform in the whole link by using the burying point method in the general technology, the present application does not need to invade the business code, can avoid the problem of strong coupling between the business function and the monitoring component in the PaaS platform caused by strong code invasiveness, and can facilitate the staff to maintain the business function in the PaaS platform. Therefore, the present application can be used to solve the technical problem of strong code invasiveness when the PaaS platform is monitored in the whole link in the general technology. BRIEF DESCRIPTION OF DRAWINGS

[0032] Figure 1 A structural schematic diagram of an information query system provided by an embodiment of the present application;

[0033] Figure 2 A hardware structural schematic diagram of a server provided by an embodiment of the present application;

[0034] Figure 3 A flowchart of an information query method provided by an embodiment of the present application Figure 1 ;

[0035] Figure 4 A flowchart of an information query method provided by an embodiment of the present application Figure 2 ;

[0036] Figure 5 A schematic diagram of a routing path provided for an embodiment of the present application;

[0037] Figure 6 A flowchart of an information query method provided for an embodiment of the present application Figure 3 ;

[0038] Figure 7 A flowchart of an information query method provided for an embodiment of the present application Figure 4 ;

[0039] Figure 8 An architecture schematic diagram of a link monitoring system provided for an embodiment of the present application;

[0040] Figure 9 A flowchart of an information query method provided for an embodiment of the present application Figure 5 ;

[0041] Figure 10 A structure schematic diagram of an information query apparatus provided for an embodiment of the present application. DETAILED DESCRIPTION

[0042] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.

[0043] It should be noted that, in the embodiments of the present application, the words “exemplary” or “for example” are used to represent an example, illustration or description. Any embodiment or design scheme described as “exemplary” or “for example” in the embodiments of the present application should not be interpreted as more preferred or more advantageous than other embodiments or design schemes. Rather, the words “exemplary” or “for example” are used to present the relevant concept in a specific manner.

[0044] In order to clearly describe the technical solutions in the embodiments of the present application, in the embodiments of the present application, the words “first”, “second” and the like are used to distinguish the same or similar items or items with basically the same function and role. Those skilled in the art can understand that the words “first”, “second” and the like are not used to limit the quantity and execution order.

[0045] In addition, the terms “include” and “have” in the embodiments of the present application and the claims and drawings are not exclusive. For example, a process, method, system, product or device including a series of steps or modules is not limited to the listed steps or modules, and can also include steps or modules not listed.

[0046] For the convenience of understanding the present application, the related elements involved in the present application are described.

[0047] Platform as a Service (PaaS) is a service mode that integrates multiple functions in a server platform and provides the server platform as a service to users. Therefore, in this service mode, multiple resources need to be called across languages, applications, and servers to provide business services to users.

[0048] However, the log information of multiple resources of different languages or different applications is difficult to synchronize, and it is difficult to implement full-link monitoring of the PaaS platform based on the log information, thereby performing performance analysis and abnormal positioning of the PaaS platform. In general technology, a way of embedding points in each link is generally used, and the corresponding monitoring information can be obtained when needed, thereby realizing full-link monitoring of the PaaS platform.

[0049] However, this way has strong code invasiveness, which can easily lead to strong coupling between business functions and monitoring components in the PaaS platform, and is not easy to maintain.

[0050] To solve the above problems, an information query method is provided in the embodiments of the present application. The server can obtain a to-be-queried time and a to-be-queried instance identifier corresponding to a to-be-queried resource instance. Since the server stores a pre-established identifier information set, and the identifier information set includes multiple link identifier sub-sets corresponding one-to-one to multiple instance identifiers, and the link identifier sub-set includes multiple link identifiers corresponding one-to-one to multiple historical times, the server can determine a to-be-queried link identifier based on the to-be-queried time, the to-be-queried instance identifier, and the pre-established identifier information set, and further determine link information of a business link associated with the to-be-queried resource instance based on the to-be-queried link identifier.

[0051] In this way, the present application can realize a scheme of conveniently querying link information based on link identifiers by pre-establishing an identifier information set. Compared with the scheme of using the embedding point method to perform full-link monitoring of the PaaS platform in general technology, the present application does not need to invade business code, can avoid the problem of strong coupling between business functions and monitoring components in the PaaS platform caused by strong code invasiveness, and can facilitate maintenance of business functions in the PaaS platform by staff. Therefore, the present application can be used to solve the technical problem of strong code invasiveness when the PaaS platform is monitored by general technology.

[0052] The information query method is applicable to an information query system. Figure 1 An architecture of the information query system 100 is shown. As Figure 1As shown, the information query system 100 comprises a terminal 101 and a server 102. The terminal 101 and the server 102 can be communicatively connected.

[0053] In actual application, the server 102 can also be communicatively connected with multiple terminals 101.

[0054] For the convenience of understanding, the present application takes the server 102 and one terminal 101 as an example for description.

[0055] Figure 1 The terminal 101 in the present application can be configured with a Hyper Text Transfer Protocol (HTTP) client. The HTTP client can be a service realized based on a World Wide Web (WEB) browser, and can be used to support the user to access the PaaS platform deployed in the server 102. For example, the terminal can be configured with a display module, an input module and a communication module and the like. The input module can be a computer external input device such as a mouse and a keyboard, so as to support the user to perform various operations. For example, information editing operation and information query operation and the like. The display module can be a liquid crystal display screen and the like, which is used to display the related interface of the HTTP client. The communication module can be a transceiver and the like, which is used to communicate with the server 102.

[0056] Alternatively, the terminal can be a device that provides voice and / or data connectivity to a user, a handheld device having wireless connection capability, or other processing device connected to a wireless modem. The wireless terminal can communicate with one or more core networks via a radio access network (RAN). The wireless terminal can be a mobile terminal, like a computer with a mobile terminal, or a portable, pocket, handheld, computer-included mobile device, which exchanges language and / or data with a radio access network. For example, a mobile phone, a tablet computer, a notebook computer, a netbook, a personal digital assistant (PDA). The present application does not make any limitation to this.

[0057] Figure 1The server 102 in the figure can be deployed with a PaaS platform for providing various data and services. The server 102 can be used to provide routing services for various request messages from terminals, so as to invoke various interfaces to provide services for the terminals. A resource instance can be a collection of resources required to provide a service for a user. For example, a resource instance can specifically be a desktop instance, that is, a collection of resources required to provide a desktop service for a user, including background pictures, screen savers, and related folders. A resource instance can also specifically be a board instance, that is, a collection of resources required to provide a certain board in a forum for a user, including board background, layout format, and layout content.

[0058] Optionally, the server 102 can be a server. The server can be a single server, or can also be a server cluster composed of multiple servers. In some embodiments, the server cluster can also be a distributed cluster. The embodiments of the present application do not make any limitation in this regard.

[0059] In one possible way, the server 102 can be configured with a storage module, a gateway, a management module, a resource orchestration module, and a resource pool, etc.

[0060] The storage module can be used to store resource files such as a set of identification information and a set of preset interfaces.

[0061] The gateway, as an entrance and exit for the PaaS platform and external interaction, can be used to perform operations such as load, routing forwarding, authentication and authorization, and traffic control on various requests.

[0062] The management module is used to manage various resources in the PaaS platform. For example, after the server receives a resource change request from a terminal, the order management unit, the billing management unit, and the resource management unit, etc. of the management module can be used to check and verify the resource change request, and the specific resource change request can be issued. At the same time, the management module can also be used to manage and maintain the life cycle of the PaaS platform.

[0063] The resource orchestration module can be used to convert the resources required by the PaaS platform into declarative service resources, and to orchestrate and tune various service resources, as well as to manage and maintain the life cycle of each service resource.

[0064] The resource pool includes a plurality of service resources for providing paas services for users, which are composed of a series or multiple groups of resource instances.

[0065] In combination Figure 1 For example, as shown in the figure, the server 102 can be deployed with a PaaS platform, and the PaaS platform can be used to provide various data and services. Figure 2As shown in FIG. 1, a hardware structure of the server 102 provided by the embodiments of the present application is shown. The server 102 includes a processor 21, a memory 22, a communication interface 23, and a bus 24. The processor 21, the memory 22, and the communication interface 23 can be connected through the bus 24.

[0066] The processor 21 is a control center of the server 102, and can be one processor or a plurality of processing elements. For example, the processor 21 can be a CPU or other general-purpose processor, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc.

[0067] As an embodiment, the processor 21 can include one or more CPUs, such as the CPU0 and the CPU1 shown in FIG. 1. Figure 2

[0068] The memory 22 can be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to this.

[0069] In one possible implementation, the memory 22 can exist independently of the processor 21, and the memory 22 can be connected to the processor 21 through the bus 24, for storing instructions or program codes. When the processor 21 invokes and executes the instructions or program codes stored in the memory 22, the information query method provided by the embodiments of the present application can be implemented.

[0070] In another possible implementation, the memory 22 can also be integrated with the processor 21.

[0071] The communication interface 23 is used for connecting the server 102 with other devices through a communication network, which can be an Ethernet, a wireless access network, a wireless local area network (WLAN), etc. The communication interface 23 can include a receiving unit for receiving data, and a sending unit for sending data.

[0072] ​The bus 24 can be an industry standard architecture (ISA) bus, a peripheral component interconnect (PCI) bus, an extended industry standard architecture (EISA) bus, or the like. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, Figure 2 Only one thick line is used in the figure to represent the bus, but this does not mean that there is only one bus or only one type of bus.

[0073] It should be noted that Figure 2 The structure shown in the figure does not constitute a limitation on the server 102, except Figure 2 In addition to the components shown, the server 102 can include more or fewer components than shown, or combine some components, or different arrangement of components.

[0074] As Figure 3 As shown in the figure, a flowchart of an information query method provided by an embodiment of the present application is shown. The information query method is applied to the server 102 in the information query system 100 shown in the figure. The information query method includes S301-S303. Figure 1

[0075] S301, the server obtains a to-be-queried time and a to-be-queried instance identifier corresponding to a to-be-queried resource instance.

[0076] The to-be-queried time can be a time when the to-be-queried resource instance has an abnormality such as a running error. The to-be-queried instance identifier can be a unique random string for identifying the to-be-queried resource instance. For example, the unique random string can be a universally unique identifier (UUID) of the to-be-queried resource instance.

[0077] In one possible manner, the to-be-queried resource instance can be a resource instance in a resource pool configured by the server. The resource instance can be a collection of resources needed to provide a service for a user. For example, the resource instance can be a desktop instance, that is, a collection of resources needed to provide a desktop service for a user, including background pictures, screen savers, and related folders.

[0078] ​Further, the resource pool configured by the server can include a plurality of resource instances. The plurality of resource instances can be created by a user through a terminal in the PaaS platform. When creating a resource instance, the server can generate an instance identifier corresponding to the resource instance, and store the correspondence between the resource instance and the instance identifier. In addition, the resource pool configured by the server can have a monitoring function and an automatic alarm function for monitoring the running parameter information of each resource instance.

[0079] Optionally, the monitoring function and the automatic alarm function possessed by the resource pool configured by the server can be implemented through Prometheus (a system monitoring and alarm system), or can also be implemented through other general services with monitoring function and automatic alarm function. The embodiments of the present application do not limit this.

[0080] In an implementable manner, during the running of a resource instance, the server can perform an update operation on the one resource instance in response to a resource update request sent by a user through a terminal. For example, modifying part of the resources or parameters in the one resource instance, or deleting part of the resources or parameters in the one resource instance.

[0081] During the entire update process, the server can monitor the one resource instance in real time through the monitoring function possessed by the configured resource pool. If the one resource instance has an abnormality such as a running error, the server can alarm through the automatic alarm function possessed by the configured resource pool. In this case, the server can determine the one resource instance as a to-be-queried resource instance, read the instance identifier corresponding to the to-be-queried resource instance, and determine the instance identifier corresponding to the to-be-queried resource instance as a to-be-queried instance identifier. At the same time, the server can also determine the time when the to-be-queried resource instance has an abnormality as a to-be-queried time.

[0082] S302, the server determines a to-be-queried link identifier based on the to-be-queried time, the to-be-queried instance identifier, and a pre-established identifier information set.

[0083] The identifier information set can include a plurality of link identifier sub-sets corresponding one-to-one to a plurality of instance identifiers. A link identifier sub-set includes a plurality of link identifiers corresponding one-to-one to a plurality of historical times. That is, one instance identifier can correspond to different link identifiers in different time periods. One link identifier only corresponds to one instance identifier.

[0084] In a possible manner, the to-be-queried link identifier can be used to identify a service link associated with the to-be-queried resource instance, that is, the routing path of the resource update request for requesting to update the to-be-queried resource instance.

[0085] In a possible implementation, the set of identification information can be established by the server in advance in the process of routing the resource update request to the resource instance to be queried. For the process of establishing the set of identification information, reference can be made to the detailed description of S401-S403 below, which will not be repeated here.

[0086] In a possible implementation, the link identifier of a service link can be generated by the initiating device of the service link, for uniquely identifying the service link. Specifically, the terminal can send a resource update request to the server in response to a relevant operation (e.g., a resource update operation or a resource deletion operation) of the user. Meanwhile, the terminal can generate a link identifier and carry the link identifier in the resource update request. Correspondingly, the server can receive the resource update request carrying the link identifier from the terminal. Then, the server can route the resource update request to the corresponding resource instance interface based on the configured routing strategy.

[0087] In an implementable manner, when the resource instance to be queried is abnormal, the staff usually needs to analyze the request information and log information of the service link associated with the resource instance to be queried, and the running parameter information of the resource instance to be queried, to accurately determine the cause of the abnormality of the resource instance to be queried.

[0088] To determine the full link information when the resource instance to be queried is abnormal, after obtaining the to-be-queried time and the to-be-queried instance identifier corresponding to the resource instance to be queried, the server can determine, in the set of identification information, a sub-set of link identifiers corresponding to the to-be-queried instance identifier.

[0089] Then, the server can further determine, in the sub-set of link identifiers corresponding to the to-be-queried instance identifier, a link identifier corresponding to the first historical time before the to-be-queried time as the to-be-queried link identifier. That is, the server can match the link identifiers in the sub-set of link identifiers corresponding to the to-be-queried instance identifier in a time reverse order, and determine the link identifier corresponding to the first historical time before the to-be-queried time as the to-be-queried link identifier, to obtain the to-be-queried link identifier corresponding to the to-be-queried instance identifier at the to-be-queried time.

[0090] Subsequently, the server can obtain the full link information corresponding to the resource instance to be queried based on the to-be-queried link identifier and the to-be-queried instance identifier, and send the full link information to the terminal specified by the staff, for the staff to analyze in combination.

[0091] In a possible manner, the server can also determine, as the to-be-queried link identifier, a plurality of link identifiers corresponding to a plurality of historical time points (for example, two or three, etc.) before the to-be-queried time point from the sub-set of link identifiers corresponding to the to-be-queried instance identifier. That is, the number of to-be-queried link identifiers can also be a plurality, so as to determine the running information of the to-be-queried resource instance before the to-be-queried resource instance appears an exception.

[0092] In S303, the server determines, based on the to-be-queried link identifier, link information of a service link associated with the to-be-queried resource instance.

[0093] The link information of the service link associated with the to-be-queried resource instance can include routing request information and log information.

[0094] In a possible manner, the server can read the routing request information and the log information corresponding to the to-be-queried link identifier to obtain the link information of the service link associated with the to-be-queried resource instance. In addition, the server can also read the running parameter information corresponding to the to-be-queried instance identifier and within a preset time length before the to-be-queried time point, so as to obtain the full link information corresponding to the to-be-queried resource instance.

[0095] Optionally, the preset time length can be set in the server by a staff in advance. For example, the preset time length can be 3 minutes or 5 minutes.

[0096] In an embodiment, as shown in FIG. 4, Figure 4 The information query method provided by the embodiment of the application further includes S401-S403.

[0097] In S401, the server receives a resource update request sent by a terminal for updating a target resource instance.

[0098] The resource update request includes request path information, a target instance identifier, and a target link identifier. The target link identifier is used to identify a service link associated with the resource update request.

[0099] In a possible manner, the request path information can be used to indicate a specific service (for example, an instance creation service or an instance deletion service, etc.) in the server requested to be accessed by the terminal. The request path information can include service path (also referred to as resource path) and service name (also referred to as resource name) and the like.

[0100] In a possible manner, the server can also read the running parameter information corresponding to the target instance identifier and within a preset time length before the to-be-queried time point, so as to obtain the full link information corresponding to the to-be-queried resource instance. Figure 1When the user needs to update or delete the target resource instance, the user can perform an update operation through the input module of the terminal. In response to the update operation performed by the user (e.g., clicking an update button or a delete button), the terminal can send a resource update request for updating the target resource instance to the server. Correspondingly, the server can receive the resource update request for updating the target resource instance sent by the terminal.

[0101] It should be noted that the target resource instance can be created by the user in the PaaS platform through the terminal. When the resource instance is created, the server can generate a target instance identifier corresponding to the target resource instance and send the target instance identifier corresponding to the target resource instance to the terminal. Correspondingly, the terminal can receive and store the target instance identifier corresponding to the target resource instance. Based on this, when the terminal sends a resource update request for updating the target resource instance to the server, the target instance identifier corresponding to the target resource instance can be added in the resource update request.

[0102] Optionally, the target resource instance can be the same resource instance as the resource instance to be queried, or can be a different resource instance from the resource instance to be queried.

[0103] S402, the server determines a target interface corresponding to the resource update request based on the request path information.

[0104] In one possible manner, the server can be configured with multiple interfaces for providing various services. For example, an interface for providing instance update service, an interface for providing order processing service, or an interface for providing other types of services. Further, the routing strategy of these interfaces can be set in the gateway of the server.

[0105] In one possible manner, after receiving the resource update request for updating the target resource instance sent by the terminal, the server can parse the resource update request to determine the request path information. Then, the server can determine the interface corresponding to the request path information through the routing strategy configured by the gateway, and determine the interface as the target interface corresponding to the resource update request. Subsequently, the server can route the resource update request to the target interface to provide instance update service for the terminal.

[0106] S403, when the target interface exists in the preset interface set, the server stores the correspondence between the target link identifier and the current time in the link identifier subset corresponding to the target instance identifier in the identifier information set.

[0107] The preset interface set includes at least one interface for providing instance update service.

[0108] Optionally, the instance update service can be completed by a specific resource instance in a resource pool configured by the server, and can include various functions such as an instance creation function, an instance deletion function, and an instance maintenance function. Embodiments of the present application do not limit this.

[0109] It should be noted that, in combination with Figure 1 As Figure 5 shown, a routing path of a resource update request provided by an embodiment of the present application is shown. The resource update request starts from a terminal, passes through a gateway configured by a server, a management module configured by the server, and a resource orchestration module configured by the server, and finally reaches a resource pool configured by the server, so as to request a corresponding instance update service. In the whole process, the target instance identifier can be effectively transmitted from the terminal to the resource pool configured by the server. However, because the language or application based on which the link tracking function is implemented is different from the resource orchestration module and the resource pool, etc. Therefore, the target link identifier can only be effectively transmitted from the terminal to the management module configured by the server via the gateway configured by the server. When reaching the resource orchestration module configured by the server, the resource update request transmits information by indirect calling, and the target link identifier cannot be effectively transmitted. In this case, the running parameter information of the target resource instance in the resource pool cannot be effectively corresponded to the service link associated with the target resource instance, resulting in difficulty in obtaining the full link information corresponding to the target resource instance.

[0110] To solve the above problem, in an embodiment of the present application, a worker pre-edits at least one interface for providing an instance update service, that is, an interface in which the target link identifier cannot be effectively transmitted, in a preset interface set, and configures the preset interface set in the gateway of the server.

[0111] Based on this, after determining the target interface corresponding to the resource update request, the server can match the target interface in the preset interface set. If the target interface does not exist in the preset interface set, it indicates that the target link identifier can be effectively transmitted in the subsequent routing process. In this case, the server can normally complete the routing forwarding of the request message.

[0112] If the target interface exists in the preset interface set, it indicates that the target link identifier cannot be effectively transmitted in the subsequent routing process. In this case, the server can parse the resource update request to determine the target instance identifier and the target link identifier. Then, the server can determine the current time and establish a correspondence between the target link identifier and the current time. Then, the server can store the correspondence between the target link identifier and the current time in a link identifier sub-set corresponding to the target instance identifier in an identifier information set. Subsequently, when the target resource instance appears abnormal, the server can query the target link identifier in the identifier information set to obtain the full link information corresponding to the target resource instance.

[0113] In an embodiment, in combination with Figure 3 In the S302, the server determines the link identifier to be queried based on the time to be queried, the instance identifier to be queried, and the pre-established identifier information set, as shown in Figure 6 An optional implementation provided by the present application includes the following steps S501-S502.

[0114] In the S501, the server determines a target subset from a subset of link identifiers in the identifier information set corresponding to the instance identifier to be queried.

[0115] In one possible implementation, after obtaining the time to be queried and the instance identifier to be queried corresponding to the resource instance to be queried, the server can determine a target subset from a subset of link identifiers in the identifier information set corresponding to the instance identifier to be queried.

[0116] In the S502, the server determines the link identifier corresponding to the first historical time before the time to be queried in the target subset as the link identifier to be queried.

[0117] In one possible implementation, after determining the target subset, the server can determine the link identifier corresponding to the first historical time before the time to be queried in the target subset as the link identifier to be queried. That is, the server can match the link identifiers in the target subset in a time reverse order, and determine the link identifier corresponding to the first historical time before the time to be queried as the link identifier to be queried, thereby obtaining the link identifier to be queried corresponding to the instance identifier to be queried at the time to be queried.

[0118] In an embodiment, in combination with Figure 3 In the S303, the server determines the link information of the service chain associated with the resource instance to be queried based on the link identifier to be queried, as shown in Figure 7 An optional implementation provided by the present application includes the following step S601.

[0119] In the S601, the server reads the routing request information and the log information corresponding to the link identifier to be queried to obtain the link information.

[0120] In one possible implementation, when the server monitors the running parameter information of each resource instance based on the monitoring function of the configured resource pool, the server can also collect the running parameter information of each resource instance and store the running parameter information in correspondence with the instance identifier of each resource instance.

[0121] In an embodiment, in combination with Figure 1In this way, the server can be configured with a log storage module, and the management module configured by the server can have a link tracking function, and the resource orchestration module can have a log collection function. Based on this, in the process of routing the resource update request to the corresponding resource instance interface, the management module can track the link identifier carried in the resource update request through the link tracking function possessed by the management module. At the same time, the server can collect routing request information of the resource update request through each node and log information of each node through the log collection function possessed by the resource orchestration module, and store these information and the link identifier in the log storage module.

[0122] Optionally, the link tracking function described above can be implemented through a specific application performance management (APM) technology. For example, Skywalking. The link identifier can also be generated through the related tools of APM. Alternatively, the link tracking function described above can also be implemented through other general services with link tracking function. The embodiments of the present application do not limit this.

[0123] Optionally, the log collection function described above can be implemented through Filebeat. Filebeat is a lightweight log collector. Alternatively, the log collection function described above can also be implemented through other general services with log collection function. The embodiments of the present application do not limit this.

[0124] Optionally, the log storage module described above can be implemented through Elasticsearch. Elasticsearch is a distributed, highly scalable and real-time search and data analysis engine. Alternatively, the log storage module described above can also be implemented through other general services with log management function. The embodiments of the present application do not limit this.

[0125] In one possible way, the server can read the routing request information and log information of the business link associated with the to-be-queried instance identifier from Elasticsearch through the to-be-queried link identifier. And the server can read the running parameter information of the to-be-queried resource instance within a preset time length before the to-be-queried time from Prometheus through the to-be-queried instance identifier.

[0126] In one implementation manner, as shown in Figure 8 FIG. 1 is a schematic diagram of an architecture of a link monitoring system provided by an embodiment of the present application.

[0127] Among them, the application service can be understood as all functions deployed in the terminal, the gateway configured by the server and the management module configured by the server.

[0128] Resource orchestration refers to all functions of the resource orchestration module configured by the server. Resource pool refers to all functions of the resource pool configured by the server.

[0129] The link tracking service can be an APM service, and the link tracking function can be implemented by skywalking. The link tracking service can call the link tracking function through the APM agent to implement link tracking for the application service, and store the link-related routing request information in the log storage module. The log storage module can be implemented by Elasticsearch.

[0130] The resource orchestration can write the upstream link identifier into the log storage module, and collect the link-related log information into the index corresponding to the log storage module through the log collection function (such as Filebeat).

[0131] The monitoring module can be implemented based on Prometheus, and can be used to collect the running parameter information of the resource instances in the resource pool through the monitoring function. In addition, the monitoring module can also perform monitoring in an automatic triggering manner, and perform unified monitoring index display and alarm triggering.

[0132] The operation and maintenance monitoring platform can integrate and store the information in three dimensions of routing request information, log information and running parameter information.

[0133] In an embodiment, as shown in Figure 9 Fig. 1 is a flowchart of an information query method provided by an embodiment of the present application. The server can obtain an abnormal time (i.e. a to-be-queried time) and an instance identifier when a resource instance is abnormal. Then, the server can read the running parameter information, i.e. read the running parameter information corresponding to the instance identifier and within a preset time length before the abnormal time. At the same time, the server can determine the link identifier associated with the resource instance based on the abnormal time, the instance identifier and a target identifier set. Then, the server can read the routing request information and the log information corresponding to the link identifier.

[0134] In an embodiment of the present application, the server can obtain a to-be-queried time and a to-be-queried instance identifier corresponding to a to-be-queried resource instance, and since the server stores a pre-established identifier information set, and the identifier information set includes a plurality of link identifier sub-sets corresponding to a plurality of instance identifiers one-to-one, and the link identifier sub-set includes a plurality of link identifiers corresponding to a plurality of historical times one-to-one. Therefore, the server can determine the to-be-queried link identifier based on the to-be-queried time, the to-be-queried instance identifier and the pre-established identifier information set, so as to further determine the link information of the business link associated with the to-be-queried resource instance based on the to-be-queried link identifier.

[0135] In this way, the application can realize the scheme of conveniently querying link information based on link identification by pre-establishing the set of identification information. Compared with the scheme of monitoring the PaaS platform in the whole link by using the burying point method in the general technology, the application does not need to invade the business code, can avoid the problem of strong coupling between the business function and the monitoring component in the PaaS platform caused by strong code invasiveness, and can facilitate the staff to maintain the business function in the PaaS platform. Therefore, the application can be used to solve the technical problem of strong code invasiveness when the PaaS platform is monitored in the whole link in the general technology.

[0136] The above mainly introduces the scheme provided by the embodiments of the application from the perspective of the method. In order to realize the above functions, it contains the hardware structure and / or software module corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed in the present text, the application can be realized in the form of hardware or the combination of hardware and computer software. Whether a certain function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. The professional technicians can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the application.

[0137] The embodiments of the application can divide the function modules of the server according to the above method examples. For example, each function module can be divided corresponding to each function, or two or more functions can be integrated in one processing module. The above integrated module can be realized in the form of hardware or in the form of software function module. Alternatively, the division of the module in the embodiments of the application is illustrative, and is only a logical function division. When actually implemented, there can be another division manner.

[0138] As shown in Figure 10 , it is a structure schematic diagram of an information query device provided by the embodiments of the application. The information query device can be applied to a server, and is used to execute the information query method as shown in Figure 3 、 Figure 4 、 Figure 6 、 Figure 7 and Figure 9 . The information query device includes an acquisition unit 701 and a determination unit 702.

[0139] The acquisition unit 701 is used to acquire the to-be-queried instance identification corresponding to the to-be-queried time and the to-be-queried resource instance. For example, in combination with Figure 3 , the acquisition unit 701 can be used to execute S301.

[0140] The determining unit 702 is configured to determine a to-be-inquired link identifier based on a to-be-inquired time, a to-be-inquired instance identifier, and a pre-established identifier information set. The identifier information set includes a plurality of link identifier sub-sets corresponding to a plurality of instance identifiers. The link identifier sub-set includes a plurality of link identifiers corresponding to a plurality of historical times. The to-be-inquired link identifier is used to identify a service link associated with the to-be-inquired resource instance. For example, in combination with Figure 3 The determining unit 702 can be configured to perform S302.

[0141] The determining unit 702 is further configured to determine link information of the service link associated with the to-be-inquired resource instance based on the to-be-inquired link identifier. For example, in combination with Figure 3 The determining unit 702 can be configured to perform S303.

[0142] Optionally, the information query apparatus further includes a storage unit 703.

[0143] The obtaining unit 701 is further configured to receive a resource update request for updating a target resource instance sent by a terminal. The resource update request includes request path information, a target instance identifier, and a target link identifier. The target link identifier is used to identify a service link associated with the resource update request. For example, in combination with Figure 4 The obtaining unit 701 can be configured to perform S401.

[0144] The determining unit 702 is further configured to determine a target interface corresponding to the resource update request based on the request path information. For example, in combination with Figure 4 The determining unit 702 can be configured to perform S402.

[0145] The storage unit 703 is configured to, when the target interface exists in a pre-set interface set, store a correspondence between the target link identifier and a current time in a link identifier sub-set corresponding to the target instance identifier in the identifier information set. The pre-set interface set includes at least one interface for providing an instance update service. For example, in combination with Figure 4 The storage unit 703 can be configured to perform S403.

[0146] Optionally, the determining unit 702 is further configured to determine a link identifier sub-set corresponding to the to-be-inquired instance identifier in the identifier information set as a target sub-set. For example, in combination with Figure 6 The determining unit 702 can be configured to perform S501.

[0147] The determining unit 702 is further configured to determine, as the to-be-inquired link identifier, a link identifier corresponding to a first historical time before the to-be-inquired time in the target sub-set. For example, in combination with Figure 6 The determining unit 702 can be configured to perform S502.

[0148] Optionally, the determining unit 702, specifically configured to:

[0149] Read the routing request information and log information corresponding to the link identifier to be queried to obtain link information. For example, in combination with Figure 7 The determining unit 702 can be configured to perform S601.

[0150] Those skilled in the art can understand that, in one or more examples described above, the functions described in the present application can be implemented by hardware, software, firmware or any combination thereof. When implemented by software, the functions can be stored in a computer readable medium or transmitted as one or more instructions or codes on a computer readable medium. The computer readable medium includes a computer readable storage medium and a communication medium, wherein the communication medium includes any medium that facilitates the transmission of computer programs from one place to another. The storage medium can be any available medium that can be accessed by a general or special purpose computer.

[0151] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above division of functional modules is taken as an example, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.

[0152] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules or units is only a logical function division, and actual implementation can have another division manner. For example, a plurality of units or components can be combined or integrated into another device, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interfaces, devices or units, and can be electrical, mechanical or other forms. The units shown as separate components can be or can not be physically separate, and the units shown as units can be one physical unit or a plurality of physical units, that is, can be located in one place, or can be distributed in a plurality of different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.

[0153] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto, and any skilled person in the art can easily think of changes or replacements within the technical range disclosed in the present application, which should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. An information search method characterized by comprising: The method comprises: receiving a resource update request sent by a terminal for updating a target resource instance; the resource update request comprises request path information, a target instance identifier and a target link identifier; the target link identifier is used for identifying a service link associated with the resource update request; determining a target interface corresponding to the resource update request based on the request path information; when the target interface exists in a preset interface set, storing a correspondence between the target link identifier and a current time in a link identifier sub-set corresponding to the target instance identifier in an identifier information set; the preset interface set comprises at least one interface used for providing an instance update service; obtaining a to-be-inquired time and a to-be-inquired instance identifier corresponding to a to-be-inquired resource instance; determining a target sub-set from a link identifier sub-set corresponding to the to-be-inquired instance identifier in the identifier information set; determining a to-be-inquired link identifier corresponding to a first historical time before the to-be-inquired time in the target sub-set; the identifier information set comprises a plurality of link identifier sub-sets corresponding to a plurality of instance identifiers in one-to-one correspondence; the link identifier sub-set comprises a plurality of link identifiers corresponding to a plurality of historical times in one-to-one correspondence; the to-be-inquired link identifier is used for identifying a service link associated with the to-be-inquired resource instance; determining link information of the service link associated with the to-be-inquired resource instance based on the to-be-inquired link identifier.

2. The information query method of claim 1, wherein, The determining of the link information of the service link associated with the to-be-inquired resource instance based on the to-be-inquired link identifier comprises: reading route request information and log information corresponding to the to-be-inquired link identifier to obtain the link information.

3. An information inquiry apparatus characterized by comprising: The method comprises: an obtaining unit, a determining unit and a storing unit; the obtaining unit is configured to receive a resource update request sent by a terminal for updating a target resource instance; the resource update request comprises request path information, a target instance identifier and a target link identifier; the target link identifier is used for identifying a service link associated with the resource update request; the determining unit is configured to determine a target interface corresponding to the resource update request based on the request path information; the storing unit is configured to, when the target interface exists in a preset interface set, store a correspondence between the target link identifier and a current time in a link identifier sub-set corresponding to the target instance identifier in an identifier information set; the preset interface set comprises at least one interface used for providing an instance update service; the obtaining unit is further configured to obtain a to-be-inquired time and a to-be-inquired instance identifier corresponding to a to-be-inquired resource instance; the determining unit is further configured to determine a target sub-set from a link identifier sub-set corresponding to the to-be-inquired instance identifier in the identifier information set; The determining unit is further configured to determine a link identifier corresponding to a first historical time before the to-be-queried time in the target subset as a to-be-queried link identifier; the identifier information set comprises a plurality of link identifier subsets corresponding to a plurality of instance identifiers one by one; the link identifier subset comprises a plurality of link identifiers corresponding to a plurality of historical times one by one; and the to-be-queried link identifier is used to identify a service link associated with the to-be-queried resource instance. The determining unit is further configured to determine link information of the service link associated with the to-be-queried resource instance based on the to-be-queried link identifier.

4. The information inquiry apparatus according to claim 3, wherein The determining unit is specifically configured to: read route request information and log information corresponding to the to-be-queried link identifier to obtain the link information.

5. An information inquiry apparatus characterized by comprising: The information query device comprises a memory and a processor; the memory is configured to store computer execution instructions; the processor is connected with the memory through a bus; when the information query device is running, the processor executes the computer execution instructions stored in the memory, so that the information query device executes the information query method according to any one of claims 1-2.

6. A computer-readable storage medium, characterized in that, The computer readable storage medium comprises computer execution instructions; when the computer execution instructions run on a computer, the computer executes the information query method according to any one of claims 1-2.

Citation Information

Patent Citations

  • Virtualized service monitoring method and device

    CN107306196A