CN107835225B - Method, device and equipment for acquiring data information - Google Patents

Method, device and equipment for acquiring data information Download PDF

Info

Publication number
CN107835225B
CN107835225B CN201710884857.8A CN201710884857A CN107835225B CN 107835225 B CN107835225 B CN 107835225B CN 201710884857 A CN201710884857 A CN 201710884857A CN 107835225 B CN107835225 B CN 107835225B
Authority
CN
China
Prior art keywords
terminal
data information
service
terminals
key value
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
CN201710884857.8A
Other languages
Chinese (zh)
Other versions
CN107835225A (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.)
Wuba Co Ltd
Original Assignee
Wuba 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 Wuba Co Ltd filed Critical Wuba Co Ltd
Priority to CN201710884857.8A priority Critical patent/CN107835225B/en
Publication of CN107835225A publication Critical patent/CN107835225A/en
Application granted granted Critical
Publication of CN107835225B publication Critical patent/CN107835225B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/52Network services specially adapted for the location of the user terminal

Abstract

The invention provides a method, a device and equipment for acquiring data information, wherein the method comprises the following steps: when a terminal needs to initiate a first service, inquiring other terminals capable of providing the first service according to the position of the terminal; the terminal establishes connection with the searched terminal and requests the searched terminal for data information for initiating the first service; if the data information exists in the cache of the searched terminal, the data information is obtained from the cache of the searched terminal through a Key value, and the Key value is full-path information of an application App request in the terminal, so that the time for responding to the data information is reduced, the transmission speed of the data information is improved, the terminal can quickly show the data information to a user, and the user experience is improved.

Description

