Method, device, electronic device and storage medium for determining access times

By receiving access information in the Internet of Vehicles platform and determining storage space in the data structure, the problem of waste of storage space and errors in the statistics of access times in the prior art is solved, more efficient storage space utilization and accurate access times counting are achieved, and abnormal detection and network management are supported.

CN114860171BActive Publication Date: 2025-04-01CHINA FAW CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210578202.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-25
Publication Date
2025-04-01
Estimated Expiration
2042-05-25

AI Technical Summary

Technical Problem

When the prior art counts the number of visits to the Internet of Vehicles platform, it is easy to waste storage space due to the estimated maximum number of visits. In the case of a large number of visits, multiple visits to users may be stored in the same storage space, resulting in statistical errors and affecting abnormal detection and network management.

Method used

By receiving access information from the access user, the storage space of the currently accessed user is determined in the pre-established data structure. The data structure includes a counting substructure. The number of bits in the storage space is smaller than the preset threshold, and the preset threshold is the number of space bits required for the maximum predicted value of the access times. Determine the current storage location in the unmarked storage location and set the access tag to count access operations.

Benefits of technology

It improves the utilization rate of storage space, reduces the waste of storage space, enhances the accuracy of access operation counting, and is conducive to abnormal detection and network management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114860171B_ABST
    Figure CN114860171B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses a method, device, electronic device and storage medium for determining the number of visits. The method comprises: receiving access information sent by an accessing user terminal for accessing a vehicle networking platform, and determining the current storage space corresponding to the current accessing user in a pre-established data structure based on the access information; wherein the data structure comprises a counting substructure, and the counting substructure comprises at least one storage space whose storage bit number is less than a preset threshold, and the preset threshold is the number of space bits required for storing the maximum predicted value of the number of visits; determining the current storage location corresponding to the current accessing user in each unmarked storage location of the current storage space; and setting an access mark corresponding to the current accessing user in the current storage location to count the access operations of the current accessing user. The technical solution of the embodiment of the present invention can improve the accuracy of counting access operations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of data processing technology, and in particular to a method, device, electronic device and storage medium for determining the number of visits. Background Art

[0002] With the development of Internet of Vehicles technology, Internet of Vehicles cloud access has also grown explosively, forming streaming data. In order to promptly detect attacks on the vehicle network, it is necessary to analyze the streaming data of access to the vehicle network; that is, by counting the number of visits by different access users, the access security is analyzed.

[0003] In the prior art, in order to avoid the situation where the storage space cannot fully store all the access times, when setting the data structure for storing the access times, the maximum access times of each access user are estimated, and the number of bits of the corresponding storage space is set according to the maximum access times. However, the access times of each access user are not the same, and setting the storage space according to the maximum access times is likely to cause space waste; and when the access times of a large number of access users need to be counted, the access times of multiple access users are likely to be stored in the same storage space, resulting in errors in access counts, affecting anomaly detection and network management. Summary of the invention

[0004] The embodiments of the present invention provide a method, device, electronic device and storage medium for determining the number of accesses, so as to improve the space utilization and the accuracy of counting access operations, and facilitate abnormality detection and network management.

[0005] In a first aspect, an embodiment of the present invention provides a method for determining the number of visits, including:

[0006] Receiving access information sent by an access user terminal for accessing the Internet of Vehicles platform, and determining, based on the access information, a current storage space corresponding to the current access user in a pre-established data structure;

[0007] The data structure includes a counting substructure, and the counting substructure includes at least one storage space whose storage bit number is less than a preset threshold, and the preset threshold is the number of space bits required for storing the maximum predicted value of the number of accesses;

[0008] Determining, among the unmarked storage locations of the current storage space, a current storage location corresponding to the current accessing user;

[0009] An access mark corresponding to the current access user is set in the current storage location to count the access operations of the current access user.

[0010] In a second aspect, an embodiment of the present invention further provides a method for determining the number of visits, the device comprising:

