CN114721840A - Service information acquisition method and device, computer equipment and storage medium - Google Patents

Service information acquisition method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN114721840A
CN114721840A CN202011530496.5A CN202011530496A CN114721840A CN 114721840 A CN114721840 A CN 114721840A CN 202011530496 A CN202011530496 A CN 202011530496A CN 114721840 A CN114721840 A CN 114721840A
Authority
CN
China
Prior art keywords
service information
requested
application program
authority
preset container
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011530496.5A
Other languages
Chinese (zh)
Inventor
杨羚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Oneplus Technology Shenzhen Co Ltd
Original Assignee
Oneplus Technology Shenzhen 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 Oneplus Technology Shenzhen Co Ltd filed Critical Oneplus Technology Shenzhen Co Ltd
Priority to CN202011530496.5A priority Critical patent/CN114721840A/en
Priority to PCT/CN2021/133071 priority patent/WO2022135015A1/en
Publication of CN114721840A publication Critical patent/CN114721840A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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/54Interprogram communication
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Stored Programmes (AREA)

Abstract

The application relates to a service information acquisition method, a service information acquisition device, computer equipment and a storage medium. The method comprises the following steps: receiving a first acquisition request aiming at service information to be requested, which is sent by an application program; inquiring whether a preset container stores a right value for acquiring the service information to be requested corresponding to the application program or not according to the first acquisition request; the preset container is associated with the component corresponding to the service information to be requested; if the authority value is inquired, inquiring whether the preset container stores the service information to be requested or not; and if the service information to be requested is inquired, returning the service information to be requested to the application program. By the method, the operating efficiency of the application program on the system can be improved, the user experience is improved, and when the system is busy, the method can also prevent the exhaustion of threads of the thread pool to cause the ANR or the restart of the device.

Description