Method, device and equipment for acquiring data information
Technical Field
The embodiment of the invention relates to a communication technology, in particular to a method, a device and equipment for acquiring data information.
Background
With the development of communication technology, the mobile internet is popularized, users are not satisfied with single functions of making a call, sending a short message and the like for a mobile phone, and users need to acquire the latest data information in real time through the mobile phone.
Usually, data information is stored in a server, when an Application (App) end in a mobile phone needs to show some data information to a user, the mobile phone sends a request message to the server through the App, the server returns the processed data information to the App end after corresponding data information is processed through service logic according to the request message, and the App shows the data information to the user.
Generally, an App side has a large amount of data information to be acquired from a server, and therefore, a large amount of request messages are generated, and when the server processes the request messages sent by multiple apps at the same time, the response time may be increased, so that a user cannot see the data information at the App side for a long time, and the user experience is reduced.
Disclosure of Invention
Embodiments of the present invention provide a method, an apparatus, and a device for acquiring data information, so that time for responding to data information is reduced, transmission speed of data information is increased, a terminal can quickly display data information to a user, and user experience is improved.
A first aspect of an embodiment of the present invention provides a method for acquiring data information, including:
when a terminal needs to initiate a first service, inquiring other terminals capable of providing the first service according to the position of the terminal;
the terminal establishes connection with the searched terminal and requests the searched terminal for data information for initiating the first service;
and if the data information exists in the cache of the searched terminal, acquiring the data information from the cache of the searched terminal through a Key value, wherein the Key value is full path information of an application App request in the terminal.
In an embodiment of the present invention, the querying another terminal capable of providing the first service includes:
if the data information cannot be inquired from one other terminal, inquiring N other terminals around the terminal;
and if the data information cannot be inquired from the N other terminals, requesting the data information from a server.
In an embodiment of the present invention, the terminal needs to initiate a first service, including:
and the terminal inquires all services in a service list according to the Key values and determines a first service corresponding to the Key values, wherein the service list comprises services issued by App of a plurality of terminals.
In an embodiment of the present invention, the determining the first service corresponding to the Key value includes:
and the terminal polls all services in a service list by taking the full path information as the Key value according to the full path information requested by the App, and determines a first service corresponding to the Key value.
In an embodiment of the present invention, the method further includes:
the terminal establishes an incidence relation between the Key value and the data information;
and the terminal stores the association relation in a cache of the terminal.
In an embodiment of the present invention, the method further includes:
and the terminal issues the first service to the other terminals through zero configuration networking so that the other terminals store the first service when detecting the first service through the zero configuration networking.
In an embodiment of the present invention, the querying another terminal capable of providing the first service includes:
the terminal detects other terminals capable of providing the first service through zero-configuration networking.
A second aspect of the embodiments of the present invention provides an apparatus for acquiring data information, including:
the terminal comprises a query module, a service module and a service module, wherein the query module is used for querying other terminals capable of providing a first service according to the position of the terminal when the terminal needs to initiate the first service;
the request module is used for establishing connection between the terminal and the searched terminal and requesting the searched terminal for data information for initiating the first service;
and the obtaining module is used for obtaining the data information from the cache of the searched terminal through a Key value if the data information exists in the cache of the searched terminal, wherein the Key value is full path information of an application App request in the terminal.
In an embodiment of the present invention, the querying module queries other terminals capable of providing the first service, including: if the query module cannot query the data information from one other terminal, querying N other terminals around the terminal; and if the query module cannot query the data information from the N other terminals, the query module requests the server for the data information.
In an embodiment of the present invention, the query module is further configured to query all services in a service list according to the Key value, and determine a first service corresponding to the Key value, where the service list includes services issued by apps of multiple terminals.
In an embodiment of the present invention, determining, by a query module, a first service corresponding to a Key value includes:
and the query module takes the full path information as a Key value according to the full path information requested by the App, polls all services in the service list and determines a first service corresponding to the Key value.
In an embodiment of the present invention, the apparatus further includes:
the establishing module is used for establishing an incidence relation between a Key value and data information;
and the storage module is used for the terminal to store the association relation in a cache of the terminal.
In an embodiment of the present invention, the apparatus further includes:
and the publishing module is used for publishing the first service to other terminals through the zero configuration networking so that the first service is stored when the other terminals detect the first service through the zero configuration networking.
In an embodiment of the present invention, the query module is specifically configured to detect, through the zero-configuration networking, other terminals capable of providing the first service.
A third aspect of the embodiments of the present invention provides a computer-readable storage medium, where one or more programs are stored, and the one or more programs are executable by one or more processors to implement the steps in the method for acquiring data information according to any one of the embodiments of the first aspect.
A fourth aspect of the embodiments of the present invention provides a terminal device, including: the device comprises a memory, a processor and a computer program, wherein the processor runs the computer program to execute the steps of the data information acquisition method of any embodiment of the first aspect.
According to the method, the device and the equipment for acquiring the data information, when a terminal needs to initiate a first service, other terminals capable of providing the first service are inquired according to the position of the terminal, the terminal is connected with the inquired terminal and requests the inquired terminal for data information for initiating the first service, if the data information exists in the cache of the inquired terminal, the data information is acquired from the cache of the inquired terminal through a Key value, the terminal can acquire the data information for issuing the first service from other surrounding terminals, compared with the case of acquiring the data information from a server, the time for responding to the data information is shortened, the transmission speed of the data information is improved, the terminal can quickly show the data information to a user, and the user experience is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic view of an application scenario of a data information obtaining method according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for acquiring data information according to an embodiment of the present invention;
fig. 3 is a flowchart of a method for acquiring data information according to another embodiment of the present invention;
fig. 4 is a flowchart of a method for acquiring data information according to another embodiment of the present invention;
fig. 5 is a block diagram of an apparatus for acquiring data information according to an embodiment of the present invention;
fig. 6 is a block diagram of an apparatus for acquiring data information according to another embodiment of the present invention;
fig. 7 is a block diagram of a terminal device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a schematic view of an application scenario of a data information obtaining method according to an embodiment of the present invention, as shown in fig. 1, the scenario includes a first terminal 1, a second terminal 2, a third terminal 3, and a server 4, where the first terminal 1, the second terminal 2, and the third terminal 3 may not only directly communicate with the server 4, but also communicate with each other, each terminal may include multiple apps, and the first terminal 1, the second terminal 2, and the third terminal 3 may be terminal devices such as a mobile phone, a computer, a game console, and the like. The first terminal 1, the second terminal 2 and the third terminal 3 can communicate with each other, and the first terminal 1, the second terminal 2 and the third terminal 3 can communicate with the server 4.
It should be noted that fig. 1 is only an exemplary scenario and is not intended to limit the present invention.
In the prior art, when the first terminal 1, the second terminal 2, and the third terminal 3 need to acquire data information, they all need to send request messages to the server 4, and the server 4 respectively returns corresponding data information to each terminal after performing service logic processing according to the request messages. If the first terminal 1, the second terminal 2, and the third terminal 3 simultaneously send the request message to the server 4, and the server 4 has limited capability and cannot process the three requests simultaneously, the request message of the first terminal 1 may be processed first, and then the request messages of the second terminal 2 and the third terminal 3 are processed in sequence, so that the data information returned by the server 4 to the second terminal 2 and the third terminal 3 may have a large delay, and the user may not see the requested data information for a long time, which results in poor user experience.
In the embodiment of the invention, the apps in the first terminal 1, the second terminal 2 and the third terminal 3 can release services when being started, and the App in each terminal can store the services released by the apps of other devices. For example, the first terminal 1 may store services issued by apps in the second terminal 2 and the third terminal 3, and establish a service list. When the first terminal 1 needs to acquire data information, a service is determined from the service list according to the Key value, the determined service is associated with the second terminal 2, namely the determined service is issued by the second terminal 2, the first terminal 1 establishes a link with the second terminal 2, and acquires the data information from the cache of the second terminal 2 according to the Key value, the first terminal 1 can directly acquire the data information from the cache in the second terminal 2, and the situation that a request message is directly sent to the server 4 to acquire the data information is avoided, so that the speed of responding to the data information is improved, and the first terminal can quickly display the required data information to a user.
Fig. 2 is a flowchart of a method for acquiring data information according to an embodiment of the present invention. The execution main body of the method is a terminal, wherein the terminal can be a mobile phone, a computer, an ipad, a game machine, a smart television and the like, a plurality of apps are installed on the terminal, and the terminal executes the following steps through the installed apps, as shown in fig. 2, the method of the embodiment may include:
step 101, when a terminal needs to initiate a first service, inquiring other terminals capable of providing the first service according to the position of the terminal.
In this embodiment, after the terminal is started, when the first service needs to be initiated, other terminals capable of providing the first service around the terminal may be queried according to the location of the terminal. For example, it may be detected through zero configuration networking (Bonjour) whether other terminals around may provide the first service.
Step 102, the terminal establishes connection with the searched terminal and requests the searched terminal for data information for initiating the first service.
In this embodiment, if another terminal capable of providing the first service is found, the terminal establishes a connection with the found terminal capable of providing the first service, and initiates a request to the found terminal to acquire data information for initiating the first service. For example, when a first terminal needs to publish a first service, it is queried whether other terminals around the first terminal can provide the first service, and if it is queried that a second terminal can provide the first service, the first terminal establishes a connection with the second terminal and sends a request message to the second terminal, where the request message is used to obtain data information needed for publishing the first service from the second terminal.
For example, the first terminal sends a connection establishment request to the second terminal, and the second terminal returns a request response to the first terminal after receiving the connection establishment request, so that the connection establishment is successful. Other ways may be used, and the present invention is not limited thereto.
And 103, if the data information exists in the searched cache of the terminal, acquiring the data information from the searched cache of the terminal through a Key value, wherein the Key value is the full path information of the App request in the terminal.
The full path information of the App request may be a website, an address, etc., for example, the full path information of the first App request may be a Uniform Resource Locator (URL).
In this embodiment, the terminal that needs to issue the first service uses the full path information of the App request as a Key value, queries the data in the cache of the searched terminal, and if the data information needed for sending the first service is queried, acquires the data information from the cache of the searched terminal, and then issues the first service.
According to the method for acquiring the data information, when a terminal needs to initiate a first service, according to the position of the terminal, other terminals capable of providing the first service are inquired, the terminal is connected with the inquired terminal, the data information for initiating the first service is requested from the inquired terminal, if the data information exists in the cache of the inquired terminal, the data information is acquired from the cache of the inquired terminal through a Key value, the terminal can acquire the data information for issuing the first service from other surrounding terminals, compared with the data information acquired from a server, the time for responding to the data information is reduced, the transmission speed of the data information is improved, the terminal can quickly show the data information to a user, and the user experience is improved.
Optionally, on the basis of the embodiment shown in fig. 2, querying other terminals capable of providing the first service includes: if the data information cannot be inquired from one other terminal, inquiring N other terminals around the terminal; and if the data information cannot be inquired from the N other terminals, requesting the data information from the server.
In this embodiment, assume that a scenario includes a first terminal, a second terminal, a third terminal, and a fourth terminal, and when a certain terminal needs to publish a first service, other terminals around the certain terminal may be queried to obtain data information for publishing the first service, for example, when the first terminal needs to publish the first service, the second terminal may be queried first whether there is data information for publishing the first service in the second terminal, if the data information does not exist in the second terminal, the third terminal and the fourth terminal are sequentially queried whether there is the data information in the third terminal and the fourth terminal, if the data information exists in the certain terminal, the data information is obtained from the terminal, and if the data information does not exist in the other three terminals, the first terminal launches request information to a server, and obtains data information required for publishing the first service from the server.
The other terminals around may be sequentially queried according to a certain rule, for example, the terminals are queried in a sequence from near to far from the first terminal, or in a priority sequence of the other terminals.
In this embodiment, if the data information is not queried from one other terminal, N other terminals around the terminal are queried; if the data information can not be inquired from the N other terminals, the data information is requested to the server, and the method only acquires the data information from the server when the requested data information does not exist in the caches of the other terminals, so that the frequency of the data information request from the server by the terminal is reduced, the transmission speed of the data information is improved, the processing load of the server is lightened, and the reliability of data acquisition by the terminal is also ensured.
Optionally, on the basis of the embodiment shown in fig. 2, the terminal needs to initiate a first service, including: the terminal inquires all services in the service list according to the Key values, determines a first service corresponding to the Key values, and the service list comprises services issued by App of a plurality of terminals.
In this embodiment, the service list is a list pre-established by the terminal device, and the service list is used for storing services issued by other terminals, where the services issued by a plurality of terminals may be the same type of service or different types of services. When other terminals issue services, the terminals store the services issued by the other terminals in the service list.
Further, determining a first service corresponding to the Key value includes: and the terminal polls all services in the service list by taking the full path information as a Key value according to the full path information requested by the App, and determines a first service corresponding to the Key value.
In this embodiment, when an App in a terminal is started, first, full path information of an App request initiated by a user through the terminal is obtained, the full path information is used as a Key value, all services in a service list are polled, and a first service corresponding to the Key value is determined.
Fig. 3 is a flowchart of a method for acquiring data information according to another embodiment of the present invention. On the basis of the foregoing embodiment, after the terminal acquires the data information, as shown in fig. 3, the method may further include the following steps:
step 201, the terminal establishes an association relationship between the Key value and the data information.
Step 202, the terminal stores the association relationship in a cache of the terminal.
In this embodiment, after the terminal acquires the data information, an association relationship between a Key value and the data information is established, and since the Key value is the full path information of the App request, which is equivalent to establishing the association relationship between the full path information of the App request and the data information, and the association relationship is stored, other terminals can acquire corresponding data information from the cache of the terminal through the Key value, so that the frequency of requesting the data information from the server by the terminal is reduced, the time of responding to the data information is reduced, a user can quickly see the required data information from the terminal, and the user experience is improved.
Optionally, the method for acquiring data information may further include: the terminal issues the first service to other terminals through the zero configuration networking, so that the other terminals store the first service when detecting the first service through the zero configuration networking.
Among them, the zero configuration networking (Bonjour) can automatically discover computers, devices and services on an Internet Protocol (IP) network without inputting an IP address or configuring a Domain Name System (DNS).
In this embodiment, when the App is started, the terminal may issue the first service to the other terminal through Bonjour, and when the other terminal detects the first service through Bonjour, the first service is stored, so that the other terminal can conveniently acquire data information from the terminal associated with the first service.
On the basis of the above embodiment, after the App is started, the terminal may issue the service, or may detect the service issued by another terminal, store the service in the service list after detecting the service issued by another terminal, and establish a correspondence between the service and the terminal, so that after the terminal determines the first service according to the Key value, the terminal associated with the first service may be determined according to the correspondence.
Optionally, querying other terminals capable of providing the first service comprises: the terminal detects other terminals capable of providing the first service through zero-configuration networking.
In this embodiment, the terminal may not only issue the service through Bonjour, but also detect another terminal capable of providing the first service through Bonjour, and when detecting another terminal capable of providing the first service, establish a connection with the terminal to acquire the data information, and do not need to acquire the data information from the server, so that the time for responding to the data information is reduced, and the user can quickly see the required data information from the terminal, thereby improving the user experience.
Fig. 4 is a flowchart of a method for acquiring data information according to another embodiment of the present invention. As shown in fig. 4, the method comprises the steps of:
step 401, starting the first App.
And step 402, the first App issues service through Bonjour.
Step 403, the first App detects whether services issued by other terminals exist around through Bonjour, and if yes, step 404 is executed; if not, go to step 405.
Step 404, store the detected service into a service list.
Step 405, acquiring full path information of the first App request.
And 406, polling all the services in the service list according to the Key value by using the full path information as the Key value, and determining the first service.
Step 407, establishing a connection with a terminal corresponding to the first service.
And step 408, inquiring whether data information required by the issuance of the first service exists in the cache of the terminal through the Key value, if so, executing step 409, and if not, executing step 4010.
Step 409, obtaining data information from the cache of the terminal, and executing step 4011.
Step 4010, sending a request message to a server corresponding to the first App, and acquiring data information from the server.
Step 4011, establishing an association relationship between the Key value and the data information, and storing the association relationship.
In the method for acquiring data information provided by this embodiment, when an App is started, a terminal issues a service through Bonjour, and stores a service issued by an App, which detects other devices through Bonjour, in a service list, when data information needs to be acquired, full path information is used as a Key value, all services in the service list are polled according to the Key value, a first service is determined, a connection is established with the terminal corresponding to the first service, whether data information required for issuing the first service exists in a cache of the terminal is inquired through the Key value, if so, the data information is acquired from the cache of the terminal, if not, a request message is sent to the server corresponding to the first App, the data information is acquired from the server, after the data information is acquired, an association relationship between the Key value and the data information is established, and the association relationship is stored. When the App terminal needs to acquire the data information, the data information is transmitted with other terminals, and the data information is acquired from other terminals, so that the times of requesting the server by the terminal can be reduced, the load of the server is reduced, the transmission speed of the data information is improved, and the user experience is improved.
Fig. 5 is a block diagram of an apparatus for acquiring data information according to an embodiment of the present invention, as shown in fig. 5, the apparatus includes:
the query module 11 is configured to query, when the terminal needs to initiate the first service, other terminals capable of providing the first service according to a location of the terminal.
The request module 12 is used for the terminal to establish a connection with the found terminal and to request the data information for initiating the first service from the found terminal.
The obtaining module 13 is configured to obtain the data information from the cache of the searched terminal through a Key value if the data information exists in the cache of the searched terminal, where the Key value is full path information of an application App request in the terminal.
The apparatus of this embodiment may be used to implement the technical solution of the method embodiment shown in fig. 2, and the implementation principle and the technical effect are similar, which are not described herein again.
Optionally, the querying module 11 queries other terminals capable of providing the first service, including: if the query module 11 cannot query the data information from one other terminal, querying N other terminals around the terminal; if the query module 11 cannot query the data information from all the N other terminals, the query module 11 requests the server for the data information.
Optionally, the querying module 11 is further configured to query all services in a service list according to the Key values, and determine a first service corresponding to the Key values, where the service list includes services issued by apps of multiple terminals.
Optionally, the querying module 11 determines the first service corresponding to the Key value, including:
the query module 11 uses the full path information as a Key value according to the full path information requested by the App, polls all services in the service list, and determines a first service corresponding to the Key value.
Fig. 6 is a block diagram of an apparatus for acquiring data information according to another embodiment of the present invention, and based on the embodiment shown in fig. 5, as shown in fig. 6, the apparatus further includes:
the establishing module 14 is used for establishing an incidence relation between the Key value and the data information;
the storage module 15 is used for the terminal to store the association relationship in the cache of the terminal.
Optionally, as shown in fig. 6, the apparatus further includes:
the publishing module 16 is configured to publish the first service to the other terminals through the zero configuration networking, so that the other terminals store the first service when detecting the first service through the zero configuration networking.
Optionally, the query module 11 is specifically configured to detect, through zero-configuration networking, other terminals capable of providing the first service.
The apparatus of this embodiment may be used to implement the technical solutions of the method embodiments shown in fig. 2 to fig. 4, and the implementation principles and technical effects are similar, which are not described herein again.
An embodiment of the present invention further provides a computer-readable storage medium, where one or more programs are stored, and the one or more programs may be executed by one or more processors to implement the steps in the data information obtaining method according to any of fig. 2 to fig. 4.
Fig. 7 is a block diagram of a terminal device according to an embodiment of the present invention, as shown in fig. 7, the terminal device includes a memory 21, a processor 22, and a computer program 23, where the processor runs the computer program to execute the steps in the method for acquiring data information according to any one of fig. 2 to fig. 4.
In a Specific implementation of the terminal, it is understood that the Processor may be a Central Processing Unit (CPU), other general purpose processors, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present application may be embodied directly in a hardware processor, or in a combination of the hardware and software modules in the processor.
All or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The aforementioned program may be stored in a readable memory. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned memory (storage medium) includes: read-only memory (ROM), RAM, flash memory, hard disk, solid state disk, magnetic tape (magnetic tape), floppy disk (optical disk), and any combination thereof.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media capable of storing program codes, such as Read-Only Memory (ROM), Random Access Memory (RAM), magnetic disk, or optical disk.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (8)