[0011] An access information receiving module is used to receive access information sent by an access user terminal for accessing the Internet of Vehicles platform, and based on the access information, determine a current storage space corresponding to the current access user in a pre-established data structure; wherein the data structure includes a counting substructure, and the counting substructure includes at least one storage space whose storage bit number is less than a preset threshold, and the preset threshold is the number of space bits required for storing the maximum predicted value of the number of accesses;

[0012] A current storage location determination module, configured to determine, among the unmarked storage locations of the current storage space, a current storage location corresponding to the current accessing user;

[0013] The access mark setting module is used to set the access mark corresponding to the current access user in the current storage location to count the access operations of the current access user.

[0014] In a third aspect, an embodiment of the present invention further provides an electronic device, the electronic device comprising:

[0015] one or more processors;

[0016] a storage device for storing one or more programs,

[0017] When the one or more programs are executed by the one or more processors, the one or more processors implement the method for determining the number of visits provided by any embodiment of the present invention.

[0018] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for determining the number of visits provided by any embodiment of the present invention.

[0019] A method for determining the number of visits provided by an embodiment of the present invention receives access information sent by a visiting user terminal for accessing a vehicle networking platform, and based on the access information, determines the current storage space corresponding to the current visiting user in a pre-established data structure; wherein the data structure includes a counting substructure, and the counting substructure includes at least one storage space whose storage digits are less than a preset threshold, and the preset threshold is the number of space digits required for storing the maximum predicted value of the number of visits; the storage spaces in the counting substructure are all less than the number of space digits corresponding to the maximum predicted value, and the current storage location corresponding to the current visiting user is determined in each unmarked storage location of the current storage space; and an access mark corresponding to the current visiting user is set in the current storage location to count the access operations of the current visiting user. The technical solution of the present invention solves the problem of space waste in the prior art; since the spatial location of each storage space is reduced compared with the prior art, the number of storage spaces can be increased, and the situation where the access times of multiple visiting users are stored in the same storage space when a large number of accesses occur is reduced, and the accuracy of counting access operations is improved, which is conducive to abnormal detection and network management.

[0020] In addition, a device for determining the number of visits, an electronic device, and a storage medium provided by the present invention correspond to the above method and have the same beneficial effects. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0022] Figure 1 A flowchart of a method for determining the number of visits provided by an embodiment of the present invention;

[0023] Figure 2 A schematic diagram of a data structure provided by an embodiment of the present invention;

[0024] Figure 3 A structural diagram of a device for determining the number of visits provided by an embodiment of the present invention;

[0025] Figure 4 A structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0026] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0027] It should be mentioned before discussing the exemplary embodiments in more detail that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe the operations (or steps) as sequential processes, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but can also have additional steps not included in the accompanying drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.

[0028] In order to enable those skilled in the art to better understand the solution of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0029] Embodiment 1

[0030] Figure 1 A flowchart of a method for determining the number of visits provided by an embodiment of the present invention. The method can be executed by a device for determining the number of visits, which can be implemented by software and / or hardware and can be configured in a terminal and / or server to implement the method for determining the number of visits in an embodiment of the present invention.

[0031] like Figure 1 As shown, the method of this embodiment may specifically include:

[0032] S101, receiving access information sent by an access user terminal for accessing a connected vehicle platform, and based on the access information, determining a current storage space corresponding to a current access user in a pre-established data structure.

[0033] Among them, the data structure includes a counting substructure, and the counting substructure includes at least one storage space whose storage bit number is less than a preset threshold. The storage space in the counting substructure is used to store the access mark of the visiting user. By counting the number of access marks in each storage space, the number of visits by the visiting user is determined.

[0034] The preset threshold is the number of bits of space required for storing the maximum predicted value of the number of accesses; illustratively, the space required for storing the maximum predicted value may be 16 bits, and the corresponding number of bits of space may be from the 0th bit to the 255th bit, for a total of 256 bits, that is, the storage space includes storage position 0, storage position 1, ..., storage position 255, and the number of bits of the storage space in the counting substructure may be any space less than 256 bits, for example, the storage space in the counting substructure may be set to the minimum predicted value, and the minimum predicted value may be 4 bits, for a total of 16 bits, that is, the storage space includes storage position 0, storage position 1, ..., storage position 15.