Service information acquisition method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of terminal technologies, and in particular, to a method and an apparatus for acquiring service information, a computer device, and a storage medium.
Background
Currently, in an Android system, when an application (including a three-party application) needs to query information related to a system server, at least two IPC (Inter-Process Communication) requests need to be made. When the IPC request is made, the Server will start the thread pool, and the threads of the dispatch thread pool complete the request of the client, and the number of the threads of the thread pool of the System Server is only 16, and the number of the threads of the service end of the Telephony module is only 16. If more applications are consulted by the query System Server, or if some Application is abnormal, the problem of calling the Server process for many times in a short time occurs, the thread pool of the System Server is used up, great pressure is brought to the System, the whole Android device System is affected, the ANR (Application Not Responding, inter-process communication Application program is Not responded) of the Server occurs in serious cases, and the device is restarted in serious cases.
Therefore, the current method for querying the system server information by the application program has the problems that the system load is easily caused, and the server ANR and even the device are restarted.
Disclosure of Invention
Therefore, it is necessary to provide a service information acquiring method, a service information acquiring apparatus, a computer device, and a storage medium, for solving the technical problems that the method for querying the system server information by the application program easily causes system load, and causes server ANR, even restarting the apparatus.
A method of service information acquisition, the method comprising:
receiving a first acquisition request aiming at service information to be requested, which is sent by an application program;
inquiring whether a preset container stores a right value corresponding to the application program and used for acquiring the service information to be requested or not according to the first acquisition request; the preset container is associated with the component corresponding to the service information to be requested;
if the authority value is inquired, inquiring whether the preset container stores the service information to be requested or not;
and if the service information to be requested is inquired, returning the service information to be requested to the application program.
In one embodiment, the first obtaining request carries an application identifier of the application program;
the querying, according to the first obtaining request, whether a preset container stores a right value corresponding to the application program and used for obtaining the service information to be requested includes:
and inquiring whether a preset container stores a right value corresponding to the application program and used for acquiring the service information to be requested or not according to the application identifier carried by the first acquisition request.
In one embodiment, the querying whether the preset container stores the service information to be requested if the authority value is queried includes:
if the authority value is inquired, acquiring an authority identifier corresponding to the authority value;
and if the authority identification is a preset authority identification, inquiring whether the service information to be requested is stored in the preset container or not, wherein the preset authority identification is used for identifying the authority for acquiring the service information to be requested.
In one embodiment, after querying whether a preset container stores a right value corresponding to the application program for acquiring the service information to be requested, the method further includes:
if the authority value is not inquired, sending a second acquisition request to an activity management component, and triggering the activity management component to inquire whether the application program has the authority for acquiring the service information to be requested in a cross-process manner;
and receiving a query result returned by the activity management component, and storing the query result in the preset container.
In one embodiment, the storing the query result in the container includes:
if the query result indicates that the application program has the authority to acquire the service information to be requested, generating a first authority value;
if the query result indicates that the application program does not have the authority for acquiring the service information to be requested, generating a second authority value;
and storing the first authority value or the second authority value in the preset container after the first authority value or the second authority value is associated with the application program.
In one embodiment, after querying whether the preset container stores the service information to be requested, the method further includes:
if the service information to be requested is not inquired, sending a data acquisition request to a telephone assembly, and triggering the telephone assembly to acquire the service information to be requested;
and receiving the service information to be requested returned by the telephone assembly, associating the service information to be requested with the application program, and storing the service information to be requested in the preset container.
In one embodiment, the method further comprises:
and when receiving a message that the authority state of the application program for the service information to be requested is changed, clearing the authority value of the application program and the service information to be requested stored in the preset container.
A service information acquisition apparatus, the apparatus comprising:
the request receiving module is used for receiving a first acquisition request aiming at service information to be requested, which is sent by an application program;
the authority value query module is used for querying whether an authority value corresponding to the application program and used for acquiring the service information to be requested is stored in a preset container or not according to the first acquisition request; the preset container is associated with the component corresponding to the service information to be requested;
the information inquiry module is used for inquiring whether the service information to be requested is stored in the preset container or not if the authority value is inquired;
and the information returning module is used for returning the service information to be requested to the application program if the service information to be requested is inquired.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
receiving a first acquisition request aiming at service information to be requested, which is sent by an application program;
inquiring whether a preset container stores a right value corresponding to the application program and used for acquiring the service information to be requested or not according to the first acquisition request; the preset container is associated with the component corresponding to the service information to be requested;
if the authority value is inquired, inquiring whether the preset container stores the service information to be requested or not;
and if the service information to be requested is inquired, returning the service information to be requested to the application program.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
receiving a first acquisition request aiming at service information to be requested, which is sent by an application program;
inquiring whether a preset container stores a right value corresponding to the application program and used for acquiring the service information to be requested or not according to the first acquisition request; the preset container is associated with the component corresponding to the service information to be requested;
if the authority value is inquired, inquiring whether the preset container stores the service information to be requested or not;
and if the service information to be requested is inquired, returning the service information to be requested to the application program.
According to the service information acquisition method, the service information acquisition device, the computer equipment and the storage medium, when a first acquisition request aiming at service information to be requested sent by an application program is received, whether the preset container stores the authority value corresponding to the application program and used for acquiring the service information to be requested is directly inquired according to the first acquisition request, if the authority value is inquired, whether the service information to be requested is stored in the preset container is inquired, and if the service information to be requested is inquired, the service information to be requested is directly returned to the application program. According to the method, when the application program carries out cross-process operation on the server, the cross-process times and the execution of codes can be reduced in a temporary storage authority value and a temporary storage return value mode, IPC (inter process control) requests need to be carried out at least twice when service information to be requested is not required to be inquired each time, so that the operating efficiency of the application program on a system is improved, the user experience is improved, and when the system is busy, the situation that threads of a thread pool are exhausted to cause the ANR (automatic network routing) device or the device is restarted can be prevented.
Drawings
Fig. 1 is an application scenario diagram of a service information acquisition method in an embodiment;
FIG. 2 is a flow diagram illustrating a method for service information acquisition in one embodiment;
FIG. 3 is a flowchart illustrating a service information obtaining step according to an embodiment;
FIG. 4 is a flow chart illustrating a service information obtaining method in an embodiment;
FIG. 5 is a block diagram showing the construction of a service information acquisition apparatus according to an embodiment;
FIG. 6 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The service information acquisition method provided by the application can be applied to the application environment shown in fig. 1. Fig. 1 is an architecture diagram of an Andriod operating system, which includes four parts, namely an application program, an application program framework layer, a core class library, and a linux kernel, in the Andriod system, when an application program queries a system service for a relevant consultation, various system services can be obtained by a getSystemService (an application program interface in an android system, a corresponding object can be obtained according to an incoming object name, and then converted into a corresponding service object) method. In an application scenario of the application, an application program acquires a component in an application program framework layer through a getSystemservice method, such as a telephone manager, the component receives a first acquisition request for service information to be requested sent by the application program, inquires whether a preset container corresponding to the component stores an authority value for acquiring the service information to be requested corresponding to the application program according to the first acquisition request, inquires whether the preset container stores the service information to be requested if the authority value is inquired, and returns the service information to be requested to the application program if the service information to be requested is inquired.
In one embodiment, as shown in fig. 2, there is provided a service information obtaining method, including the steps of:
step S202, a first acquisition request for the service information to be requested sent by the application program is received.
The service information to be requested represents service information that the application program needs to acquire, such as telephone service and status information, location information, and the like.
The first obtaining request represents a request sent by an application program to a component corresponding to the service information to be requested.
For example, if the application needs to acquire the current location information of the terminal, a first acquisition request may be sent to the location manager of the application framework layer in fig. 1, the service information to be requested is the location information, and the first acquisition request is a request for the location information. For another example, if the application needs to acquire the phone service or status information, a first acquisition request may be sent to the phone manager in the application framework layer in fig. 1, the service information to be requested is the phone service or status information, and the first acquisition request is a request for the phone service or status information.
Step S204, inquiring whether a preset container stores a right value corresponding to the application program and used for acquiring the service information to be requested or not according to the first acquisition request; the preset container is associated with the component corresponding to the service information to be requested.
In an embodiment, if the first obtaining request carries an application identifier of an application program, step S204 specifically includes: and inquiring whether a preset container stores a right value corresponding to the application program and used for acquiring the service information to be requested or not according to the application identifier carried by the first acquisition request.
For example, if the first acquisition request is a request generated by an application program for telephone service information, and a component corresponding to the telephone service information is a telephone manager in an application framework layer shown in fig. 1, the telephone manager queries, according to an application identifier carried in the first acquisition request, whether a preset container corresponding to the telephone manager stores a permission value for acquiring the telephone service information corresponding to the application program. The different service information to be requested corresponds to different components, and each component is provided with a corresponding container for storing the authority value of the service information corresponding to each component acquired by each application program.
Step S206, if the authority value is found, it is determined whether the preset container stores the information about the service to be requested.
Further, in an embodiment, the step S206 specifically includes: if the authority value is inquired, acquiring an authority identifier corresponding to the authority value; and if the authority identifier is the preset authority identifier, inquiring whether the service information to be requested is stored in a preset container, wherein the preset authority identifier is used for identifying the authority for acquiring the service information to be requested.
In specific implementation, different authority values have corresponding authority identifiers, and the authority identifiers can be divided into authority and non-authority. After the authority value of the application program is inquired in the preset container, whether the application program has the authority to acquire the service information to be requested or not is determined according to the authority identifier corresponding to the authority value. When the authority identifier corresponding to the inquired authority value is authorized, whether the preset container stores the information of the service to be requested or not needs to be further inquired.
For example, taking the phone service information as the service information to be requested as an example, when it is queried that the authority value for the application program to acquire the phone service information is stored in the container corresponding to the phone manager, it indicates that the application program has sent the first acquisition request for the phone service information to the phone manager, but it is also required to determine the authority identifier of the authority value, and if the authority identifier corresponding to the authority value is authorized, it is further queried whether the preset container stores the phone service information. If the authority identifier corresponding to the authority value is no authority, the application program cannot acquire the telephone service information, and the telephone manager does not need to execute the step of inquiring whether the preset container stores the service information to be requested or not.
Step S208, if the service information to be requested is found, returning the service information to be requested to the application program.
For example, taking the phone service information as the service information to be requested as an example, if the phone service information to be acquired by the application program is inquired in the container corresponding to the phone manager, the phone service information can be directly returned to the application program.
In the service information acquisition method, when a first acquisition request aiming at service information to be requested sent by an application program is received, whether an authority value for acquiring the service information to be requested corresponding to the application program is stored in a preset container or not is directly inquired according to the first acquisition request, if the authority value is inquired, whether the service information to be requested is stored in the preset container or not is inquired, and if the service information to be requested is inquired, the service information to be requested is directly returned to the application program. According to the method, when the application program carries out cross-process operation on the server, the cross-process times and the execution of codes can be reduced in a temporary storage authority value and a temporary storage return value mode, IPC (inter process control) requests need to be carried out at least twice when service information to be requested is not required to be inquired each time, so that the operating efficiency of the application program on a system is improved, the user experience is improved, and when the system is busy, the situation that threads of a thread pool are exhausted to cause the ANR (automatic network routing) device or the device is restarted can be prevented.
In one embodiment, as shown in fig. 3, after the step S204, the method further includes:
step S302, if the authority value is not inquired, sending a second acquisition request to the activity management component, and triggering the activity management component to inquire whether the application program has the authority for acquiring the service information to be requested in a cross-process manner;
and step S304, receiving the query result returned by the activity management component, and storing the query result in a preset container.
Further, step S304 specifically includes: if the query result is that the application program has the authority to acquire the service information to be requested, generating a first authority value; if the query result is that the application program does not have the authority for acquiring the service information to be requested, generating a second authority value; and storing the first authority value or the second authority value in a preset container after the first authority value or the second authority value is associated with the application program.
The Activity management component is an important part of an Android framework, and is responsible for creating a new Activity thread and maintaining an Activity lifecycle, that is, an Activity manager in an application framework layer in fig. 1.
The second acquisition request represents an IPC (Inter-Process Communication) request that is sent by the component corresponding to the service information to be requested acquired by the application to the active management component.
In a specific implementation, taking the phone service information as the service information to be requested as an example, if the authority value of the application program is not queried in the container corresponding to the phone manager, which indicates that the application program has not sent the first acquisition request for the phone service information to the phone manager, the phone manager needs to send the second acquisition request to the activity management component, and the activity management component queries whether the application program has the authority to acquire the phone service information across processes, and receives a query result returned by the activity management component. And if the query result indicates that the application program has the authority to acquire the telephone service information, generating a first authority value, and associating the first authority value with the application identifier of the application program and storing the first authority value and the application identifier of the application program into a container corresponding to the telephone manager. And if the query result indicates that the application program does not have the authority for acquiring the telephone service information, generating a second authority value, and associating the second authority value with the application identifier of the application program and storing the second authority value and the application identifier of the application program into a container corresponding to the telephone manager.
In this embodiment, when the authority value of the application program is not queried, the activity management component queries whether the application program has the authority to acquire the service information to be requested in a cross-process manner, and associates the query result with the application program and stores the associated result in the preset container, so that when the subsequent application program acquires the service information to be requested again, whether the application program has the authority to acquire the service information to be requested can be directly queried from the preset container, and the activity management component does not need to query in a cross-process manner, thereby reducing the occupation of the process and the time for acquiring the query result.
In one embodiment, after the step S206, the method further includes: if the service information to be requested is not inquired, sending a data acquisition request to the telephone assembly, and triggering the telephone assembly to acquire the service information to be requested; and receiving service information to be requested returned by the telephone assembly, associating the service information to be requested with the application program, and storing the service information to be requested in a preset container.
For example, if the telephone service information required to be acquired by the application program is not inquired in the container corresponding to the telephone manager, the activity management component sends a data acquisition request to the telephone component across processes, so that the telephone component acquires the telephone service information from the lower-layer framework, the telephone component returns the acquired telephone service information to the telephone manager, and the telephone manager returns the telephone service information to the application program. Meanwhile, the telephone manager also stores the telephone service information returned by the telephone component in a container corresponding to the telephone manager after associating the telephone service information with the application identifier of the application program.
In the embodiment, when the service information to be requested, which is to be acquired by the application program, is not queried, the service information to be requested is acquired through the mobile phone component, and the received service information to be requested is associated with the application program and then stored in the preset container, so that when the subsequent application program acquires the service information to be requested again, the service information to be requested can be directly acquired from the preset container without returning the service information to be requested through the phone component, the time for the application program to acquire the service information to be requested is reduced, and the efficiency for the application program to acquire the service information to be requested is greatly improved.
In one embodiment, further comprising: and when receiving a message that the authority state of the application program is changed aiming at the service information to be requested, clearing the authority value of the application program and the service information to be requested stored in the preset container.
In a specific implementation, the authority of the application program for acquiring a certain service information to be requested may be modified, and when appopmanager (a component for dynamically detecting the authority of the application program) detects that the authority of the application program for the certain service information to be requested is changed, a notification message is sent to a component corresponding to the service information to be requested, so that the component clears the authority value associated with the application program and the service information to be requested, which are stored in a corresponding container.
For example, if the authority of the application program for acquiring the phone service information changes from authorized to unauthorized, AppOpsManager sends a notification message to the phone manager, so that the phone manager clears both the authority value of the application program and the phone service information stored in the corresponding container.
In this embodiment, when a message that the permission state of the application program changes for the service information to be requested is received, the permission value of the application program and the service information to be requested stored in the preset container are cleared, so as to implement synchronous update and consistency with the permission state of the application program.
In order to more clearly illustrate the technical solution provided by the embodiment of the present application, the following will describe the solution with reference to fig. 4, where fig. 4 is a schematic flow chart of a method for acquiring service information in an application example, and a specific flow of the method is as follows:
step (1), an Application program sends a first acquisition request for a Device ID (Device identification code, equivalent to service information to be requested) to a TelephonyManager.
And (2) the TelephonyManager checks whether a preset container stores the authority value of the application program for obtaining the Device ID temporarily, if so, the step (3) is carried out, and if not, the step (2.1) is carried out.
And (2.1) sending a second acquisition request to an ActivityManager by the TelephonManager, triggering the ActivityManager to inquire whether the application program has the right of accessing the Device ID or not in a cross-process manner, and storing the inquiry result into the preset container.
And (3) the TelephonyManager checks whether the Device ID is stored in the preset container, if so, the step (4) is carried out, and if not, the step (3.1) is carried out.
And (3.1) sending a data acquisition request to a Phone module (namely the telephone component), acquiring the Device ID by the Phone module, returning the Device ID to a TelephonyManager (a telephone manager) through a PhoneInterfaceManager, and storing the returned Device ID in a preset container by the TelephonyManager.
And (4) returning the Device ID to the application program.
And (5) if the authority value of the application program for acquiring the Device ID is changed (for example, the authority value of the application is manually cleared by a user), the AppOpsManager sends a notification message to TelephonManager, and the authority value of the application program and the Device ID stored in the preset container are cleared by the TelephonManager.
According to the service information acquisition method provided by the embodiment, when the application program performs cross-process operation on the server side in the Android device, the number of cross-process operations and the execution of codes can be reduced in a temporary storage permission value and a temporary storage feedback value mode, so that the operation efficiency of the application program on a system is improved, the user experience is improved, and when the system is busy, the thread exhaustion of a thread pool can be prevented to cause the ANR or the device to be restarted.
It should be understood that although the various steps in the flow charts of fig. 2-4 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-4 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 5, there is provided a service information acquisition apparatus including: a request receiving module 502, a right value inquiring module 504, an information inquiring module 506 and an information returning module 508, wherein:
a request receiving module 502, configured to receive a first obtaining request for service information to be requested, where the first obtaining request is sent by an application;
the authority value query module 504 is configured to query whether an authority value corresponding to the application program and used for acquiring the service information to be requested is stored in the preset container according to the first acquisition request; the preset container is associated with the component corresponding to the service information to be requested;
the information query module 506 is configured to query whether to store the service information to be requested in the preset container if the authority value is queried;
the information returning module 508 is configured to return the service information to be requested to the application program if the service information to be requested is queried.
In one embodiment, the first acquisition request carries an application identifier of an application program; the permission value query module 504 is specifically configured to query, according to the application identifier carried in the first acquisition request, whether a permission value corresponding to the application program and used for acquiring the service information to be requested is stored in the preset container.
In an embodiment, the information query module 506 is specifically configured to, if the authority value is queried, obtain an authority identifier corresponding to the authority value; and if the authority identifier is a preset authority identifier, inquiring whether the service information to be requested is stored in a preset container, wherein the preset authority identifier is used for identifying the authority for acquiring the service information to be requested.
In an embodiment, the authority value querying module 504 is further configured to send a second obtaining request to the activity management component if the authority value is not queried, and trigger the activity management component to query, across processes, whether the application has an authority to obtain the service information to be requested; and receiving a query result returned by the activity management component, and storing the query result in a preset container.
In an embodiment, the authority value query module 504 is further configured to generate a first authority value if the query result indicates that the application program has an authority to obtain the service information to be requested; if the query result is that the application program does not have the authority for acquiring the service information to be requested, generating a second authority value; and storing the first authority value or the second authority value in a preset container after the first authority value or the second authority value is associated with the application program.
In an embodiment, the information query module 506 is further configured to send a data acquisition request to the telephone component if the service information to be requested is not queried, and trigger the telephone component to acquire the service information to be requested; and receiving service information to be requested returned by the telephone assembly, associating the service information to be requested with the application program, and storing the service information to be requested in a preset container.
In one embodiment, the above apparatus further comprises:
and the clearing module is used for clearing the authority value of the application program and the service information to be requested stored in the preset container when receiving the message that the authority state of the application program for the service information to be requested is changed.
It should be noted that, the service information obtaining apparatus of the present application corresponds to the service information obtaining method of the present application one to one, and the technical features and the advantages thereof described in the embodiments of the service information obtaining method are all applicable to the embodiments of the service information obtaining apparatus, and specific contents may refer to the descriptions in the embodiments of the service information obtaining apparatus, and are not described herein again, and thus, the present application claims the service information obtaining apparatus.
In addition, all or part of each module in the service information acquisition apparatus may be implemented by software, hardware, or a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 6. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a service information acquisition method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 6 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, there is provided a computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
receiving a first acquisition request aiming at service information to be requested, which is sent by an application program;
inquiring whether a preset container stores a right value corresponding to the application program and used for acquiring service information to be requested or not according to the first acquisition request; the preset container is associated with the component corresponding to the service information to be requested;
if the authority value is inquired, inquiring whether the preset container stores the information to be requested for service;
and if the service information to be requested is inquired, returning the service information to be requested to the application program.
In one embodiment, a computer device is further provided, which includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of the above method embodiments when executing the computer program.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, performs the steps of:
receiving a first acquisition request aiming at service information to be requested, which is sent by an application program;
inquiring whether a preset container stores a right value corresponding to the application program and used for acquiring service information to be requested or not according to the first acquisition request; the preset container is associated with the component corresponding to the service information to be requested;
if the authority value is inquired, inquiring whether the preset container stores the information to be requested for service;
and if the service information to be requested is inquired, returning the service information to be requested to the application program.
In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A service information acquisition method, characterized in that the method comprises:
receiving a first acquisition request aiming at service information to be requested, which is sent by an application program;
inquiring whether a preset container stores a right value corresponding to the application program and used for acquiring the service information to be requested or not according to the first acquisition request; the preset container is associated with the component corresponding to the service information to be requested;
if the authority value is inquired, inquiring whether the preset container stores the service information to be requested or not;
and if the service information to be requested is inquired, returning the service information to be requested to the application program.
2. The method according to claim 1, wherein the first acquisition request carries an application identifier of the application program;
the querying, according to the first obtaining request, whether a preset container stores a right value corresponding to the application program and used for obtaining the service information to be requested includes:
and inquiring whether a preset container stores a right value corresponding to the application program and used for acquiring the service information to be requested or not according to the application identifier carried by the first acquisition request.
3. The method according to claim 1, wherein the querying whether the preset container stores the service information to be requested if the authority value is queried comprises:
if the authority value is inquired, acquiring an authority identifier corresponding to the authority value;
and if the authority identification is a preset authority identification, inquiring whether the service information to be requested is stored in the preset container or not, wherein the preset authority identification is used for identifying the authority for acquiring the service information to be requested.
4. The method according to claim 1, after querying whether a preset container stores a right value corresponding to the application program for acquiring the service information to be requested, further comprising:
if the authority value is not inquired, sending a second acquisition request to an activity management component, and triggering the activity management component to inquire whether the application program has the authority for acquiring the service information to be requested in a cross-process manner;
and receiving a query result returned by the activity management component, and storing the query result in the preset container.
5. The method of claim 4, wherein storing the query result in the container comprises:
if the query result indicates that the application program has the authority to acquire the service information to be requested, generating a first authority value;
if the query result indicates that the application program does not have the authority for acquiring the service information to be requested, generating a second authority value;
and storing the first authority value or the second authority value in the preset container after associating the first authority value or the second authority value with the application program.
6. The method according to claim 1, further comprising, after querying whether the service information to be requested is stored in the preset container:
if the service information to be requested is not inquired, sending a data acquisition request to a telephone assembly, and triggering the telephone assembly to acquire the service information to be requested;
and receiving the service information to be requested returned by the telephone assembly, associating the service information to be requested with the application program, and storing the service information to be requested in the preset container.
7. The method according to any one of claims 1-6, further comprising:
and when receiving a message that the authority state of the application program for the service information to be requested is changed, clearing the authority value of the application program and the service information to be requested stored in the preset container.
8. A service information acquisition apparatus, characterized in that the apparatus comprises:
the request receiving module is used for receiving a first acquisition request aiming at service information to be requested, which is sent by an application program;
the authority value query module is used for querying whether an authority value corresponding to the application program and used for acquiring the service information to be requested is stored in a preset container or not according to the first acquisition request; the preset container is associated with the component corresponding to the service information to be requested;
the information inquiry module is used for inquiring whether the preset container stores the service information to be requested or not if the authority value is inquired;
and the information returning module is used for returning the service information to be requested to the application program if the service information to be requested is inquired.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202011530496.5A 2020-12-22 2020-12-22 Service information acquisition method and device, computer equipment and storage medium Pending CN114721840A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202011530496.5A CN114721840A (en) 2020-12-22 2020-12-22 Service information acquisition method and device, computer equipment and storage medium
PCT/CN2021/133071 WO2022135015A1 (en) 2020-12-22 2021-11-25 Service information acquisition method and apparatus, computer device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011530496.5A CN114721840A (en) 2020-12-22 2020-12-22 Service information acquisition method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114721840A true CN114721840A (en) 2022-07-08