1. A method for acquiring data information is characterized by comprising the following steps:
when a terminal needs to initiate a first service, the terminal inquires all services in a service list according to a Key value, determines the first service corresponding to the Key value, and inquires other terminals capable of providing the first service according to the position of the terminal, wherein the service list comprises services issued by apps of a plurality of terminals;
the terminal establishes connection with the searched terminal and requests the searched terminal for data information for initiating the first service;
if the data information exists in the cache of the searched terminal, acquiring the data information from the cache of the searched terminal through a Key value, wherein the Key value is full path information of an application App request in the terminal;
the querying other terminals capable of providing the first service comprises:
if the data information cannot be inquired from one other terminal, inquiring N other terminals around the terminal;
and if the data information cannot be inquired from the N other terminals, requesting the data information from a server.
2. The method of claim 1, wherein the determining the first service corresponding to the Key value comprises:
and the terminal polls all services in a service list by taking the full path information as the Key value according to the full path information requested by the App, and determines a first service corresponding to the Key value.
3. The method of claim 1, further comprising:
the terminal establishes an incidence relation between the Key value and the data information;
and the terminal stores the association relation in a cache of the terminal.
4. The method of claim 1, further comprising:
and the terminal issues the first service to the other terminals through zero configuration networking so that the other terminals store the first service when detecting the first service through the zero configuration networking.
5. The method of claim 1, wherein querying other terminals capable of providing the first service comprises:
the terminal detects other terminals capable of providing the first service through zero-configuration networking.
6. An apparatus for acquiring data information, comprising:
the terminal comprises a query module, a service module and a service module, wherein the query module is used for querying other terminals capable of providing a first service according to the position of the terminal when the terminal needs to initiate the first service;
the request module is used for establishing connection between the terminal and the searched terminal and requesting the searched terminal for data information for initiating the first service;
an obtaining module, configured to obtain the data information from the cache of the searched terminal through a Key value if the data information exists in the cache of the searched terminal, where the Key value is full path information of an application App request in the terminal;
the query module is specifically configured to:
if the data information cannot be inquired from one other terminal, inquiring N other terminals around the terminal;
if the data information cannot be inquired from the N other terminals, the data information is requested to a server;
the query module is further configured to query all services in a service list according to the Key values, and determine a first service corresponding to the Key values, where the service list includes services issued by apps of multiple terminals.
7. A computer-readable storage medium storing one or more programs which are executable by one or more processors to implement the steps in the method for acquiring data information according to any one of claims 1 to 5.
8. A terminal device, comprising: a memory, a processor and a computer program, wherein the processor runs the computer program to execute the steps of the data information acquisition method of any one of claims 1 to 5.
CN201710884857.8A 2017-09-26 2017-09-26 Method, device and equipment for acquiring data information Active CN107835225B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710884857.8A CN107835225B (en) 2017-09-26 2017-09-26 Method, device and equipment for acquiring data information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710884857.8A CN107835225B (en) 2017-09-26 2017-09-26 Method, device and equipment for acquiring data information