[0035] In this embodiment, the access information includes the access number, access address and other information of the access user, and different access user terminals correspond to different access information. It should be noted that the access information obtained in this embodiment is all information obtained with the authorization of the access user, and the acquisition, storage, use and processing of information in the technical solution of this embodiment are in compliance with the relevant provisions of national laws and regulations.

[0036] In a specific implementation, the current storage space corresponding to the current access user can be determined in a pre-established data structure according to a preset mapping relationship between access information and storage space. Specifically, the pre-set mapping relationship can be a hash mapping relationship. The access information includes an access address; based on the access information, the specific implementation method of determining the current storage space corresponding to the current access user in the pre-established data structure can include: performing hash mapping on the access address, and determining the current storage space corresponding to the current access user in the counting substructure based on the mapping result.

[0037] Furthermore, the access information may also include an access number. Based on the access number and the number of storage spaces in the counting substructure, hash mapping is performed, and the storage space in the counting substructure corresponding to the mapping result is determined as the current storage space.

[0038] In this embodiment, the counting substructure includes at least two storage levels, and each storage level includes at least two storage spaces. Figure 2 , the counting substructure is divided into storage levels such as L1, L2, ..., Lr, and r can be set to 4. Each storage level may include at least two storage spaces, and the size of each storage space can be set to 4 bits; according to the preset order of the set storage levels, the ratio of the number of storage spaces of the current storage level to the previous storage level can be set to a preset ratio, such as the ratio of the number of storage spaces included in L2 to L1 is 4:5.

[0039] Based on the counting substructure provided in the present embodiment, based on the access information, determining the current storage space corresponding to the current access user in a pre-established data structure includes: determining the current storage level in each storage level according to the preset sorting of each storage level; determining the theoretical storage space corresponding to the current access user in the current storage level based on the access information; when each storage position in the theoretical storage space is marked, then based on the preset sorting, determining the next storage level adjacent to the current storage level as the current storage level, and repeating the determination of the theoretical storage space until there is an unmarked storage position in the currently determined theoretical storage space, and determining the theoretical storage space where the unmarked storage position is located as the current storage space.

[0040] Among them, those skilled in the art can set the preset sorting according to the actual application situation, such as the preset sorting can be Figure 2 The storage space may include various storage locations based on the set number of storage bits. A storage location is marked, indicating that the storage location has been occupied and cannot be used for marking again.

[0041] Specifically, when access information for accessing the Internet of Vehicles platform sent by the access user terminal is received, the access address and / or access number in the access information can be hashed based on the number of storage spaces in the L1 storage layer to determine the theoretical storage space in the L1 storage layer. When there are unmarked storage locations in the theoretical storage space, the theoretical storage space can be determined as the current storage space. When all storage locations in the theoretical storage space are marked, the L2 storage layer can be determined as the current storage layer according to the preset sorting of the layers, and the theoretical storage space in the L2 storage layer can be determined based on the number of storage spaces in the L2 storage layer and the hash mapping. Similarly, it is determined whether all the theoretical storage spaces in the L2 storage layer are marked. If not, the theoretical storage space is determined as the current storage space. If yes, the above steps are repeated to determine the theoretical storage space in the next storage layer adjacent to the current storage layer according to the preset sorting until there are unmarked storage locations in the currently determined theoretical storage space, and the theoretical storage space where the unmarked storage locations are located is determined as the current storage space. This embodiment sets multiple storage levels to dynamically allocate memory when performing access marking.

[0042] S102: Determine a current storage location corresponding to a current accessing user among the unmarked storage locations in the current storage space.

[0043] In a specific implementation, an unmarked storage location can be randomly determined in the current storage space and set as the current storage location corresponding to the current access user; or the first unmarked storage location can be determined according to the order of the storage locations in the current storage space and determined as the current storage location. Those skilled in the art can set the method of determining the current storage location in the unmarked storage location according to the actual application situation.