Family

ID=82157356

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011530496.5A Pending CN114721840A (en) 2020-12-22 2020-12-22 Service information acquisition method and device, computer equipment and storage medium

Country Status (2)

Country Link
CN (1) CN114721840A (en)
WO (1) WO2022135015A1 (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2350946B1 (en) * 2008-11-03 2018-02-28 Telefonaktiebolaget LM Ericsson (publ) Pre-fetching of data in a mobile communications environment
CN103731799A (en) * 2012-10-11 2014-04-16 中兴通讯股份有限公司 Non-real-time position information acquisition method, mobile terminal and communication system
CN104837117A (en) * 2015-05-18 2015-08-12 严文发 Positioning terminal positioning method and system thereof
CN106713580B (en) * 2016-06-17 2019-01-29 腾讯科技(深圳)有限公司 A kind of telephone number recognition methods, security server and terminal
CN106851583A (en) * 2017-04-07 2017-06-13 广东欧珀移动通信有限公司 The location information acquisition method of mobile terminal, device and mobile terminal

Also Published As

Publication number Publication date
WO2022135015A1 (en) 2022-06-30

Similar Documents

Publication Publication Date Title
CN110612705B (en) Method for service deployment under server-free architecture and function management platform
CN111274214B (en) File lock processing method and device, electronic equipment and storage medium
CN111258565B (en) Method, system, server and storage medium for generating applet
WO2022105138A1 (en) Decentralized task scheduling method, apparatus, device, and medium
CN113407383B (en) Main and standby system switching method and device, server and main and standby system
CN110704177A (en) Computing task processing method and device, computer equipment and storage medium
CN110750343B (en) Cluster system timing task scheduling control method and cluster system
CN108966159B (en) Short message withdrawing method, system, computer equipment and storage medium
CN105516086A (en) Service processing method and apparatus
CN112395107A (en) Tax control equipment control method and device, storage medium and electronic equipment
CN112506587A (en) API deployment monitoring method, system, electronic device and storage medium
CN112232902B (en) Order data processing method, device and system, computer equipment and storage medium
CN113946427A (en) Task processing method, processor and storage medium for multi-operating system
JP2004030486A (en) Method for controlling distributed object and its execution system
CN114911717A (en) Data caching method and device, electronic equipment and storage medium
CN114721840A (en) Service information acquisition method and device, computer equipment and storage medium
CN114070820B (en) Domain name redirection method, device, medium and electronic equipment
CN116366634A (en) File downloading method, device, terminal, source server and medium
CN113535439B (en) Service request processing method, device, equipment and storage medium
CN113886082A (en) Request processing method and device, computing equipment and medium
CN113254150A (en) Load balancing method, system, device, computer equipment and storage medium
CN112417533A (en) Anti-screenshot method and device, computer equipment and storage medium
CN107341048B (en) Method and device for inquiring client occupying specific resources of server
CN112446023B (en) Application program right-lifting method, device, equipment and computer readable storage medium
CN115080276B (en) Application program function dynamic switching method and device, storage medium 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