Publications (2)

Publication Number Publication Date
CN107835225A CN107835225A (en) 2018-03-23
CN107835225B true CN107835225B (en) 2021-06-01

Family

ID=61643439

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710884857.8A Active CN107835225B (en) 2017-09-26 2017-09-26 Method, device and equipment for acquiring data information

Country Status (1)

Country Link
CN (1) CN107835225B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112445821A (en) * 2019-08-29 2021-03-05 成都鼎桥通信技术有限公司 Weather information query method for photovoltaic power station

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103108040A (en) * 2013-01-28 2013-05-15 中国联合网络通信集团有限公司 Acquiring method of real-time traffic status information, platform server and user equipment
CN104335199A (en) * 2012-05-25 2015-02-04 苹果公司 Using services through virtual access point interfaces
CN105488172A (en) * 2015-11-30 2016-04-13 北京奇艺世纪科技有限公司 Location-based data query method and device
CN105931094A (en) * 2016-04-08 2016-09-07 四川省亚丁胡杨人力资源集团有限公司 Mobile internet terminal-based service system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104335199A (en) * 2012-05-25 2015-02-04 苹果公司 Using services through virtual access point interfaces
CN103108040A (en) * 2013-01-28 2013-05-15 中国联合网络通信集团有限公司 Acquiring method of real-time traffic status information, platform server and user equipment
CN105488172A (en) * 2015-11-30 2016-04-13 北京奇艺世纪科技有限公司 Location-based data query method and device
CN105931094A (en) * 2016-04-08 2016-09-07 四川省亚丁胡杨人力资源集团有限公司 Mobile internet terminal-based service system