[0044] S103: Setting an access mark corresponding to the current access user in the current storage location to count the access operations of the current access user.

[0045] In specific implementations, the access mark can directly reflect the cumulative number of visits of the current visiting user, or the access mark can only indicate that the current visiting user has visited. For example, if this visit is the 4th visit of the current visiting user, the access mark can indicate the 4th visit; the access mark can also be directly set to "1", indicating that the current visiting user has visited again, and the number of visits of the current visiting user can be determined by accumulating the number of access marks corresponding to the current visiting user. Furthermore, the access mark can also include information such as the access time, access number and access address of the current visiting user.

[0046] In this embodiment, the data structure also includes a record substructure, which is used to record the hierarchical information of the storage level where the current storage space is located. The record substructure includes record levels, each record level includes at least one record space, and the number of record levels is 1 less than the number of storage levels.

[0047] For a detailed and specific description of the data structure, see Figure 2 ; The record substructure includes record levels such as R1, R2, ..., Rr-1; the number of record levels can be set to be 1 less than the number of storage levels. The record substructure includes at least one record space, and the record space can be set to occupy 1 bit. By recording the level information of the storage level where the current storage space is located after the record subsection, the hash conflict between different access information is reduced, which is conducive to improving the counting accuracy.

[0048] In a specific implementation, after setting the access mark corresponding to the current accessing user in the current storage location, it also includes: determining the current record level corresponding to the current accessing user based on the storage level where the current storage space is located; based on the access information, determining the current record space corresponding to the current accessing user in the current record level, and performing level marking in the current record space to record the information of the storage level where the current storage space is located.

[0049] Specifically, determine the storage level number of the storage level where the current storage space is located, and determine the value obtained by subtracting 1 from the storage level number as the level number of the current record level. For example, if the storage level where the current storage space is located is L2, then it can be determined that the current record level is R1. Hash mapping can be performed based on the access information and the number of record spaces included in the current record level, and the current record space in the record substructure is determined based on the mapping result. In order to record the storage level of the current number of visits of the current visiting user, the current record space can be hierarchically marked to record the information of the storage level where the current storage space is located. For example, the value can be directly set to the value of the current storage level in the current record space; it is also possible to record through the current record space whether the current number of visits to the storage space occupies the next storage level.

[0050] Exemplarily, when the access mark of the current access user is stored in the storage level L2, the current record level can be determined to be R1. Based on the number of record spaces in R1 and the access information, a hash mapping is performed to determine the current record space corresponding to the current storage level in R1. The record space can be set to occupy 1 bit. If the access times of the current access user are stored in L2 for the first time, the value corresponding to the current record space can be set to "1" to indicate that the storage level of the current access times has changed compared to the last time. If it is not the first time to be stored in L2, the value corresponding to the current record space can be set to "0", indicating that the current access times have not changed in level.

[0051] In this embodiment, the data structure also includes a filtering substructure; Figure 2 As shown, the filter substructure C includes at least one filter space for recording the access information corresponding to the last marked storage position in the storage space. For example, the storage space includes storage position 0, storage position 1, ..., storage position 15, and the last marked storage position is storage position 15, then the access information corresponding to the access mark of storage position 15 can be recorded in the filter space of the filter substructure.

[0052] In a specific implementation, after determining the current storage location corresponding to the current accessing user, it also includes: determining whether the current storage location is the last unmarked location in the current storage space; if so, recording the access information in the filter substructure.

[0053] The recorded access information may include the access address, access number and other information of the access user terminal.

[0054] In this embodiment, the access information corresponding to the last unmarked position of each storage space can be determined through the filtering substructure. When the access information is accessed again, it can be determined that the access mark corresponding to the access information needs to be stored in a different storage level, so as to avoid hash conflicts when the amount of accessed data increases, resulting in errors in the level information recorded in the recording substructure, which helps to improve the accuracy of determining the number of accesses. If the current storage position is not the last unmarked position, there is no need to record the access information in the filtering substructure, and the storage level information can be directly marked in the recording substructure.

