CN115168753A - Method, device, equipment and storage medium for displaying target object in applet - Google Patents

Method, device, equipment and storage medium for displaying target object in applet Download PDF

Info

Publication number
CN115168753A
CN115168753A CN202210929268.8A CN202210929268A CN115168753A CN 115168753 A CN115168753 A CN 115168753A CN 202210929268 A CN202210929268 A CN 202210929268A CN 115168753 A CN115168753 A CN 115168753A
Authority
CN
China
Prior art keywords
user
target object
information
longitude
server
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
CN202210929268.8A
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.)
Beijing Huayun'an Software Co ltd
Original Assignee
Beijing Huayun'an Software 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 Beijing Huayun'an Software Co ltd filed Critical Beijing Huayun'an Software Co ltd
Priority to CN202210929268.8A priority Critical patent/CN115168753A/en
Publication of CN115168753A publication Critical patent/CN115168753A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9538Presentation of query results
    • 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
    • G06F16/9537Spatial or temporal dependent retrieval, e.g. spatiotemporal queries

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the disclosure provides a method, a device, equipment and a storage medium for displaying a target object in an applet, and relates to the technical field of the Internet. The method comprises the steps of obtaining an instruction for displaying a target object input by a user, and obtaining current position information of the user according to the instruction; calling longitude and latitude data of the user provided by the Tencent location service according to the current location information of the user, and sending the longitude and latitude data to a server; and receiving and displaying the information of the target object within the preset distance returned by the server. In this way, the information of the target object can be maintained conveniently at the PC management end, and meanwhile, the guarantee is provided for accurately displaying the information of the target object within the preset distance in the small program.

Description