Also Published As

Publication number Publication date
CN107835225A (en) 2018-03-23

Similar Documents

Publication Publication Date Title
CN109561141B (en) CDN node selection method and equipment
KR20130135134A (en) Installing application remotely
CN113366815B (en) Network resource request method, device, electronic equipment and storage medium
CN115004673B (en) Message pushing method, device, electronic equipment and computer readable medium
CN111093159B (en) Message pushing method and device, server and computer readable storage medium
CN108880972B (en) Information processing method, server and terminal
WO2014179950A1 (en) File uploading method, client, and server
CN113434249A (en) Mirror image synchronization method and device, docker host and storage medium
CN108965359B (en) Communication method, communication device, readable medium, and electronic apparatus
CN112597039A (en) Virtual machine access method, system, device and computer readable storage medium
CN108886533B (en) Accelerating connections to host servers
US11706301B2 (en) Server node selection method and terminal device
CN113452770B (en) Data synchronization method, device, computer equipment and storage medium
CN109446445B (en) Resource acquisition method and device
CN109471713B (en) Method and device for inquiring information
CN107835225B (en) Method, device and equipment for acquiring data information
CN114416508A (en) Application performance monitoring method and device, storage medium and electronic equipment
CN112769671B (en) Message processing method, device and system
EP2760178B1 (en) Method, apparatus and system for obtaining object
CN111262779A (en) Method, device, server and system for acquiring data in instant messaging
CN114338794B (en) Service message pushing method and device, electronic equipment and storage medium
CN113285920B (en) Service access method, device, equipment and storage medium
CN106899652B (en) Method and device for pushing service processing result
JP6412641B2 (en) Communication link transmission method, apparatus and terminal
CN114422591A (en) Point-to-point communication method, data communication system, computer device, and storage medium

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