[0055] In a specific implementation, performing level marking in the current record space includes: when the access information of the current access user is the access information stored in the filter substructure, then performing level change marking on the current record space.

[0056] Specifically, before performing the hierarchical marking, the information stored in the filtering substructure can be used to determine whether the current recording space needs to be marked for hierarchical changes. When the access information is the stored access information of the filtering substructure, it means that there is no unmarked storage location in the previous storage space corresponding to the current access user, and the current access mark of the current access user needs to change the storage layer, and the recording substructure can be marked for hierarchical changes; when the access information is not the stored access information, it means that the current access mark does not need to change the storage layer, and the recording substructure does not need to be marked for hierarchical changes.

[0057] This embodiment determines the access information stored in the filter substructure before performing the level marking, thereby avoiding errors in the level information recorded in the record substructure when the amount of access data increases, which helps to improve the accuracy of determining the number of accesses.

[0058] In this embodiment, it also includes: when query information for querying the target access number of the target access user is received, based on the query information, the target record position in each record level corresponding to the target access user is determined in the record substructure; based on the level mark of each target record position, the target storage level is determined in the storage substructure; based on the query information, the target storage position in each target storage level is determined, the number of each target storage position is determined, and the number is determined as the target access number.

[0059] The query information includes the access address and access number corresponding to the target access user. The target access user is the user whose access times need to be queried specified in the query information.

[0060] In a specific implementation, if the number of visits of the target visiting user is queried, the hierarchical mark of the target visiting user can be first determined in the record substructure. Exemplarily, based on the query information and hash mapping, the target record position in each record level can be determined step by step in the record substructure according to the order of the record levels, and the hierarchical mark of the record in the target record position can be determined, so as to determine the target storage level of the target visiting user based on the hierarchical mark. Based on the target storage level and the hash algorithm, the target storage position in each target storage level is determined. When the access mark in each target storage position is used to indicate that the current visiting user has made a visit this time, the target number of visits can be determined by the number of target storage positions in each target storage level. When this embodiment queries the number of visits of the visiting user, by first querying the record substructure, the storage level of the access mark is quickly determined, thereby improving the query efficiency and facilitating the accurate determination of the number of visits of the visiting user.

[0061] A method for determining the number of visits provided by an embodiment of the present invention receives access information sent by a visiting user terminal for accessing a vehicle networking platform, and based on the access information, determines the current storage space corresponding to the current visiting user in a pre-established data structure; wherein the data structure includes a counting substructure, and the counting substructure includes at least one storage space whose storage digits are less than a preset threshold, and the preset threshold is the number of space digits required for storing the maximum predicted value of the number of visits; the storage spaces in the counting substructure are all less than the number of space digits corresponding to the maximum predicted value, and the current storage location corresponding to the current visiting user is determined in each unmarked storage location of the current storage space; and an access mark corresponding to the current visiting user is set in the current storage location to count the access operations of the current visiting user. The technical solution of the present invention solves the problem of space waste in the prior art; since the spatial location of each storage space is reduced compared with the prior art, the number of storage spaces can be increased, and the situation where the access times of multiple visiting users are stored in the same storage space when a large number of accesses occur is reduced, and the accuracy of counting access operations is improved, which is conducive to abnormal detection and network management.

[0062] Embodiment 2

[0063] Figure 3 This is a structural diagram of a device for determining the number of visits provided in an embodiment of the present invention, and the device is used to execute the method for determining the number of visits provided in any of the above embodiments. The device and the method for determining the number of visits in the above embodiments belong to the same inventive concept, and the details not described in detail in the embodiment of the device for determining the number of visits can refer to the embodiment of the method for determining the number of visits. The device may specifically include:

[0064] The access information receiving module 10 is used to receive access information sent by the access user terminal for accessing the Internet of Vehicles platform, and based on the access information, determine the current storage space corresponding to the current access user in a pre-established data structure; wherein the data structure includes a counting substructure, and the counting substructure includes at least one storage space whose storage bit number is less than a preset threshold, and the preset threshold is the number of space bits required for storing the maximum predicted value of the number of accesses;