Method, device, equipment and storage medium for displaying target object in applet
Technical Field
The present disclosure relates to the field of internet technology, and more particularly, to the field of displaying target objects in applets.
Background
At present, if a target object within a range of 1 km from a current position needs to be displayed in a WeChat applet, taking the case of a chain store within a range of 1 km from the current position needs to be displayed, although longitude and latitude information of the current position can be obtained according to a wx.
Disclosure of Invention
The present disclosure provides a method, apparatus, device, and storage medium for displaying a target object in an applet.
According to a first aspect of the present disclosure, there is provided a method of displaying a target object in an applet, the method comprising:
acquiring an instruction for displaying a target object input by a user, and acquiring current position information of the user according to the instruction;
calling longitude and latitude data of the user provided by the Tencent location service according to the current location information of the user, and sending the longitude and latitude data to a server;
and receiving and displaying the information of the target object within the preset distance returned by the server.
The above-described aspect and any possible implementation further provide an implementation in which the current location information of the user is location information acquired at the start of an applet.
The above-mentioned aspect and any possible implementation manner further provide an implementation manner, where the information of the target object within the preset distance returned by the server is obtained by the following method:
and the server searches in the pre-stored longitude and latitude data of the target object according to the received longitude and latitude data of the user, determines the target object within the preset distance of the user, and returns the information of the target object within the preset distance of the user.
In the foregoing aspect and any one of the possible implementation manners, an implementation manner is further provided, where information of the target object is stored in a background management system of the applet in advance, and the background management system stores and manages the information of the target object according to a target object management menu.
As to the foregoing aspect and any possible implementation manner, there is further provided an implementation manner, where the searching, by the server, in the pre-stored longitude and latitude data of the target object according to the received longitude and latitude data of the user, to determine the target object within the preset distance of the user includes:
and calling a calculation function according to the longitude and latitude data of the user and the prestored longitude and latitude data of the target object, and calculating the target object within the preset distance of the user.
The above-described aspect and any possible implementation manner further provide an implementation manner, where the latitude and longitude data of the target object is obtained by a server calling an address inverse resolution API provided by an Tencent location service to resolve address information in the information of the target object.
The above-described aspect and any possible implementation further provide an implementation, where before the sending the longitude and latitude data to a server, the method further includes:
and acquiring a current city of the user according to the longitude and latitude data of the user, and simultaneously sending the longitude and latitude data of the user and the current city of the user to a server so that the server can calculate a target object within a preset distance of the user according to the longitude and latitude data of the user and the longitude and latitude data of the target object within the city range.
According to a second aspect of the present disclosure, there is provided an apparatus for displaying a target object in an applet, the apparatus including:
the acquisition module is used for acquiring an instruction for displaying a target object input by a user and acquiring the current position information of the user according to the instruction;
the scheduling information service module is used for scheduling information of the user according to the current position information of the user;
and the display module is used for receiving the information of the target object within the preset distance returned by the server and displaying the information.
According to a third aspect of the present disclosure, an electronic device is provided. The electronic device includes: a memory having a computer program stored thereon and a processor implementing the method as described above when executing the program.
According to a fourth aspect of the present disclosure, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method as according to the first and/or second aspects of the present disclosure.
It should be understood that the statements herein reciting aspects are not intended to limit the critical or essential features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The above and other features, advantages and aspects of embodiments of the present disclosure will become more apparent upon consideration of the following detailed description, taken in conjunction with the accompanying drawings. The accompanying drawings are included to provide a further understanding of the present disclosure, and are not incorporated in or constitute a part of this specification, wherein like reference numerals refer to like or similar elements throughout the several views and wherein:
fig. 1 is a flowchart of a method for displaying a target object in an applet according to an embodiment of the present disclosure;
fig. 2 is a block diagram of an apparatus for displaying a target object in an applet according to an embodiment of the disclosure;
fig. 3 is a block diagram of an exemplary electronic device provided by an embodiment of the present disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are some, but not all embodiments of the present disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
In addition, the term "and/or" herein is only one kind of association relationship describing an associated object, and means that there may be three kinds of relationships, for example, a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
In order to maintain the position information of each linkage point conveniently and reduce the development cost, the disclosure provides a method for displaying a target object in an applet, which comprises the following steps: the method comprises the steps of obtaining an instruction for displaying a target object input by a user, obtaining current position information of the user according to the instruction, calling longitude and latitude data of the user provided by the Tencent position service according to the current position information of the user, sending the longitude and latitude data to a server, receiving information of the target object within a preset distance returned by the server, and displaying the information. The position information of each chain store can be maintained conveniently at the PC management end, and the guarantee is provided for accurately displaying the functions of the nearby chain stores in the WeChat small program.
Fig. 1 shows a flow diagram of a 100 displaying a target object in an applet according to an embodiment of the disclosure. As shown in figure 1 of the drawings, in which,
s110, acquiring an instruction for displaying the target object input by the user, and acquiring the current position information of the user according to the instruction.
In some embodiments, the user-entered instruction to display the target object may include: an instruction of a nearby chain store is displayed in the applet, wherein the applet may be the applet of the chain store, and the instruction may be an instruction of displaying the chain store within 1 km nearby.
In some embodiments, the current location information of the user may be the current location information obtained according to an instruction input by the user, or may be the current location information when the user opens the WeChat applet.
And S120, calling longitude and latitude data of the user provided by the Tencent location service according to the current location information of the user, and sending the longitude and latitude data to a server.
In some embodiments, the applet may invoke the Tencent location service according to the current location information of the user, locate the location of the user, analyze latitude and longitude data of the current location of the user, and send the latitude and longitude data of the current location of the user to the server.
In some embodiments, in order to find out a target object within a preset distance of a user more quickly, a city where the user is located may be locked, and the target object is searched within the range of the city, specifically, the current city where the user is located may be obtained according to longitude and latitude data of the current location of the user, and the longitude and latitude data and the current city where the user is located are simultaneously sent to the server, so that the server calculates the target object within the preset distance of the user according to the longitude and latitude data of the user and the longitude and latitude data of the target object within the range of the city.
And S130, receiving the information of the target object within the preset distance returned by the server, and displaying the information.
In some embodiments, the server receives longitude and latitude data of the user, calls a calculation function, calculates a target object within a preset distance of the user from the prestored longitude and latitude data of the target object, and returns information of the target object within the preset distance of the user.
In some embodiments, the information of the target object is stored in advance in a background management system of the applet, and the background management system stores and manages the information of the target object according to a target object management menu.
In some embodiments, the information of the target object may include information of chain codes, divisions, names, addresses, goods, services, business hours, etc., wherein the chain address information requires that the administrator be a necessary item when creating the chain, and the address information is to be specific to provincial and street addresses.
In some embodiments, when the store chain information is saved, the address inverse analysis API provided by the Tencent location service is called first to convert the location information of the current store chain into store chain longitude and latitude data. And after the longitude and latitude data are successfully analyzed, calling a service end interface to store the chain store information including the longitude and latitude data.
According to the embodiment of the disclosure, the following technical effects are achieved:
1. the information of the target object can be maintained conveniently at the PC management end, the ecological cooperation service of Tencent position service is not needed, the development cost is greatly reduced, and the guarantee is provided for accurately displaying the target object within the preset distance in the WeChat small program.
2. The information of the target object near the current position can be accurately displayed in the WeChat small program, so that the user can conveniently know the goods and services released by the nearby chain stores.
It is noted that while for simplicity of explanation, the foregoing method embodiments have been described as a series of acts or combination of acts, it will be appreciated by those skilled in the art that the present disclosure is not limited by the order of acts, as some steps may, in accordance with the present disclosure, occur in other orders and concurrently. Further, those skilled in the art should also appreciate that the embodiments described in the specification are exemplary embodiments and that acts and modules referred to are not necessarily required by the disclosure.
The above is a description of embodiments of the method, and the embodiments of the apparatus are further described below.
Fig. 2 illustrates a block diagram of an apparatus 200 for displaying a target object in an applet according to an embodiment of the present disclosure, and as shown in fig. 2, the apparatus 200 includes:
the obtaining module 210 is configured to obtain an instruction for displaying a target object, which is input by a user, and obtain current location information of the user according to the instruction.
And the calling module 220 is configured to call the longitude and latitude data of the user provided by the Tencent location service according to the current location information of the user, and send the longitude and latitude data to the server.
And the display module 230 is configured to receive the information of the target object within the preset distance returned by the server, and display the information.
In some embodiments, the obtaining module 210 is specifically configured to: the current location information of the user is obtained at the start of the applet.
In some embodiments, the invoking module 220 is specifically configured to: and acquiring a current city of the user according to the longitude and latitude data of the user, and simultaneously sending the longitude and latitude data of the user and the current city of the user to a server so that the server can calculate a target object within a preset distance of the user according to the longitude and latitude data of the user and the longitude and latitude data of the target object within the city range.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the described module may refer to the corresponding process in the foregoing method embodiment, and is not described herein again.
In the technical scheme of the disclosure, the acquisition, storage, application and the like of the personal information of the related user all accord with the regulations of related laws and regulations, and do not violate the good customs of the public order.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
FIG. 3 shows a schematic block diagram of an electronic device 300 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic devices may also represent various forms of mobile devices, such as personal digital processors, cellular telephones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
The device 300 comprises a computing unit 301 which may perform various suitable actions and processes in accordance with a computer program stored in a Read Only Memory (ROM) 302 or a computer program loaded from a storage unit 308 into a Random Access Memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the device 300 can also be stored. The computing unit 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input/output (I/O) interface 305 is also connected to bus 304.
Various components in device 300 are connected to I/O interface 305, including: an input unit 306 such as a keyboard, a mouse, or the like; an output unit 307 such as various types of displays, speakers, and the like; a storage unit 308 such as a magnetic disk, optical disk, or the like; and a communication unit 309 such as a network card, modem, wireless communication transceiver, etc. The communication unit 309 allows the device 300 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The computing unit 301 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of the computing unit 301 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The computing unit 301 performs the various methods and processes described above, such as the method 100. For example, in some embodiments, the method 100 may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 308. In some embodiments, part or all of the computer program may be loaded onto and/or installed onto device 300 via ROM 302 and/or communications unit 309. When the computer program is loaded into RAM 303 and executed by the computing unit 301, one or more steps of the method 100 described above may be performed. Alternatively, in other embodiments, the computing unit 301 may be configured to perform the method 100 by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server with a combined blockchain.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel or sequentially or in different orders, and are not limited herein as long as the desired results of the technical solutions of the present disclosure can be achieved.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the protection scope of the present disclosure.

