CN113760780A - Data recording method, apparatus, device and medium - Google Patents
Data recording method, apparatus, device and medium Download PDFInfo
- Publication number
- CN113760780A CN113760780A CN202011142137.2A CN202011142137A CN113760780A CN 113760780 A CN113760780 A CN 113760780A CN 202011142137 A CN202011142137 A CN 202011142137A CN 113760780 A CN113760780 A CN 113760780A
- Authority
- CN
- China
- Prior art keywords
- code
- data
- position data
- actual
- preset target
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 61
- 238000003860 storage Methods 0.000 claims abstract description 34
- 238000004590 computer program Methods 0.000 description 12
- 230000006870 function Effects 0.000 description 9
- 230000015654 memory Effects 0.000 description 9
- 230000008569 process Effects 0.000 description 9
- 238000004080 punching Methods 0.000 description 9
- 238000010586 diagram Methods 0.000 description 8
- 230000008901 benefit Effects 0.000 description 5
- 238000004891 communication Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 238000006243 chemical reaction Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000018109 developmental process Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000004806 packaging method and process Methods 0.000 description 2
- 239000000758 substrate Substances 0.000 description 2
- 108010001267 Protein Subunits Proteins 0.000 description 1
- 238000013459 approach Methods 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000008676 import Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000001737 promoting effect Effects 0.000 description 1
- 230000011218 segmentation Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/06—Addressing a physical block of locations, e.g. base addressing, module addressing, memory dedication
- G06F12/0646—Configuration or reconfiguration
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/28—Databases characterised by their database models, e.g. relational or object models
- G06F16/284—Relational databases
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Computational Linguistics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The present disclosure provides a data recording method, including: acquiring actual position data of a user; determining a matching result of an actual address code of the actual position data and a preset target code of the preset target position data; and realizing data recording of the user according to the matching result. In addition, the present disclosure also discloses a data recording apparatus, an electronic device, and a computer-readable storage medium.
Description
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a data recording method, a data recording apparatus, an electronic device, and a computer-readable storage medium.
Background
In the aspects of attendance checking, ground service and the like, it is generally required to record relevant data of a user, such as card punching, registration, check-in and the like. With the rapid development of information technology, a user can directly use electronic equipment to record data, for example, an outworker who is one of the users can punch a card for going to and from work through the electronic equipment to record data going to and from work; or the ground service personnel can record the shop patrol track data by carrying out the shop patrol. Wherein, the card punching, the shop patrol or the check-in are generally in fixed positions.
In the prior art, the success of data recording is generally judged according to the calculated distance between the recording position and the target position. However, this method may make the performance of the server higher when the data amount is very large, otherwise it may overload the data processing of the server, making the data recording less accurate and inefficient.
Disclosure of Invention
In view of this, the embodiments of the present disclosure provide a data recording method, a data recording apparatus, an electronic device, and a computer-readable storage medium, which have low requirements on server performance and can improve data recording efficiency and data recording accuracy for large data volumes.
An aspect of the embodiments of the present disclosure provides a data recording method, including: acquiring actual position data of a user; determining a matching result of an actual address code of the actual position data and a preset target code of the preset target position data; and realizing data recording of the user according to the matching result.
According to the embodiment of the disclosure, acquiring the actual position data of the user comprises: location data of a terminal device of a user is received as actual location data at a fixed time period.
According to the embodiment of the present disclosure, before determining a matching result between the real address code of the real position data and the preset target code of the preset target position data, the method further includes: determining a binary encoding of the actual position data; acquiring an actual address code according to the binary code; and storing the real address code by a remote storage database.
According to an embodiment of the present disclosure, determining a binary encoding of actual position data comprises: dividing the actual position data into dichotomy ranges to obtain a primary code; and integrating the preliminary codes according to a preset combination rule to obtain binary codes.
According to an embodiment of the present disclosure, acquiring a real address code according to a binary code includes: converting the binary code into a decimal code; and carrying out coding operation on the decimal codes according to a preset coding rule to obtain actual address codes.
According to an embodiment of the present disclosure, determining a matching result between an actual address code of actual position data and a preset target code of preset target position data includes: and when the actual address code is the same as the prefix field of the preset target code, the matching result is successful.
According to the embodiment of the disclosure, the data recording of the user is realized according to the matching result, which includes: and when the matching result is that the matching is successful, completing the data recording.
According to the embodiment of the present disclosure, before determining a matching result between the real address code of the real position data and the preset target code of the preset target position data, the method further includes: determining at least one target position according to the actual address code; and acquiring preset target position data through at least one target position.
Another aspect of the disclosed embodiments provides a data recording apparatus, including a data obtaining module, a code matching module, and a matching recording module. The data acquisition module is used for acquiring actual position data of a user; the code matching module is used for determining a matching result of an actual address code of the actual position data and a preset target code of the preset target position data; and the matching recording module is used for realizing the data recording of the user according to the matching result.
Another aspect of the disclosed embodiments provides an electronic device comprising one or more processors and a memory device; the storage device is used for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method described above.
Another aspect of the embodiments of the present disclosure provides a computer-readable storage medium having stored thereon executable instructions, which when executed by a processor, cause the processor to implement the above-mentioned method.
Another aspect of embodiments of the present disclosure provides a computer program comprising computer executable instructions for implementing a method as above when executed.
One or more of the above-described embodiments may provide the following advantages or benefits: the actual position data of the user is converted into the specific actual address code, so that dynamic data recording of the user corresponding to different actual position data is achieved, meanwhile, the target position of the user can be pushed according to the actual position data, efficient user data recording efficiency is achieved, meanwhile, under the condition that the user data volume is extremely large, higher data recording accuracy can still be achieved, user experience is improved, and meanwhile, service requirements under various different scenes are met.
Drawings
Fig. 1 illustrates a flow chart of a data recording method of an embodiment of the present disclosure;
FIG. 2 illustrates a flow chart of a method of obtaining a real address code of an embodiment of the present disclosure;
FIG. 3 illustrates a flow chart of a method of determining a binary of real location data and obtaining a real address code from the binary in accordance with an embodiment of the present disclosure;
fig. 4 is a flowchart illustrating an acquisition method of preset target position data according to another embodiment of the present disclosure;
FIG. 5 illustrates an architecture diagram of a data recording device according to an embodiment of the present disclosure;
fig. 6 illustrates a block diagram of an electronic device suitable for implementing the above-described data recording method according to an embodiment of the present disclosure.
Detailed Description
For the purpose of promoting a better understanding of the objects, aspects and advantages of the present disclosure, reference is made to the following detailed description taken in conjunction with the accompanying drawings.
It is to be noted that, in the attached drawings or in the description, the implementation modes not shown or described are all the modes known by the ordinary skilled person in the field of technology, and are not described in detail. Further, the above definitions of the various elements and methods are not limited to the various specific structures, shapes or arrangements of parts mentioned in the examples, which may be easily modified or substituted by those of ordinary skill in the art.
It should also be noted that directional terms, such as "upper", "lower", "front", "rear", "left", "right", and the like, used in the embodiments are only directions referring to the drawings, and are not intended to limit the scope of the present disclosure. Throughout the drawings, like elements are represented by like or similar reference numerals. Conventional structures or constructions will be omitted when they may obscure the understanding of the present disclosure.
And the shapes and sizes of the respective components in the drawings do not reflect actual sizes and proportions, but merely illustrate the contents of the embodiments of the present disclosure. Furthermore, in the claims, any reference signs placed between parentheses shall not be construed as limiting the claim.
Furthermore, the word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements.
The use of ordinal numbers such as "first," "second," "third," etc., in the specification and in the claims to modify a corresponding element does not by itself connote any ordinal number of the element or any ordering of one element from another or the order of manufacture, and the use of the ordinal numbers is only used to distinguish one element having a certain name from another element having a same name.
Those skilled in the art will appreciate that the modules in the device of an embodiment may be adaptively changed and placed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise. Also in the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the disclosure, various features of the disclosure are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various disclosed aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that is, the claimed disclosure requires more features than are expressly recited in each claim. Rather, as the following claims reflect, disclosed aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this disclosure.
With the rapid development of information technology, higher data recording requirements are put forward on attendance checking, ground work and the like. In the prior art, the aspects of attendance checking, ground attendance, field attendance and the like mainly relate to different application scenarios such as attendance checking, regular or fixed-point position reporting, visiting store check-in, strange visiting check-in, visiting plan check-in and the like. In the prior art, according to the comparison between the calculated distance between the recording position and the target position and the preset distance threshold value, when the calculated distance is smaller than the preset distance threshold value, it is determined that the card punching, the store patrol or the check-in is successful, and the recording of the related data is completed. For example, when a user performs a store patrol task such as visiting a store to sign in, the server may add the coordinates of all stores into the array, and then traverse all nodes to determine whether the distance between the coordinate of a certain node and the actual position coordinate of the user satisfies a distance range, so as to determine that the store patrol card punch is successful. However, in this process, the server needs to search for nearby nodes many times, and if there are M stores and the search is repeated N times, the complexity of data recording will reach nxm, which directly results in extremely low search efficiency, correspondingly increases search cost, and cannot deal with the situations that there are few stores or users. Meanwhile, the position relation between the actual position of the user and the target store cannot be effectively judged, so that the accuracy of data recording cannot meet the high experience requirement of the user.
In view of this, the embodiments of the present disclosure provide a data recording method, a data recording apparatus, an electronic device, and a computer-readable storage medium, which have low requirements on server performance and can improve data recording efficiency and data recording accuracy for large data volumes.
Fig. 1 illustrates a flowchart of a data recording method according to an embodiment of the present disclosure. It should be noted that, in the embodiment of the present disclosure, the data record may be understood as recording data related to the actual location data of the user, for example, the time when the user arrives at the actual location, the time when the user matches the target location data, the name of the user, the related data of the target location (such as the name of a store, a main business, a business status light), the time point of the data record, and the time point of the target location of the user. Logging may then be understood as the completion of the registration of user data at a particular point in time, embodied in the form of a card punch, check-in, etc.
As shown in fig. 1, an aspect of the embodiments of the present disclosure provides a data recording method including operations S101-S103.
In operation S101, actual location data of a user is acquired;
in operation S102, a matching result of an actual address code of the actual location data and a preset target code of the preset target location data is determined; and
in operation S103, data recording of the user is achieved according to the matching result.
The actual position data of the user is obtained, and the position of the electronic equipment can be automatically detected by the electronic equipment with a positioning function as the actual position of the user, such as the user directly inputs the position information into the electronic equipment to generate the position information. In the embodiment of the present disclosure, the position may be generally embodied in the form of coordinates, for example, a coordinate point of a preset coordinate system is used to define the position, and for example, longitude and latitude of a terrestrial coordinate system may be used as coordinates of a position.
In the embodiment of the present disclosure, the actual position data of the user is converted into corresponding encoded data, that is, an actual address code, which may be specifically implemented by using a GeoHash algorithm. The GeoHash code is an address code, and can realize that a two-dimensional longitude and latitude coordinate value is coded into a one-dimensional character string, namely an actual address code.
Specifically, the GeoHash may represent two coordinates of longitude and latitude by one character string. In some cases, the server cannot apply the index on two columns simultaneously, but only one column is required to apply the index by using the GeoHash. However, it should be noted that, in general, GeoHash divides a selected area into a plurality of rectangular blocks, each block is represented by a character string, for example, code wx4g0ec19, which represents a rectangular block. Therefore, the coordinate values in the actual position data are converted by adopting the GeoHash algorithm, the accurate coordinates of the user cannot be obtained, and only one area where the actual position of the user is located can be obtained. In other words, the conversion of the actual address coding of the actual position data of the embodiment of the present disclosure by the GeoHash algorithm actually converts the coordinates of the actual position into a character string, and the character string is used to locate the rectangular block where the actual position is located, and the character string actually defines all coordinate points of the rectangular block. For example, the string wx4f contains wx4fke, i.e., wx4fke is within wx4f blocks. Therefore, in an actual process, it is inevitable that two positions are divided into two different rectangular regions, the matching degree of the two positions is low, but the two positions are close to each other in reality. For the situation, in the embodiment of the present disclosure, when the current block corresponding to the actual position data is determined, the accessory block may be queried, and besides matching the actual address code of the actual position, the character strings of at least 8 blocks around the block may be matched, so as to implement accurate matching of the actual address code.
The preset target position may be a recording position where a user needs to perform registration such as card punching, check-in, and store patrol. The preset target position may be obtained according to the actual position of the user, or may be set manually for the registration task of the user. For example, a user is requested to make a tour or a card punch for a certain shop by manually designating the shop as a target location. Similarly, the preset target position data needs to be converted into the preset target code by the above-mentioned algorithm such as GeoHash algorithm for matching with the actual address code.
Matching the character string of the actual address code with the character string of the preset target code, namely determining whether the actual position falls into the rectangular block of the preset target position. Therefore, the matching result has two types, and when the actual position falls in the rectangular block corresponding to the character string of the target position, the matching is successful, which is equivalent to the success of recording actions such as card punching, check-in, store patrol and the like, namely the data recording is completed. Otherwise, the data recording cannot be carried out for the matching failure.
Therefore, in the embodiment of the disclosure, the actual position data of the user is converted into the specific actual address code, so as to realize dynamic data recording of the user corresponding to different actual position data, and meanwhile, the target position pushing can be performed on the user according to the actual position data, so as to realize high-efficiency user data recording efficiency, and meanwhile, under the condition that the user data volume is very large, the data recording accuracy can still be higher, so that the user experience is improved, and the service requirements under various different scenes are met.
In the embodiment of the present disclosure, a user may refer to a person who may check in, ground attendance, and field attendance, etc. based on a relationship between an actual location and a target location of the user, and may record data such as a card punch, a registration, a check-in, and a patrol.
According to the embodiment of the disclosure, acquiring the actual position data of the user comprises: location data of a terminal device of a user is received as actual location data at a fixed time period.
The server has the function of acquiring the actual position at fixed time, namely, the server sends a position request instruction to the electronic equipment of the user at fixed time intervals, so that the electronic equipment reports the actual position coordinates of the user to the server at fixed time after receiving the position request instruction. After the actual position data including the actual position coordinates corresponding to each time point of the user is coded in a GeoHash form, the position moving track of the user can be drawn through the character strings coded by the actual addresses and the corresponding time points, and the real-time position of the user can be dynamically adapted. Therefore, the data recording method of the present disclosure can realize recording dynamically corresponding to a plurality of target positions, rather than punching a card for a certain fixed position.
Fig. 2 illustrates a flowchart of a method for acquiring a real address code according to an embodiment of the present disclosure. FIG. 3 illustrates a flowchart of a method for determining a binary of real location data and obtaining a real address code from the binary in accordance with an embodiment of the present disclosure.
As shown in fig. 1 and 2, according to the embodiment of the present disclosure, operations S210-S230 are further included before determining a matching result of the real address code of the real position data and the preset target code of the preset target position data in operation S102.
In operation S210, a binary code of the actual position data is determined;
in operation S220, acquiring a real address code according to the binary code; and
in operation S230, the real address code is stored through the remote storage database.
As shown in fig. 2 and 3, according to an embodiment of the present disclosure, determining a binary encoding of actual position data in operation S210 includes operations S310-S320.
In operation S310, bisection range division is performed on the actual position data to obtain a preliminary code;
in operation S320, the preliminary codes are integrated according to a preset combination rule to obtain a binary code.
The dichotomy range division is similar to a dichotomy, namely coordinates of corresponding actual position data are divided, each division corresponds to a number 1 or 0, and finally a character string formed by combining 1 and 0 is formed. The more the number of times of segmentation is, the longer the finally obtained character string is, and the higher the precision of the expressed range is. When the range to be sliced is small enough, it approaches a point infinitely.
As shown in table 1 below, taking the actual position data (latitude coordinate lat: 39.789135, longitude coordinate lng: 116.565498) of a certain group headquarters in the terrestrial coordinate system as an example, the longitude and latitude are first halved and fall in the corresponding section. Wherein, the original latitude range is [ -90, 90], and the longitude range is [ -180, 180 ]. Halving the latitude interval of [ -90, 90] to obtain two-halved latitude intervals of [ -90, 0] and [0, 90], and obviously, the latitude coordinate 39.789135 of the headquarters of the clique is in the [0, 90] interval, which obtains the first halved result, which is marked as 1. By analogy, the specific bisection process is as described in table 1 below, resulting in a sequence 1011100010. Similarly, a corresponding bisection of longitude would result in a similar binary sequence. The smaller the value range of the longitude and latitude is, the higher the precision is, and the smaller the range of the corresponding rectangular block is. Note that the binary sequences corresponding to the longitude and the latitude, respectively, are the above-described preliminary codes.
TABLE 1
The preset combination rule is as follows: odd digits correspond to a binary sequence of latitudes and even digits correspond to a binary sequence of longitudes. The preliminary codes are recombined through the preset combination rule, and a new binary character string, namely the binary code, can be obtained.
It should be noted that, converting the actual position data of the user and the preset target position data into corresponding encoded character strings in a format such as GeoHash, the character strings may be stored in a remote storage database, for example, a Redis database, in a hash format. The preset target position data can also be stored in a remote storage database in the form of a code character string. The remote storage database can be a database of Redis remote dictionary service, and can be a storage system capable of storing character strings, linked lists, sets, hash values and the like, so that the storage system can support data storage and call of large data volume, further improve the recording efficiency of data recording, and greatly reduce the performance requirements of the server.
After the actual position data or the preset target position data is converted into a form such as a GeoHash encoding character string, the character string can be stored in a remote storage database so that the server can call the character string data to realize the release of the Web service. For example, a data table of a target position is constructed in a Redis database, then the target position is artificially imported into a server in a batch import mode, and the server stores the converted coding character string into a cache Redis database through GeoHash coding. Meanwhile, a location position table is newly established in a common relational database Mysql of the Redis database and used for storing user data needing to be recorded, such as attendance information and information of visiting patrolling stores.
As shown in fig. 2 and 3, according to an embodiment of the present disclosure, acquiring a real address code according to a binary code in operation S220 includes operations S330-S340.
Converting the binary code into a decimal code in operation S330;
in operation S340, a coding operation is performed on the decimal code according to a preset coding rule to obtain a real address code.
After the binary code is obtained, the new binary string (i.e., binary code) may be converted to decimal code of decimal numbers in groups of 5 numbers. Then, an encoding operation such as Base32 is performed on the obtained decimal code, so that a GeoHash-like real address code, such as wx4fke2ksbr5, corresponding to the real position data can be obtained. The preset encoding rule may be a Base32 encoding rule, and 32 letters and numbers 0-9 and b-z (a, i, l, and o are removed) are used for encoding to convert decimal codes into corresponding encoded character strings, which is not described herein again.
It should be immediately obvious to those skilled in the art that, for the preset target position data in the embodiment of the present disclosure, the corresponding preset target code may also be obtained by referring to the code conversion method of the actual position data in operations S310 to S340, which is not described herein again.
As shown in fig. 1, according to an embodiment of the present disclosure, determining a matching result of the real address code of the real position data and the preset target code of the preset target position data in operation S102 includes: and when the actual address code is the same as the prefix field of the preset target code, the matching result is successful.
As shown in fig. 1, according to an embodiment of the present disclosure, implementing data recording of a user according to a matching result in operation S103 includes: and when the matching result is that the matching is successful, completing the data recording.
After the corresponding character strings of the actual address code and the preset target code are obtained, whether the actual position corresponding to the actual address code falls into the corresponding block of the preset target code or not can be judged according to whether the front end fields of the actual address code and the preset target code are the same, namely, the character string matching process is carried out. For example, during the field work, the user may select a location for attendance checking on a certain day or a location (i.e., a target location) where the user needs to check a store in advance in an attendance list of the field work system through the electronic device. Then, when the task is executed before the corresponding time node, data recording, such as card punching or check-in, can be performed through the APP of the electronic device after the target position is reached. Specifically, the server may obtain, as actual location data, coordinate data (e.g., latitude and longitude) of the device location sent by the APP of the user electronic device. The server converts the actual position data code into a character string corresponding to the position (namely, an actual address code) through a GeoHash algorithm, and then obtains a GeoHash value (a preset target code corresponding to preset target position data) of a corresponding attendance point (target position) by using a GeoHash command in a Redis database. If the GeoHash value character string of the attendance point contains the coded prefix of the actual address code, the matching is proved to be successful, the attendance checking is proved to be successful in card punching or sign-in of an outworker at the attendance point, the recorded data is stored in a location position table of a Redis database, and then the multiple data recording effect of the dynamic multi-position multi-time node can be achieved.
Wherein the prefix field of the encoded string may be represented as a larger area or block. For example, for the code string wx4g0ec1, its prefix wx4g0e indicates a larger range including the code wx4g0ec 1. Thus, it can be used accordingly for searching for nearby places.
Therefore, the success or failure of the data recording is determined by converting the actual position and the target position described above into corresponding encoded character strings, and then judging the relationship between the target position and the actual position, such as a card punch position, an attendance point, or a store position, based on the prefix field between the encoded character strings.
Fig. 4 is a flowchart illustrating an acquisition method of preset target position data according to another embodiment of the present disclosure;
as shown in fig. 4, operations S410-S420 are further included before determining a matching result of the real address code of the real location data and the preset target code of the preset target location data in operation S102, according to an embodiment of the present disclosure.
Determining at least one target location based on the real address code in operation S410;
in operation S420, preset target position data is acquired through at least one target position.
As described above, the preset target position data may be acquired according to the actual position of the user. For example, in the process of field work or attendance checking, shop patrol related tasks such as visiting a shop sign-in, a strange visiting sign-in, and visiting a plan sign-in can be performed. In the process of the shop patrol task, according to a preset push service rule, the server can push an attendance point (for example, a store) near the actual position data to the user as a target position according to the user actual position data obtained at regular time, or the user and the like manually select a position to be subjected to data recording as the target position. Accordingly, the target position data is also stored in the remote storage database in the form of the above-mentioned code string. The preset push service rule is as follows: the preset target code corresponding to the target position data is determined by the server according to fuzzy retrieval of a prefix field of an actual address code character string corresponding to the actual position data in a remote storage database, and the searching accuracy can be improved through the fuzzy retrieval, so that shops which can be visited at the periphery can be recommended to a user quickly.
And then, matching the preset target code of the target position such as an store with the actual address code corresponding to the actual position data of the user, wherein when the preset target code and the actual address code have the same prefix character string, the matching is successful, namely, the tour check is successful, otherwise, the matching is failed.
Therefore, under the condition that the data volume of the data record is extremely large, a server with better performance does not need to be replaced, actions such as high-accuracy and high-speed and high-efficiency card punching, registration and sign-in can be realized, and meanwhile, the effects of quickly and fuzzily retrieving and pushing target positions such as attendance points around the actual position can be realized.
One or more of the above-described embodiments may provide the following advantages or benefits: the actual position data of the user is converted into the specific actual address code, so that dynamic data recording of the user corresponding to different actual position data is achieved, meanwhile, the target position of the user can be pushed according to the actual position data, efficient user data recording efficiency is achieved, meanwhile, under the condition that the user data volume is extremely large, higher data recording accuracy can still be achieved, user experience is improved, and meanwhile, service requirements under various different scenes are met.
Fig. 5 illustrates an architecture diagram of a data recording device according to an embodiment of the present disclosure. It should be noted that fig. 5 is only an example of the architecture of a data recording device 500 to which the embodiments of the present disclosure may be applied to help those skilled in the art understand the technical content of the present disclosure, and does not mean that the embodiments of the present disclosure may not be used in other devices, systems, environments or scenarios.
Another aspect of the disclosed embodiment provides a data recording apparatus 500, which includes a data obtaining module 510, a code matching module 520, and a matching recording module 530.
The data obtaining module 510 is configured to obtain actual location data of a user;
the code matching module 520 is configured to determine a matching result between an actual address code of the actual location data and a preset target code of the preset target location data; and
the matching record module 530 is used for implementing data recording of the user according to the matching result.
It should be noted that the data recording apparatus 500 is used for implementing the data recording method, and is not described herein again.
Those skilled in the art will appreciate that any number of modules, sub-modules, units, sub-units, or at least portions of the functionality of any number thereof, in accordance with embodiments of the present disclosure, may be implemented in a single module. Any one or more of the modules, sub-modules, units, and sub-units according to the embodiments of the present disclosure may be implemented by being split into a plurality of modules. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in any other reasonable manner of hardware or firmware by integrating or packaging a circuit, or in any one of or a suitable combination of software, hardware, and firmware implementations. Alternatively, one or more of the modules, sub-modules, units, sub-units according to embodiments of the disclosure may be at least partially implemented as a computer program module, which when executed may perform the corresponding functions.
For example, any of the data acquisition module 510, the code matching module 520, and the matching record module 530 may be combined and implemented in one module, or any one of them may be split into a plurality of modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of the other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the data acquisition module 510, the code matching module 520, and the matching record module 530 may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in hardware or firmware in any other reasonable manner of integrating or packaging a circuit, or in any one of or a suitable combination of software, hardware, and firmware. Alternatively, at least one of the data acquisition module 510, the code matching module 520 and the match record module 530 may be at least partially implemented as a computer program module that, when executed, may perform corresponding functions.
Fig. 6 illustrates a block diagram of an electronic device suitable for implementing the above-described data recording method according to an embodiment of the present disclosure. The electronic device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 6, another aspect of the embodiments of the present disclosure provides an electronic device 600, including: one or more processors and storage devices; the storage device is used for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method described above.
As shown in fig. 6, an electronic device 600 according to an embodiment of the present disclosure includes a processor 601, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. Processor 601 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), among others. The processor 601 may also include onboard memory for caching purposes. Processor 601 may include a single processing unit or multiple processing units for performing different actions of a method flow according to embodiments of the disclosure.
In the RAM603, various programs and data necessary for the operation of the apparatus 600 are stored. The processor 601, the ROM 602, and the RAM603 are connected to each other via a bus 604. The processor 601 performs various operations of the method flows according to the embodiments of the present disclosure by executing programs in the ROM 602 and/or RAM 603. It is to be noted that the programs may also be stored in one or more memories other than the ROM 602 and RAM 603. The processor 601 may also perform various operations of the method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
According to an embodiment of the present disclosure, device 600 may also include an input/output (I/O) interface 605, input/output (I/O) interface 605 also being connected to bus 604. The device 600 may also include one or more of the following components connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.
According to embodiments of the present disclosure, method flows according to embodiments of the present disclosure may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable storage medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The computer program, when executed by the processor 601, performs the above-described functions defined in the system of the embodiments of the present disclosure. The systems, devices, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
Another aspect of the embodiments of the present disclosure provides a computer-readable storage medium having stored thereon executable instructions, which when executed by a processor, cause the processor to implement the above-mentioned method.
The computer-readable storage medium of the present disclosure may be embodied in the devices/apparatuses/systems described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement the method according to an embodiment of the disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example but is not limited to: 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), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the present disclosure, a computer-readable storage medium may include the ROM 602 and/or RAM603 described above and/or one or more memories other than the ROM 602 and RAM 603.
Another aspect of embodiments of the present disclosure provides a computer program comprising computer executable instructions for implementing a method as above when executed.
So far, the embodiments of the present disclosure have been described in detail with reference to the accompanying drawings.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
The embodiments of the present disclosure have been described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described separately above, this does not mean that the measures in the embodiments cannot be used in advantageous combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be devised by those skilled in the art without departing from the scope of the present disclosure, and such alternatives and modifications are intended to be within the scope of the present disclosure.
Claims (11)
1. A data recording method, comprising:
acquiring actual position data of a user;
determining a matching result of an actual address code of the actual position data and a preset target code of preset target position data; and
and realizing data recording of the user according to the matching result.
2. The method of claim 1, wherein: the acquiring of the actual position data of the user comprises:
receiving location data of the user's terminal device as the actual location data at a fixed time period.
3. The method of claim 1, wherein: before the determining a matching result between the actual address code of the actual position data and the preset target code of the preset target position data, the method further includes:
determining a binary encoding of the actual position data;
and acquiring the actual address code according to the binary code.
4. The method of claim 3, wherein: the determining the binary encoding of the actual position data comprises:
bisection range division is carried out on the actual position data to obtain a primary code;
and integrating the preliminary codes according to a preset combination rule to obtain the binary codes.
5. The method of claim 3, wherein: the obtaining the actual address code according to the binary code includes:
converting the binary code to a decimal code;
coding the decimal code according to a preset coding rule to obtain the actual address code; and
and storing the actual address code through a remote storage database.
6. The method of claim 1, wherein: the determining a matching result between the actual address code of the actual position data and the preset target code of the preset target position data includes:
and when the actual address code is the same as the prefix field of the preset target code, the matching result is successful.
7. The method of claim 6, wherein: the data recording of the user according to the matching result comprises:
and when the matching result is that the matching is successful, completing the data recording.
8. The method of claim 1, wherein: before the determining a matching result between the actual address code of the actual position data and the preset target code of the preset target position data, the method further includes:
determining at least one target position according to the actual address code;
and acquiring the preset target position data through the at least one target position.
9. A data recording apparatus comprising:
the data acquisition module is used for acquiring actual position data of a user;
the code matching module is used for determining a matching result of the actual address code of the actual position data and a preset target code of preset target position data; and
and the matching recording module is used for realizing the data recording of the user according to the matching result.
10. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1-8.
11. A computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to implement the method of any one of claims 1-8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011142137.2A CN113760780A (en) | 2020-10-22 | 2020-10-22 | Data recording method, apparatus, device and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011142137.2A CN113760780A (en) | 2020-10-22 | 2020-10-22 | Data recording method, apparatus, device and medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113760780A true CN113760780A (en) | 2021-12-07 |
Family
ID=78785914
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011142137.2A Pending CN113760780A (en) | 2020-10-22 | 2020-10-22 | Data recording method, apparatus, device and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113760780A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114496191A (en) * | 2022-02-10 | 2022-05-13 | 北京京东拓先科技有限公司 | Medical information recommendation method, device, equipment and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106251164A (en) * | 2016-03-21 | 2016-12-21 | 上海驴徒电子商务有限公司 | Method and system are recommended at a kind of scenic spot |
CN107194744A (en) * | 2017-06-21 | 2017-09-22 | 微梦创科网络科技(中国)有限公司 | A kind of method and device for determining user place commercial circle |
CN108345607A (en) * | 2017-01-22 | 2018-07-31 | 腾讯科技(深圳)有限公司 | searching method and device |
CN109074370A (en) * | 2016-04-12 | 2018-12-21 | 北京嘀嘀无限科技发展有限公司 | The system and method for determining point of interest |
CN110895591A (en) * | 2018-09-12 | 2020-03-20 | 北京京东尚科信息技术有限公司 | Method and device for positioning self-picking point |
-
2020
- 2020-10-22 CN CN202011142137.2A patent/CN113760780A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106251164A (en) * | 2016-03-21 | 2016-12-21 | 上海驴徒电子商务有限公司 | Method and system are recommended at a kind of scenic spot |
CN109074370A (en) * | 2016-04-12 | 2018-12-21 | 北京嘀嘀无限科技发展有限公司 | The system and method for determining point of interest |
CN108345607A (en) * | 2017-01-22 | 2018-07-31 | 腾讯科技(深圳)有限公司 | searching method and device |
CN107194744A (en) * | 2017-06-21 | 2017-09-22 | 微梦创科网络科技(中国)有限公司 | A kind of method and device for determining user place commercial circle |
CN110895591A (en) * | 2018-09-12 | 2020-03-20 | 北京京东尚科信息技术有限公司 | Method and device for positioning self-picking point |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114496191A (en) * | 2022-02-10 | 2022-05-13 | 北京京东拓先科技有限公司 | Medical information recommendation method, device, equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10817484B2 (en) | Apparatus, systems, and methods for providing location information | |
CN106709606B (en) | Personalized scene prediction method and device | |
US10281284B2 (en) | Hybrid road network and grid based spatial-temporal indexing under missing road links | |
CN111382212B (en) | Associated address acquisition method and device, electronic equipment and storage medium | |
CN107092623B (en) | Interest point query method and device | |
CN104090970A (en) | Interest point showing method and device | |
US20230049839A1 (en) | Question Answering Method for Query Information, and Related Apparatus | |
CN109657080B (en) | Distributed processing method/system and medium for high-resolution satellite remote sensing data | |
CN110209748B (en) | Method and apparatus for indexing geofences | |
CN113642313A (en) | Address text processing method, device, equipment, storage medium and program product | |
Cetl et al. | A comparison of address geocoding techniques–case study of the city of Zagreb, Croatia | |
CN113760780A (en) | Data recording method, apparatus, device and medium | |
CN114493799A (en) | Method and system for managing special vehicle order data in warehouse and table dividing manner | |
CN110309244B (en) | Target point positioning method and device | |
CN108345607B (en) | Searching method and device | |
CN110852620B (en) | Logistics order processing method and device, electronic equipment and storage medium | |
CN113360586B (en) | Address aggregation degree query method, device, equipment and computer readable storage medium | |
CN111382220A (en) | POI data dividing method and device | |
CN115525841A (en) | Method for acquiring point of interest information, electronic device and storage medium | |
CN114925680A (en) | Logistics interest point information generation method, device, equipment and computer readable medium | |
US20170147604A1 (en) | Database index for the optimization of distance related queries | |
CN112861023A (en) | Map information processing method, map information processing apparatus, map information processing device, storage medium, and program product | |
CN112612825B (en) | Method, device, equipment and storage medium for determining vehicles in the same row | |
CN111475742A (en) | Address extraction method and device | |
CN110928977A (en) | Voice information sharing method and system, readable storage medium and server |
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 |