[0065] A current storage location determination module 11, configured to determine, among the unmarked storage locations of the current storage space, a current storage location corresponding to the current access user;

[0066] The access mark setting module 12 is used to set the access mark corresponding to the current access user in the current storage location to count the access operations of the current access user.

[0067] Based on any optional technical solution in the embodiment of the present invention, optionally, the counting substructure includes at least two storage levels, and each of the storage levels includes at least two storage spaces;

[0068] The access information receiving module 10 comprises:

[0069] A current storage level determination unit is used to determine the current storage level in each storage level according to a preset order of the storage levels; determine the theoretical storage space in the current storage level corresponding to the current accessing user based on the access information; when each storage position in the theoretical storage space is marked, determine the next storage level adjacent to the current storage level as the current storage level based on the preset order, and repeat the determination of the theoretical storage space until there is an unmarked storage position in the currently determined theoretical storage space, and determine the theoretical storage space where the unmarked storage position is located as the current storage space.

[0070] Based on any optional technical solution in the embodiments of the present invention, optionally, the data structure further includes a record substructure, the record substructure is used to record the level information of the storage level where the current storage space is located, the record substructure includes record levels, each of the record levels includes at least one record space, and the number of the record levels is less than the number of the storage levels by 1; the device also includes:

[0071] A current record level determination module is used to determine the current record level corresponding to the current accessing user based on the storage level where the current storage space is located, after setting the access mark corresponding to the current accessing user in the current storage location; based on the access information, determine the current record space corresponding to the current accessing user in the current record level, and perform level marking on the current record space to record the information of the storage level where the current storage space is located.

[0072] Based on any optional technical solution in the embodiments of the present invention, optionally, the data structure further includes a filtering substructure; and the device further includes:

[0073] The access information recording module is used to determine whether the current storage position is the last unmarked position in the current storage space after determining the current storage position corresponding to the current accessing user; if so, record the access information in the filtering substructure.

[0074] Based on any optional technical solution in the embodiments of the present invention, optionally, the current record level determination module includes:

[0075] The level change marking unit is used to mark the level change of the current record space when the access information of the current access user is the access information stored in the filtering substructure.

[0076] Based on any optional technical solution in the embodiments of the present invention, optionally, the device further includes:

[0077] A target record location determination module is used for, when receiving query information for querying the target access times of a target access user, determining, based on the query information, the target record locations in each of the record levels corresponding to the target access user in the record substructure; determining, based on the level mark of each of the target record locations, the target storage level in the storage substructure; determining, based on the query information, the target storage locations in each of the target storage levels, determining the number of each of the target storage locations, and determining the number as the target access times.

[0078] Based on any optional technical solution in the embodiment of the present invention, optionally, the access information includes an access address; and the access information receiving module 10 includes:

[0079] The hash mapping unit is used to perform hash mapping on the access address and determine the current storage space corresponding to the current access user in the counting substructure based on the mapping result.

[0080] The access number determination device provided in the embodiment of the present invention can execute the access number determination method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0081] It is worth noting that in the embodiment of the above-mentioned access number determination device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.

[0082] Embodiment 3

[0083] Figure 4 A structural diagram of an electronic device provided by an embodiment of the present invention. Figure 4 A block diagram of an exemplary electronic device 20 suitable for implementing an embodiment of the present invention is shown. The electronic device 20 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0084] like Figure 4 As shown, the electronic device 20 is in the form of a general computing device. The components of the electronic device 20 may include but are not limited to: one or more processors or processing units 201, a system memory 202, and a bus 203 connecting different system components (including the system memory 202 and the processing unit 201).

[0085] Bus 203 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus structures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus and Peripheral Component Interconnect (PCI) bus.

[0086] The electronic device 20 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 20, including volatile and non-volatile media, removable and non-removable media.

