CN112733001B - Method and device for acquiring subscription information and electronic equipment - Google Patents

Method and device for acquiring subscription information and electronic equipment Download PDF

Info

Publication number
CN112733001B
CN112733001B CN202110046603.5A CN202110046603A CN112733001B CN 112733001 B CN112733001 B CN 112733001B CN 202110046603 A CN202110046603 A CN 202110046603A CN 112733001 B CN112733001 B CN 112733001B
Authority
CN
China
Prior art keywords
information
subscription
query
query system
client
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.)
Active
Application number
CN202110046603.5A
Other languages
Chinese (zh)
Other versions
CN112733001A (en
Inventor
杨红生
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Blue Cloud Network Technology Co ltd
Original Assignee
Shanghai Blue Cloud Network 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 Shanghai Blue Cloud Network Technology Co ltd filed Critical Shanghai Blue Cloud Network Technology Co ltd
Priority to CN202110046603.5A priority Critical patent/CN112733001B/en
Publication of CN112733001A publication Critical patent/CN112733001A/en
Application granted granted Critical
Publication of CN112733001B publication Critical patent/CN112733001B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation
    • G06F16/24532Query optimisation of parallel queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5018Thread allocation

Abstract

The embodiment of the application discloses a method, a device and electronic equipment for acquiring subscription information, wherein the method comprises the following steps: acquiring query request parameters required by querying subscription information from a query system of a cloud computing platform; acquiring Cookie information issued after the login request of the query system to the client is verified to pass after the client corresponding to the cloud computing platform successfully logs in the query system; creating corresponding threads aiming at each subscription identifier in the input subscription identifiers, wherein the threads call httpclient examples respectively in an asynchronous mode; the httpclient instance is used to: sending an information acquisition request carrying the Cookie information and a subscription identifier to the query system based on the corresponding query request parameters; and receiving subscription information returned after the query system determines that the client side has information acquisition permission according to the Cookie information. The method and the device realize the simultaneous inquiry of the subscription information of a plurality of subscription identifications, and improve the inquiry efficiency.

Description

Method and device for acquiring subscription information and electronic equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, and an electronic device for acquiring subscription information.
Background
Windows Azure, abbreviated as Azure, is a public cloud computing platform for enterprises to run applications on the Internet. The enterprise acquires the resources of the cloud computing platform through subscription, each single subscription has a corresponding subscription identifier and subscription information, and the corresponding subscription information such as subscriber information, subscription time, subscription resources, subscription cost and the like can be queried through the subscription identifiers. In daily work of Azure, it is often necessary to query subscription information, such as mail, telephone, etc., through subscription identification.
At present, the subscription information query mode for Azure is realized through a query system CMAT in Azure. The characteristic of inquiring information by using the CMAT is that when inquiring subscription information corresponding to a plurality of subscription identifiers respectively, an inquiry request needs to be sequentially generated and sent at a client (i.e. a CMAT browser), and after the subscription information corresponding to the last subscription identifier is obtained, the next subscription identifier can be input for inquiring.
FIG. 1a is a schematic diagram showing a CMAT browser logging in a query system CMAT for information query. The CMAT browser sends out a query request, and feeds the queried subscription information back to the CMAT browser.
Fig. 1b is a schematic diagram of a user inputting subscription identifiers corresponding to subscription information to be queried on a CMAT browser.
FIG. 1c is a display interface of the summary of subscription information queried and fed back by the CMAT on the CMAT browser, and clicking on the button with arrow on the right side of FIG. 1c, the CMAT browser can display more detailed subscription information content, as shown in FIG. 1 d.
FIG. 1d is an interface displayed by the CMAT browser that contains more detailed subscription information content.
The above prior art has the disadvantages that: the query requests need to be sequentially generated and sent at the client, and the query efficiency is low.
How to improve the query efficiency of querying subscription information corresponding to each of a plurality of subscription identifiers is a problem to be solved.
Disclosure of Invention
The application aims to provide a method, a device and electronic equipment for acquiring subscription information, which are used for solving the problem of lower efficiency caused by the fact that a query request needs to be sent in sequence when subscription information corresponding to a plurality of subscription identifiers is queried in the prior art.
In order to solve the technical problems, the embodiment of the application is realized as follows:
in a first aspect, a method for acquiring subscription information is provided, including:
acquiring query request parameters required by querying subscription information from a query system of a cloud computing platform;
after a client corresponding to the cloud computing platform successfully logs in the query system, acquiring Cookie information issued after the query system verifies that a login request of the client passes, wherein the Cookie information at least comprises identification information of the client which is successfully logged in based on the login request;
creating corresponding threads aiming at each subscription identifier in the input subscription identifiers, wherein the threads call httpclient examples respectively in an asynchronous mode; the httpclient instance is used to: sending an information acquisition request carrying the Cookie information and a subscription identifier to the query system based on the corresponding query request parameters;
receiving subscription information returned after the query system determines that the client side has information acquisition permission according to the Cookie information; and inquiring the returned subscription information from the subscription information stored by the cloud computing platform by the inquiring system according to each subscription identifier in the plurality of subscription identifiers.
In a second aspect, an apparatus for acquiring subscription information is provided, including: a query request parameter acquisition module, a Cookie information acquisition module, an information acquisition request sending module and a subscription information receiving module, wherein,
the query request parameter acquisition module is used for acquiring query request parameters required by querying subscription information from a query system of the cloud computing platform;
the Cookie information acquisition module is used for acquiring Cookie information issued after the login request of the query system to the client passes verification after the client corresponding to the cloud computing platform successfully logs in the query system, wherein the Cookie information at least comprises identification information of the client which is successfully logged in based on the login request;
the information acquisition request sending module is used for establishing corresponding threads aiming at each subscription identifier in the input subscription identifiers, wherein each thread adopts an asynchronous mode to call httpclient examples respectively; the httpclient instance is used to: sending an information acquisition request carrying the Cookie information and a subscription identifier to the query system based on the corresponding query request parameters;
the subscription information receiving module is used for receiving subscription information returned after the query system determines that the client side has information acquisition permission according to the Cookie information; and inquiring the returned subscription information from the subscription information stored by the cloud computing platform by the inquiring system according to each subscription identifier in the plurality of subscription identifiers.
In a third aspect, there is provided an electronic device comprising a processor, a memory and a computer program stored on the memory and executable on the processor, the computer program implementing the method for acquiring subscription information provided by the above embodiments when executed by the processor.
In a fourth aspect, a computer readable storage medium is provided, on which a computer program is stored, which when executed by a processor implements the method for acquiring subscription information provided by the above embodiment.
By adopting at least one technical scheme provided by the embodiment of the application, the subscription information of a plurality of subscription identifications is queried simultaneously, the query efficiency of querying the subscription information respectively corresponding to the plurality of subscription identifications is improved, and the problem that the efficiency is lower because query requests are required to be sequentially sent when the subscription information respectively corresponding to the plurality of subscription identifications is queried in the prior art is solved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1a is a schematic diagram of a CMAT browser logging in to a query system CMAT for information query.
Fig. 1b is a schematic diagram of a user inputting subscription identifiers corresponding to subscription information to be queried on a CMAT browser.
FIG. 1c is a display interface of a summary of subscription information queried and fed back by a CMAT on a CMAT browser.
FIG. 1d is an interface displayed by the CMAT browser containing detailed subscription information content.
Fig. 2a is a schematic flow chart of a method for obtaining subscription information according to a first embodiment of the present application.
Fig. 2b is a schematic diagram of a system framework of a method for obtaining subscription information according to the first embodiment of the present application.
Fig. 2c is a schematic diagram of query request parameters of a method for obtaining subscription information according to the first embodiment of the present application.
Fig. 2d is a schematic diagram of query request parameters of a method for obtaining subscription information according to the first embodiment of the present application.
Fig. 3a is a schematic flow chart of a method of querying subscription information provided by a second embodiment of the present application.
FIG. 3b is a schematic diagram of an interface for a user to query subscription information using an information query tool.
Fig. 3c is a schematic diagram of a user inputting subscription identifiers corresponding to subscription information to be queried on an information query tool.
FIG. 3d is a display interface of subscription information queried and fed back by the CMAT on the information query tool.
FIG. 3e is a display interface of subscription information queried and fed back by the CMAT on the information query tool.
Fig. 4 is a schematic diagram of an apparatus for acquiring subscription information according to an embodiment of the present application.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be clearly and completely described below with reference to specific embodiments of the present application and corresponding drawings. It will be apparent that the described embodiments are only some, but not all, embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The following describes in detail the technical solutions provided by the embodiments of the present application with reference to the accompanying drawings.
Example 1
In order to solve the problem that in the prior art, when querying subscription information respectively corresponding to a plurality of subscription identifiers, query requests are required to be sequentially sent, so that efficiency is low, the first embodiment of the application provides a method for acquiring subscription information.
The method may include, but is not limited to, a mobile phone, a tablet or personal computer (PersonalComputer, PC), a server cluster, etc. or may be Application software installed on a computing device, such as an Application (APP) installed on a computer, etc.
Taking an execution body of the method as an information query tool installed on a computer and used for simulating a client to query subscription information as an example, fig. 2a is a specific flow diagram of a method for acquiring subscription information according to an embodiment of the present application, and the method can be applied to a system architecture as shown in fig. 2 b.
In fig. 2b, there are included an information query tool (such as a so-called Cmat Search tool), a client (such as a Cmat browser) corresponding to the cloud computing platform, and a query system (such as a Cmat) of the cloud computing platform.
Based on the system architecture as shown in fig. 2b, the method provided by embodiment 1 may comprise the following steps as shown in fig. 2 a:
s11: the information inquiry tool acquires inquiry request parameters required by inquiring subscription information from an inquiry system of the cloud computing platform;
the query system of the cloud computing platform stores subscription information of subscription of the subscriber on the cloud computing platform, the subscriber subscribes resources on the cloud computing platform, and each single subscription of the subscriber on the cloud computing platform has a subscription identifier and subscription information corresponding to the subscription identifier, such as subscriber information, subscription time, subscription resources, subscription fees and the like. The corresponding subscription information may be queried by the subscription identification.
As described in the background art, in the prior art, a manner of sequentially generating and sending query requests by a client may be used to perform subscription information query, but such a manner has a problem of low efficiency. In the embodiment of the application, in order to improve the query efficiency, a mode of simulating the behavior of the client by the information query tool to query is adopted.
Different from a real mode that a client sequentially generates and transmits query requests, in the embodiment of the application, when an information query tool simulates the behavior of the client, a mode that a plurality of query requests are transmitted asynchronously by multiple threads is adopted.
Wherein, the multithreading refers to creating threads for calling httpclient examples respectively; the httpclient instance is used for generating an http message for sending the query request. "asynchronous", corresponding to synchronous, refers to having the CPU temporarily hold the response of the current request, processing the next request. httpclient is a client programming toolkit that can support the http protocol. httpclient can: (1) Methods to implement all http (get, post, put, head, etc.); (2) support automatic forwarding; (3) support https protocol; (4) supporting proxy servers, etc.
When the information inquiry tool simulates the behavior of a client to send an inquiry request to the inquiry system, the information inquiry tool needs to inquire according to inquiry request parameters which are identified by the inquiry system and are the same as the client request, for example, the information inquiry tool determines the sending address of the inquiry request according to the uniform resource locator of the storage address representing the subscription information, and determines the inquiry request method according to the request method. The information query tool is required to obtain query request parameters required to query subscription information from a query system of the cloud computing platform.
If different subscription information of the same subscription identification needs to be queried, query request parameters corresponding to the subscription information can be respectively acquired. For example, inquiring first subscription information corresponding to the subscription identification, and acquiring an inquiry request parameter corresponding to the first subscription information; and inquiring the second subscription information corresponding to the subscription identification, and acquiring the inquiry request parameters corresponding to the second subscription information.
In one embodiment, query request parameters for the subscription information are obtained from historical query requests for the subscription information from the query system.
As shown in fig. 2c-2d, the query request parameters include a uniform resource locator (URL, uniform Resource Locator) characterizing the storage address of the subscription information. The query request parameters may further include: the request method of the query request, request type, cookies, content type, origin, reference, user-agent, submitted data and the like. The submitted data may include itemid, reuqest token, searchType, subid, lockingguide, pagesize, pageindex, etc.
According to the historical query request for querying the subscription information from the query system, acquiring the query request parameters of the subscription information comprises: and acquiring query request parameters through a packet grabbing tool according to an http request of historical query of querying the subscription information from the query system through a client. The capture tool may be, for example, a chrome developer tool.
S12: after the information inquiry tool successfully logs in the inquiry system based on the client corresponding to the cloud computing platform, acquiring Cookie information issued after the inquiry system verifies the login request, wherein the Cookie information at least comprises identification information of the client which is successfully logged in based on the login request;
in the embodiment of the application, the purpose of acquiring the Cookie information is to take into account that when the cloud computing platform is accessed, the cloud computing platform generates a unique ID for each access party according to the serial number of the browser of the access party and then stores the unique ID in the form of a Cookie file. The method comprises the steps that when an access party accesses the cloud computing platform again, the cloud computing platform carries Cookies, and whether the access party has access rights is judged according to the Cookies.
In one embodiment, before obtaining the Cookie information issued after the query system verifies the login request, the method further comprises:
based on the client, sending a login request carrying the identity information of the client to the query system;
and receiving a login success notification returned after the query system passes the authentication of the client identity information.
The Cookie information at least comprises identification information of the client which is successfully logged in based on the login request, and the identification information can comprise the name of the Cookie and a character string value stored in the Cookie. The Cookie information at least comprises name and value information. Name is a uniquely defined Cookie Name and value is a string value stored in the Cookie.
The query system may set a Cookie to be sent to the client, where a Cookie format may be: "name=value; domain=. Domain.com; path=/; expires=/". Where domain indicates which domain the Cookie is valid for. All requests sent to the domain will contain this Cookie information. path represents the path affected by this Cookie. The expire represents a dead time, a timestamp that indicates when the Cookie should be deleted (i.e., when the Cookie should stop being sent to the server.
In one embodiment, based on the client, sending a login request carrying the identity information of the client to the query system includes:
calling the selenium module of the client to execute:
sending a login page acquisition request to the query system;
receiving a login page with a login information input box returned by the query system;
acquiring the input information through the login information input box as the client identity information;
and sending a login request carrying the client identity information to the query system.
The selenium module may simulate user operations, such as simulating a login operation of a user to a login query system. Calling the selenium module to log in the query system can obtain Cookies of the query system through the selenium, and lays a foundation for the httpclient instance of each thread to send out information acquisition requests.
For a user inquiring subscription information through an application program in the embodiment of the application, clicking a login button in the application program, calling a selenium module by the application program, opening a login page with a login information input box in a browser according to a login URL, inputting an account number in the login information input box by the user for login, and if the login is successful, receiving Cookie information issued after the inquiry system verifies a login request.
S13: creating corresponding threads aiming at each subscription identifier in the input subscription identifiers, wherein the threads call httpclient examples respectively in an asynchronous mode; the httpclient instance is used to: sending an information acquisition request carrying the Cookie information and a subscription identifier to the query system based on the corresponding query request parameters;
for each subscription identifier in the input subscription identifiers, a thread is respectively created, and each thread calls an httpclient instance in an asynchronous mode, wherein the httpclient instance is used for: and sending an information acquisition request carrying the Cookie information and the subscription identifier to the query system. And each thread calls the httpclient instance in an asynchronous mode to send an information acquisition request to the query system, and the httpclient instance can be called by other threads to send the information acquisition request without waiting for one thread to receive the httpclient response message. The asynchronous mode can basically realize that each thread calls httpclient instance simultaneously and sends information acquisition request simultaneously. Thereby improving the query efficiency of querying subscription information respectively corresponding to a plurality of subscription identifiers,
for example, for subscription identifier 1, creating thread 1, which is used for calling httpclient instance, and the httpclient instance sends an information acquisition request carrying the Cookie information and subscription identifier 1 to the query system; and for the subscription identifier 2, creating a thread 2 for calling an httpcylent instance, wherein the httpcylent instance sends an information acquisition request carrying the Cookie information and the subscription identifier 2 to the query system. Thread 1 and thread 2 call httpclient instances in an asynchronous manner.
And calling an httpClient instance to send an information acquisition request to the query system based on the query request parameters, wherein the information acquisition request comprises the following steps: and determining a request method of the httpcylent instance based on the request method, designating the query address of the httpcylent instance based on the URL, and calling the execution of the httpcylent object to send an information acquisition request carrying the Cookie information and the subscription identifier. The request method of the httpclient instance can be a GET request or a POST request. If a GET request needs to be sent, calling a GET method of the httpcLIent instance; if a POST request needs to be sent, a POST method of the httpcLIent instance is called.
S14: the information inquiry tool receives subscription information returned after the inquiry system determines that the client side has information acquisition permission according to the Cookie information; and inquiring the returned subscription information from the subscription information stored by the cloud computing platform by the inquiring system according to each subscription identifier in the plurality of subscription identifiers.
And the cloud computing platform stores subscription identifiers and subscription information corresponding to the subscription identifiers. And obtaining subscription information corresponding to the subscription identification by inquiring according to the subscription identification. The subscription information includes subscriber information, such as mailbox phone of the subscriber.
And the query system compares the Cookie information carried by the client with the Cookie information issued to the client to determine whether the client has information acquisition permission. If the Cookie information carried by the client is the same as the Cookie information issued to the client, judging that the client has information acquisition permission.
In one embodiment, if the token is further allocated to the client after the query system verifies the login request, the method for acquiring the subscription information further includes:
acquiring a token allocated to the client after the login request is verified by the query system;
the httpclient instance is specifically used for: sending an information acquisition request carrying the Cookie information, a subscription identifier and the token to the query system based on the corresponding query request parameters;
and receiving subscription information returned after the query system determines that the client has information acquisition permission according to the Cookie information and the token.
The token may be to sign the client identity information based on a preset algorithm and a key, and use the signature and the client identity information together as the token. The determining, by the query system, whether the client has the information acquisition authority according to the token may include: and the query system calculates a signature for the identity information of the client based on a preset algorithm and a key according to the token carried by the client, compares the signature with the signature in the token, and determines that the client has information acquisition permission if the signature is the same with the signature in the token.
Subscription information can be obtained through httplock messages returned by the httpcLIent method, and response heads of the server can be obtained by calling methods such as headers, statuscode of the httpcLIent method; the content method calling httprensemessage can obtain the return information.
If the returned subscription information comprises the subscription information in the json format, the subscription information in the json format can be converted into json objects. And (3) reversely serializing the returned Json format subscription information to generate corresponding data objects, and finally displaying the corresponding data objects in a Result, and writing the data objects into a database if necessary. The data is displayed by utilizing the entrusting method of Windows From, so that the user can copy the data conveniently.
The embodiment realizes the simultaneous inquiry of the subscription information of a plurality of subscription identifications, improves the inquiry efficiency of inquiring the subscription information respectively corresponding to the plurality of subscription identifications, and solves the problem of lower efficiency because inquiry requests are required to be sent in sequence when the subscription information respectively corresponding to the plurality of subscription identifications is inquired in the prior art.
Example two
Fig. 3a is a schematic diagram illustrating main steps of a method for querying subscription information according to a second embodiment of the present application. Fig. 3 b-3 e are schematic diagrams illustrating an interface for querying subscription information according to an embodiment of the present application.
As shown in fig. 3a, a method for querying subscription information according to a second embodiment of the present application may include the following steps:
s31: clicking a login button, and inputting the identity information of the client in a login information input box of the returned login page.
S32: a plurality of subscription identifications are input in a subscription identification input box, and a query button is clicked.
S33: and acquiring returned subscription information respectively corresponding to the subscription identifiers.
The following describes a flow of querying subscription information in the prior art by a client in a query system CMAT of Azure. As shown in the interfaces of the clients of fig. 1 a-1 d, the flow includes: and inputting a subscription identifier in the subscription identifier input box, and clicking a search button to obtain subscription information. When inquiring subscription information corresponding to the subscription identifiers respectively, the user needs to send an inquiry request in sequence, and after acquiring the subscription information corresponding to the previous subscription identifier, the user can input the next subscription identifier to inquire.
Taking inquiring about subscriber information as an example, a flow of inquiring about subscriber information in the CMAT inquiry system of Azure by the information inquiry tool will be described. As shown in the interfaces of the information query tools of fig. 3 b-3 e, the process includes:
clicking a LoginCMAT in an application program, and receiving a login page with a login information input box returned by a query system; inputting client identity information in a login information input box of a login page; after successful login, "log ok" is displayed; copying subscription IDs to be queried, wherein each subscription ID occupies one row; clicking "SearchOrg" waits for the result to be returned. The Results return the required subscriber information including the registered name, mail, phone, company name, the subscription corresponding OrgID and customer type, etc. when the contact is registered.
Example III
In order to solve the problem that in the prior art, when querying subscription information respectively corresponding to a plurality of subscription identifiers, query requests need to be sent in sequence, so that efficiency is low, the third embodiment of the application provides a device for acquiring subscription information.
Fig. 4 is a schematic diagram of an apparatus for acquiring subscription information according to an embodiment of the present application. As shown in fig. 4, the apparatus for acquiring subscription information in the embodiment of the present application mainly includes: a query request parameter acquisition module, a Cookie information acquisition module, an information acquisition request sending module and a subscription information receiving module, wherein,
the query request parameter acquisition module is used for acquiring query request parameters required by querying subscription information from a query system of the cloud computing platform;
the Cookie information acquisition module is used for acquiring Cookie information issued after the login request of the query system to the client passes verification after the client corresponding to the cloud computing platform successfully logs in the query system, wherein the Cookie information at least comprises identification information of the client which is successfully logged in based on the login request;
the information acquisition request sending module is used for establishing corresponding threads aiming at each subscription identifier in the input subscription identifiers, wherein each thread adopts an asynchronous mode to call httpclient examples respectively; the httpclient instance is used to: sending an information acquisition request carrying the Cookie information and a subscription identifier to the query system based on the corresponding query request parameters;
the subscription information receiving module is used for receiving subscription information returned after the query system determines that the client side has information acquisition permission according to the Cookie information; and inquiring the returned subscription information from the subscription information stored by the cloud computing platform by the inquiring system according to each subscription identifier in the plurality of subscription identifiers.
Example IV
The embodiment of the present application further provides an electronic device, where the electronic device is configured to execute the method for obtaining subscription information, and fig. 5 is a schematic structural diagram of an electronic device for implementing the embodiments of the present application, where, as shown in fig. 5, the electronic device may have a relatively large difference due to different configurations or performances, and may include one or more processors 501 and a memory 502, where the memory 502 may store one or more storage applications or data. Wherein the memory 502 may be transient storage or persistent storage. The application programs stored in memory 502 may include one or more modules (not shown), each of which may include a series of computer-executable instructions for use in an electronic device. Still further, the processor 501 may be configured to communicate with the memory 502 and execute a series of computer executable instructions in the memory 502 on an electronic device. The electronic device may also include one or more power supplies 503, one or more wired or wireless network interfaces 504, one or more input/output interfaces 505, and one or more keyboards 506.
In this embodiment, the electronic device includes a processor, a communication interface, a memory, and a communication bus; the processor, the communication interface and the memory complete communication with each other through a bus; the memory is used for storing a computer program; the processor is configured to execute the program stored in the memory, and implement the following method steps:
acquiring query request parameters required by querying subscription information from a query system of a cloud computing platform;
after a client corresponding to the cloud computing platform successfully logs in the query system, acquiring Cookie information issued after the query system verifies that a login request of the client passes, wherein the Cookie information at least comprises identification information of the client which is successfully logged in based on the login request;
creating corresponding threads aiming at each subscription identifier in the input subscription identifiers, wherein the threads call httpclient examples respectively in an asynchronous mode; the httpclient instance is used to: sending an information acquisition request carrying the Cookie information and a subscription identifier to the query system based on the corresponding query request parameters;
receiving subscription information returned after the query system determines that the client side has information acquisition permission according to the Cookie information; and inquiring the returned subscription information from the subscription information stored by the cloud computing platform by the inquiring system according to each subscription identifier in the plurality of subscription identifiers.
The embodiment of the application also provides a computer readable storage medium, wherein the storage medium stores a computer program, and the computer program realizes the following method steps when being executed by a processor:
acquiring query request parameters required by querying subscription information from a query system of a cloud computing platform;
after a client corresponding to the cloud computing platform successfully logs in the query system, acquiring Cookie information issued after the query system verifies that a login request of the client passes, wherein the Cookie information at least comprises identification information of the client which is successfully logged in based on the login request;
creating corresponding threads aiming at each subscription identifier in the input subscription identifiers, wherein the threads call httpclient examples respectively in an asynchronous mode; the httpclient instance is used to: sending an information acquisition request carrying the Cookie information and a subscription identifier to the query system based on the corresponding query request parameters;
receiving subscription information returned after the query system determines that the client side has information acquisition permission according to the Cookie information; and inquiring the returned subscription information from the subscription information stored by the cloud computing platform by the inquiring system according to each subscription identifier in the plurality of subscription identifiers.
It will be apparent to those skilled in the art that embodiments of the present application may be provided as a method, apparatus, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, the electronic device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It is to be understood that the embodiments of the application described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For a hardware implementation, the processing units may be implemented within one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processors (Digital Signal Processing, DSP), digital signal processing devices (DSP devices, DSPD), programmable logic devices (Programmable Logic Device, PLD), field programmable gate arrays (Field-Programmable Gate Array, FPGA), general purpose processors, controllers, microcontrollers, microprocessors, other electronic units designed to perform the functions described herein, or a combination thereof.
For a software implementation, the techniques described in embodiments of the present application may be implemented by modules (e.g., procedures, functions, and so on) that perform the functions described in embodiments of the present application. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and variations of the present application will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. which come within the spirit and principles of the application are to be included in the scope of the claims of the present application.

Claims (9)

1. A method for obtaining subscription information, comprising:
acquiring query request parameters required by querying subscription information from a query system of a cloud computing platform;
after a client corresponding to the cloud computing platform successfully logs in the query system, acquiring Cookie information issued after the query system verifies that a login request of the client passes, wherein the Cookie information at least comprises identification information of the client which is successfully logged in based on the login request;
creating corresponding threads aiming at each subscription identifier in the input subscription identifiers, wherein the threads call httpclient examples respectively in an asynchronous mode; the httpclient instance is used to: sending an information acquisition request carrying the Cookie information and a subscription identifier to the query system based on the corresponding query request parameters;
receiving subscription information returned after the query system determines that the client side has information acquisition permission according to the Cookie information; the returned subscription information is obtained by the query system according to each subscription identifier in the plurality of subscription identifiers from the subscription information stored by the cloud computing platform;
the obtaining query request parameters required by querying subscription information from a query system of a cloud computing platform includes:
and acquiring query request parameters required by querying the subscription information according to the historical query request for querying the subscription information from the query system.
2. The method for obtaining subscription information according to claim 1, wherein before obtaining the Cookie information issued after the login request of the client is verified by the query system, the method further comprises:
sending a login request carrying the identity information of the client to the query system based on the client;
and receiving a login success notification returned after the query system passes the authentication of the client identity information.
3. The method for obtaining subscription information according to claim 2, wherein sending a login request carrying the client identity information to the query system based on the client comprises:
calling the selenium module of the client to execute: sending a login page acquisition request to the query system;
receiving a login page with a login information input box returned by the query system;
acquiring information input through the login information input box as the client identity information;
and sending a login request carrying the client identity information to the query system.
4. The method of obtaining subscription information of claim 1, wherein the returned subscription information comprises json formatted subscription information; then the first time period of the first time period,
the method further comprises the steps of:
and converting the subscription information in the json format into json objects.
5. The method of claim 1, wherein the query request parameters include a uniform resource locator URL characterizing a storage address of the subscription information.
6. The method of claim 1, wherein if a token is further allocated to the client after the query system verifies the login request, the method further comprises:
acquiring a token allocated to the client after the login request is verified by the query system;
the httpclient instance is specifically used for: sending an information acquisition request carrying the Cookie information, a subscription identifier and the token to the query system based on the corresponding query request parameters;
receiving subscription information returned after the query system determines that the client has information acquisition permission according to the Cookie information, wherein the subscription information comprises the following steps:
and receiving subscription information returned after the query system determines that the client has information acquisition permission according to the Cookie information and the token.
7. An apparatus for obtaining subscription information, comprising: a query request parameter acquisition module, a Cookie information acquisition module, an information acquisition request sending module and a subscription information receiving module, wherein,
the query request parameter acquisition module is used for acquiring query request parameters required by querying subscription information from a query system of the cloud computing platform;
the Cookie information acquisition module is used for acquiring Cookie information issued after the login request of the query system to the client passes verification after the client corresponding to the cloud computing platform successfully logs in the query system, wherein the Cookie information at least comprises identification information of the client which is successfully logged in based on the login request;
the information acquisition request sending module is used for establishing corresponding threads aiming at each subscription identifier in the input subscription identifiers, wherein each thread adopts an asynchronous mode to call httpclient examples respectively; the httpclient instance is used to: sending an information acquisition request carrying the Cookie information and a subscription identifier to the query system based on the corresponding query request parameters;
the subscription information receiving module is used for receiving subscription information returned after the query system determines that the client side has information acquisition permission according to the Cookie information; the returned subscription information is obtained by the query system according to each subscription identifier in the plurality of subscription identifiers from the subscription information stored by the cloud computing platform;
the obtaining query request parameters required by querying subscription information from a query system of a cloud computing platform includes:
and acquiring query request parameters required by querying the subscription information according to the historical query request for querying the subscription information from the query system.
8. An electronic device, comprising: memory, a processor and a computer program stored on the memory and executable on the processor, which when executed by the processor performs the steps of the method of obtaining subscription information as claimed in any one of claims 1 to 6.
9. A computer-readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the method of obtaining subscription information according to any one of claims 1 to 6.
CN202110046603.5A 2021-01-14 2021-01-14 Method and device for acquiring subscription information and electronic equipment Active CN112733001B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110046603.5A CN112733001B (en) 2021-01-14 2021-01-14 Method and device for acquiring subscription information and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110046603.5A CN112733001B (en) 2021-01-14 2021-01-14 Method and device for acquiring subscription information and electronic equipment

Publications (2)

Publication Number Publication Date
CN112733001A CN112733001A (en) 2021-04-30
CN112733001B true CN112733001B (en) 2023-09-29

Family

ID=75592910

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110046603.5A Active CN112733001B (en) 2021-01-14 2021-01-14 Method and device for acquiring subscription information and electronic equipment

Country Status (1)

Country Link
CN (1) CN112733001B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113486224A (en) * 2021-06-30 2021-10-08 中国民航信息网络股份有限公司 Method and device for creating monitoring instrument panel, storage medium and electronic equipment
CN115086431B (en) * 2022-06-10 2024-03-15 深圳市大族数控科技股份有限公司 PCB equipment data transmission method and device, computer equipment and storage medium
CN115951923B (en) * 2023-03-15 2023-05-16 深圳市思为软件技术有限公司 Subscription event management method, display system, device and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1852122A (en) * 2005-12-09 2006-10-25 华为技术有限公司 Presenting system and method for processing subscribing-in formation of subscribers by using same
CN107229623A (en) * 2016-03-23 2017-10-03 泰康保险集团股份有限公司 Data query processing method and processing device
CN107613002A (en) * 2017-09-20 2018-01-19 郑州云海信息技术有限公司 A kind of method, apparatus of inquiry apparatus information and its equipment used
CN107918673A (en) * 2017-12-12 2018-04-17 腾讯科技(深圳)有限公司 Subscribe to data processing method, device, storage medium and computer equipment
CN108306877A (en) * 2018-01-30 2018-07-20 泰康保险集团股份有限公司 Verification method, device and the storage medium of subscriber identity information based on NODE JS
CN108574620A (en) * 2017-03-09 2018-09-25 腾讯科技(深圳)有限公司 A kind of data subscription method, device, server and system
CN109254854A (en) * 2018-08-15 2019-01-22 中国平安人寿保险股份有限公司 Asynchronous invoking method, computer installation and storage medium
CN112069175A (en) * 2020-08-25 2020-12-11 北京五八信息技术有限公司 Data query method and device and electronic equipment

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6950821B2 (en) * 2001-05-04 2005-09-27 Sun Microsystems, Inc. System and method for resolving distributed network search queries to information providers
US10445433B2 (en) * 2014-04-28 2019-10-15 Venkatachary Srinivasan Methods and systems of query engines and secondary indexes implemented in a distributed database
US11256696B2 (en) * 2018-10-15 2022-02-22 Ocient Holdings LLC Data set compression within a database system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1852122A (en) * 2005-12-09 2006-10-25 华为技术有限公司 Presenting system and method for processing subscribing-in formation of subscribers by using same
CN107229623A (en) * 2016-03-23 2017-10-03 泰康保险集团股份有限公司 Data query processing method and processing device
CN108574620A (en) * 2017-03-09 2018-09-25 腾讯科技(深圳)有限公司 A kind of data subscription method, device, server and system
CN107613002A (en) * 2017-09-20 2018-01-19 郑州云海信息技术有限公司 A kind of method, apparatus of inquiry apparatus information and its equipment used
CN107918673A (en) * 2017-12-12 2018-04-17 腾讯科技(深圳)有限公司 Subscribe to data processing method, device, storage medium and computer equipment
CN108306877A (en) * 2018-01-30 2018-07-20 泰康保险集团股份有限公司 Verification method, device and the storage medium of subscriber identity information based on NODE JS
CN109254854A (en) * 2018-08-15 2019-01-22 中国平安人寿保险股份有限公司 Asynchronous invoking method, computer installation and storage medium
CN112069175A (en) * 2020-08-25 2020-12-11 北京五八信息技术有限公司 Data query method and device and electronic equipment

Also Published As

Publication number Publication date
CN112733001A (en) 2021-04-30

Similar Documents

Publication Publication Date Title
CN112733001B (en) Method and device for acquiring subscription information and electronic equipment
CN111970315A (en) Method, device and system for pushing message
US20110302631A1 (en) Systems and methods for logging into an application on a second domain from a first domain in a multi-tenant database system environment
JP2019537767A5 (en)
CN111556006A (en) Third-party application system login method, device, terminal and SSO service platform
EP3170091B1 (en) Method and server of remote information query
CN107566323B (en) Application system login method and device
US10630574B2 (en) Link processing method, apparatus, and system
CN107276970B (en) Unbinding and binding method and device
CN104038503A (en) Cross-site logging method, cross-site logging device and cross-site logging system
CN110765484A (en) Credit investigation data processing method and electronic equipment
CN114024972B (en) Long connection communication method, system, device, equipment and storage medium
CN109726545B (en) Information display method, equipment, computer readable storage medium and device
CN104468248B (en) Service performance monitoring method, reverse proxy server, statistical analysis server and system
CN110943876B (en) URL state detection method, device, equipment and system
CN108683651B (en) Single sign-on method, server and system
US9665732B2 (en) Secure Download from internet marketplace
CN111211902A (en) Digital signature method and device based on enterprise browser
CN110390008A (en) Report method for pushing, device, computer equipment and storage medium
CN115632815A (en) Data updating method and device, electronic equipment and storage medium
CN112995357B (en) Domain name management method, device, medium and electronic equipment based on cloud hosting service
CN113746794B (en) Account processing method and device, electronic equipment and computer storage medium
CN110287070B (en) ESB special protocol interface test method, server and computer readable storage medium
CN111107080B (en) Error information pushing method, device and equipment and readable storage medium
CN113626789A (en) User operation request processing 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
GR01 Patent grant
GR01 Patent grant