Claims (10)

1. A method of displaying a target object in an applet, comprising:
acquiring an instruction for displaying a target object input by a user, and acquiring current position information of the user according to the instruction;
calling longitude and latitude data of the user provided by the Tencent location service according to the current location information of the user, and sending the longitude and latitude data to a server;
and receiving and displaying the information of the target object within the preset distance returned by the server.
2. The method of claim 1, wherein the current location information of the user is location information obtained at applet start-up.
3. The method according to claim 1, wherein the information of the target object within the preset distance returned by the server is obtained by the following method:
and the server searches in the pre-stored longitude and latitude data of the target object according to the received longitude and latitude data of the user, determines the target object within the preset distance of the user, and returns the information of the target object within the preset distance of the user.
4. The method according to claim 3, wherein the information of the target object is pre-stored in a background management system of the applet, and the background management system stores and manages the information of the target object according to a target object management menu.
5. The method of claim 3, wherein the server searches for the pre-stored longitude and latitude data of the target object according to the received longitude and latitude data of the user, and determines the target object within the preset distance of the user, including:
and calling a calculation function according to the longitude and latitude data of the user and the prestored longitude and latitude data of the target object, and calculating the target object within the preset distance of the user.
6. The method of claim 5, wherein the latitude and longitude data of the target object is obtained by a server calling an address inverse resolution API provided by an Tencent location service to resolve address information in the information of the target object.
7. The method of claim 1, wherein prior to sending the latitude and longitude data to a server, the method further comprises:
and acquiring the current city of the user according to the longitude and latitude data of the user, and simultaneously sending the longitude and latitude data of the user and the current city of the user to a server so that the server can calculate a target object within a preset distance of the user according to the longitude and latitude data of the user and the longitude and latitude data of the target object within the city range.
8. An apparatus for displaying a target object in an applet, comprising:
the acquisition module is used for acquiring an instruction for displaying a target object input by a user and acquiring the current position information of the user according to the instruction;
the scheduling information service module is used for scheduling information of the user according to the current position information of the user;
and the display module is used for receiving the information of the target object within the preset distance returned by the server and displaying the information.
9. An electronic device, comprising: at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.
10. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-7.
CN202210929268.8A 2022-08-03 2022-08-03 Method, device, equipment and storage medium for displaying target object in applet Pending CN115168753A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210929268.8A CN115168753A (en) 2022-08-03 2022-08-03 Method, device, equipment and storage medium for displaying target object in applet

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210929268.8A CN115168753A (en) 2022-08-03 2022-08-03 Method, device, equipment and storage medium for displaying target object in applet