[0087] The system memory 202 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 204 and / or cache memory 205. The electronic device 20 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 206 may be used to read and write non-removable, non-volatile magnetic media. A disk drive for reading and writing removable non-volatile disks (such as "floppy disks"), and an optical disk drive for reading and writing removable non-volatile optical disks (such as CD-ROM, DVD-ROM or other optical media) may be provided. In these cases, each drive may be connected to the bus 203 via one or more data medium interfaces. The memory 202 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of various embodiments of the present invention.

[0088] A program / utility 208 having a set (at least one) of program modules 207 may be stored, for example, in the memory 202, such program modules 207 including but not limited to an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 207 generally perform the functions and / or methods of the embodiments described herein.

[0089] The electronic device 20 may also communicate with one or more external devices 209 (e.g., keyboards, pointing devices, displays 210, etc.), may communicate with one or more devices that enable a user to interact with the electronic device 20, and / or may communicate with any device that enables the electronic device 20 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via an input / output (I / O) interface 211. Furthermore, the electronic device 20 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 212. As shown, the network adapter 212 communicates with other modules of the electronic device 20 via a bus 203. It should be understood that other hardware and / or software modules may be used in conjunction with the electronic device 20, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.

[0090] The processing unit 201 executes various functional applications and data processing by running programs stored in the system memory 202 .

[0091] An electronic device provided by the present invention can implement the following method: receiving access information sent by an access user terminal for accessing a vehicle networking platform, and determining the current storage space corresponding to the current access user in a pre-established data structure based on the access information; wherein the data structure includes a counting substructure, and the counting substructure includes at least one storage space whose storage bit number is less than a preset threshold, and the preset threshold is the number of space bits required for storing the maximum predicted value of the number of accesses; determining the current storage location corresponding to the current access user in each unmarked storage location of the current storage space; setting an access mark corresponding to the current access user in the current storage location to count the access operations of the current access user. The technical solution of the present invention solves the problem of space waste in the prior art; since the spatial location of each storage space is reduced compared with the prior art, the number of storage spaces can be increased, and the situation where the access times of multiple access users are stored in the same storage space when a large number of accesses occur is reduced, and the accuracy of counting access operations is improved, which is conducive to abnormal detection and network management.

[0092] Embodiment 4

[0093] An embodiment of the present invention provides a storage medium including computer executable instructions. When the computer executable instructions are executed by a computer processor, they are used to perform a method for determining the number of accesses. The method includes:

[0094] Receive access information sent by the access user end for accessing the Internet of Vehicles platform, and based on the access information, determine the current storage space corresponding to the current access user in a pre-established data structure; wherein the data structure includes a counting substructure, and the counting substructure includes at least one storage space whose storage bit number is less than a preset threshold, and the preset threshold is the number of space bits required for storing the maximum predicted value of the number of accesses; in each unmarked storage position of the current storage space, determine the current storage position corresponding to the current access user; set an access mark corresponding to the current access user in the current storage position to count the access operations of the current access user. The technical solution of the present invention solves the problem of space waste in the prior art; since the spatial position of each storage space is reduced compared with the prior art, the number of storage spaces can be increased, and the situation where the access times of multiple access users are stored in the same storage space when a large number of accesses occur is reduced, and the accuracy of counting access operations is improved, which is conducive to abnormal detection and network management.

[0095] Of course, the computer executable instructions of a storage medium including computer executable instructions provided by an embodiment of the present invention are not limited to the above method operations, and can also execute related operations in the access number determination method provided by any embodiment of the present invention.

[0096] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, 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 portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, a device or a device or used in combination with it.