Publications (1)

Publication Number Publication Date
CN115168753A true CN115168753A (en) 2022-10-11

Family

ID=83477883

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210929268.8A Pending CN115168753A (en) 2022-08-03 2022-08-03 Method, device, equipment and storage medium for displaying target object in applet

Country Status (1)

Country Link
CN (1) CN115168753A (en)

Similar Documents

Publication Publication Date Title
CN114519061A (en) Map data updating method, device, electronic equipment and medium
CN116611411A (en) Business system report generation method, device, equipment and storage medium
CN118312076A (en) Map icon processing method and device, electronic equipment and computer readable medium
CN115222444A (en) Method, apparatus, device, medium and product for outputting model information
CN111414154A (en) Method and device for front-end development, electronic equipment and storage medium
CN114461658A (en) Name determination method, apparatus, device, program product, and storage medium
CN113691937B (en) Method for determining position information, cloud mobile phone and terminal equipment
CN113656731B (en) Advertisement page processing method and device, electronic equipment and storage medium
CN115168753A (en) Method, device, equipment and storage medium for displaying target object in applet
CN112540804B (en) Applet running method and device, electronic equipment and medium
CN115016955A (en) Method and device for sharing information among multiple applications
CN115102948A (en) Automatic downloading method, device and equipment of map tiles and storage medium
CN114995800A (en) Project development method and device, electronic equipment and storage medium
CN114327577A (en) Code change determining method and device, electronic equipment and storage medium
CN114138358A (en) Application program starting optimization method, device, equipment and storage medium
CN113361235B (en) HTML file generation method and device, electronic equipment and readable storage medium
CN116561075B (en) Method for generating dynamic link library file, method and device for calling operator
CN114860557B (en) User behavior information generation method, device, equipment and readable storage medium
CN114168172A (en) Application program installation method and device, electronic equipment and storage medium
CN115455029A (en) Battery replacement data acquisition method and device, electronic equipment and storage medium
CN118200246A (en) Updating method and device of flow configuration and electronic equipment
CN117041191A (en) Task execution method and device in instant messaging and electronic equipment
CN115840604A (en) Data processing method and device, electronic equipment and computer readable storage medium
CN114564133A (en) Application program display method, device, equipment and medium
CN117806619A (en) Data processing method, device, electronic equipment and 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