[0097] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0098] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0099] Computer program code for performing the operation of embodiments of the present invention may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0100] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A method for determining the number of visits, characterized in that: include: Receiving access information sent by an access user terminal for accessing the Internet of Vehicles platform, and determining, based on the access information, a current storage space corresponding to the current access user in a pre-established data structure; The data structure includes a counting substructure, the counting substructure includes at least two storage levels, each of the storage levels includes at least two storage spaces whose storage bit count is less than a preset threshold, and the preset threshold is the number of space bits required for storing the maximum predicted value of the number of accesses; Determining, among the unmarked storage locations of the current storage space, a current storage location corresponding to the current accessing user; Setting an access mark corresponding to the current access user in the current storage location to count the access operations of the current access user; Wherein, based on the access information, determining the current storage space corresponding to the current access user in a pre-established data structure includes: According to the preset order of the storage levels, a current storage level is determined in the storage levels; Determine, based on the access information, a theoretical storage space in the current storage level corresponding to the current access user; When all storage locations in the theoretical storage space are marked, based on the preset sorting, the next storage level adjacent to the current storage level is determined as the current storage level, and the determination of the theoretical storage space is repeated until there are unmarked storage locations in the currently determined theoretical storage space, and the theoretical storage space where the unmarked storage locations are located is determined as the current storage space.

2. The method according to claim 1, characterized in that The data structure further includes a record substructure, the record substructure is used to record the level information of the storage level where the current storage space is located, the record substructure includes record levels, each of the record levels includes at least one record space, and the number of the record levels is 1 less than the number of the storage levels; After setting the access mark corresponding to the current access user in the current storage location, the method further includes: Based on the storage level of the current storage space, determine the current record level corresponding to the current access user; Based on the access information, a current recording space corresponding to the current accessing user is determined in the current recording level, and a level mark is performed on the current recording space to record information of the storage level where the current storage space is located.

3. The method according to claim 2, characterized in that The data structure further includes a filtering substructure; after determining the current storage location corresponding to the current access user, it further includes: Determining whether the current storage position is the last unmarked position in the current storage space; If yes, the access information is recorded in the filter substructure.

4. The method according to claim 3, characterized in that The performing level marking in the current recording space includes: When the access information of the current access user is the access information stored in the filtering substructure, the level change mark is performed on the current record space.

5. The method according to claim 2, characterized in that: Also includes: When query information for querying the target access times of the target access user is received, based on the query information, a target record position in each of the record levels corresponding to the target access user is determined in the record substructure; Determining a target storage level in a storage substructure based on the level mark of each of the target record locations; Based on the query information, target storage locations in each of the target storage levels are determined, the number of each of the target storage locations is determined, and the number is determined as the target access count.

6. The method according to claim 1, characterized in that The access information includes an access address; based on the access information, determining a current storage space corresponding to the current access user in a pre-established data structure, further includes: Hash mapping is performed on the access address, and based on the mapping result, a current storage space corresponding to the current access user is determined in the counting substructure.

7. A device for determining the number of visits, characterized in that: include: An access information receiving module is used to receive access information sent by an access user terminal for accessing the Internet of Vehicles platform, and based on the access information, determine the current storage space corresponding to the current access user in a pre-established data structure; wherein the data structure includes a counting substructure, the counting substructure includes at least two storage levels, each of the storage levels includes at least two storage spaces whose storage bits are less than a preset threshold, and the preset threshold is the number of bits of space required for storing the maximum predicted value of the number of accesses; A current storage location determination module, configured to determine, among the unmarked storage locations of the current storage space, a current storage location corresponding to the current accessing user; An access mark setting module, used to set an access mark corresponding to the current access user in the current storage location to count the access operations of the current access user; The access information receiving module comprises: A current storage level determination unit is used to determine the current storage level in each storage level according to a preset order of each storage level; determine a theoretical storage space in the current storage level corresponding to the current accessing user based on the access information; when each storage position in the theoretical storage space is marked, determine the next storage level adjacent to the current storage level as the current storage level based on the preset order, and repeat the process of determining the theoretical storage space until there is an unmarked storage position in the currently determined theoretical storage space, and determine the theoretical storage space where the unmarked storage position is located as the current storage space.

8. An electronic device, characterized in that: include: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the access count determination method as described in any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for determining the number of visits as described in any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Statistical method and system of user activity

    CN108259421A

  • Controlling autonomous vehicles using safe arrival times

    CN111133448A