[go: up one dir, main page]

CN113791733B - Information storage method, device, equipment and storage medium - Google Patents

Information storage method, device, equipment and storage medium Download PDF

Info

Publication number
CN113791733B
CN113791733B CN202111037530.XA CN202111037530A CN113791733B CN 113791733 B CN113791733 B CN 113791733B CN 202111037530 A CN202111037530 A CN 202111037530A CN 113791733 B CN113791733 B CN 113791733B
Authority
CN
China
Prior art keywords
information
receiving
server
identifier
terminal equipment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111037530.XA
Other languages
Chinese (zh)
Other versions
CN113791733A (en
Inventor
傅鑫
郭庆
谢莹莹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Zhongke Shuguang Technology Service Co ltd
Original Assignee
Qingdao Zhongke Shuguang Technology Service Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qingdao Zhongke Shuguang Technology Service Co ltd filed Critical Qingdao Zhongke Shuguang Technology Service Co ltd
Priority to CN202111037530.XA priority Critical patent/CN113791733B/en
Publication of CN113791733A publication Critical patent/CN113791733A/en
Application granted granted Critical
Publication of CN113791733B publication Critical patent/CN113791733B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/062Securing storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0644Management of space entities, e.g. partitions, extents, pools
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/1066Session management
    • H04L65/1073Registration or de-registration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Multimedia (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention discloses a method, a device, equipment and a storage medium for storing information, wherein the method comprises the following steps: when the acquisition information sent by the terminal equipment is detected, determining an information receiving strategy matched with the acquisition information according to the information type of the acquisition information, and receiving the acquisition information sent by the terminal equipment according to the information receiving strategy; and generating an information identifier of the characterization area information corresponding to the acquired information according to the information type of the acquired information, and storing the acquired information based on the information identifier. According to the technical scheme provided by the embodiment of the invention, for different types of acquired information, the information is received by adopting corresponding different receiving strategies, so that the receiving efficiency of the acquired information can be improved, meanwhile, the acquired information is stored based on the information identifier by generating the information identifier representing the regional information, the regional division storage of the acquired information is realized, the effective index of the acquired information is established, and the information retrieval difficulty is reduced.

Description

Information storage method, device, equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of big data, in particular to a method, a device, equipment and a storage medium for storing information.
Background
Along with the increasing popularity of intelligent devices, how to effectively collect, store and manage a large amount of data generated by the intelligent devices becomes a difficult problem to be solved.
At present, in the existing information collection and storage method, as shown in fig. 1, data of a front-end message source or a message database is summarized into a big data storage or management service through a message queue or a distributed log system technology, and then the data is cleaned, stored and utilized through the big data storage or management service.
However, the following problems exist in the prior art: the collected information of each area cannot be classified and stored, so that the collected information of multiple areas is mixed, the difficulty of cleaning and managing the information is increased, and the later maintenance and management cost is increased; meanwhile, the lack of effective index for storing information leads to high information retrieval difficulty, high information storage redundancy and low information retrieval efficiency.
Disclosure of Invention
The invention provides an information storage method, device, equipment and storage medium, and provides a new mode for storing collected information based on information identification representing information of a corresponding region of the collected information, so that the region division storage of the collected information is realized, the information management difficulty is reduced, an effective index of the collected information is established, and the information retrieval difficulty is reduced.
In a first aspect, an embodiment of the present invention provides a method for storing information, including:
When the acquisition information sent by the terminal equipment is detected, determining an information receiving strategy matched with the acquisition information according to the information type of the acquisition information;
receiving acquisition information sent by the terminal equipment according to the information receiving strategy;
And generating an information identifier of the characterization area information corresponding to the acquired information according to the information type of the acquired information, and storing the acquired information based on the information identifier.
Optionally, the generating, according to the information type of the collected information, an information identifier of the characterization area information corresponding to the collected information, and storing the collected information based on the information identifier includes:
when the acquired information is text data, generating an information identifier of the characterization area information corresponding to the acquired information through a snowflake algorithm, storing the acquired information and the information identifier in a local corresponding mode, and forming a mapping relation between the acquired information and the information identifier;
When the acquired information is picture data or video data, generating an information identifier of the characterization area information corresponding to the acquired information through a snowflake algorithm, determining a target storage server matched with the terminal equipment based on a mapping relation between the information identifier and the storage server, and sending an IP address of the target storage server to the terminal equipment so as to store the acquired information sent by the terminal equipment through the target storage server.
By adopting the technical scheme, for the text data, the receiving server generates the information identification of the corresponding characterization area information based on the snowflake algorithm, and locally stores the text data based on the information identification, and simultaneously generates the mapping relation between the information identification and the text data, so that the storage flow of the acquired information can be simplified, and the information storage efficiency is improved; for the picture data and the video data, the receiving server determines the matched storage server, and the data are stored through the storage server, so that occupation of the memory of the receiving server by the collected information with large data volume can be avoided, and efficient management of the collected information and quick response to information retrieval are ensured.
Optionally, the generating, by a snowflake algorithm, an information identifier of the characterizing area information corresponding to the acquired information includes:
determining an area identifier in ten-bit working machine identifiers based on a snowflake algorithm;
determining the area of the terminal equipment according to the Internet Protocol (IP) address of the acquired information;
determining a target area identifier matched with the terminal equipment according to the belonging area;
and filling the region identifier by adopting the target region identifier to obtain the information identifier corresponding to the acquired information.
By adopting the technical scheme, the working machine identifications are divided, and the area identifications representing the area information are filled, so that the acquisition of the information identifications representing the area information is realized, the storage of the acquired information in different areas is realized, and the management efficiency and the retrieval speed of the acquired information are improved.
Optionally, the determining, according to the information type of the collected information, an information receiving policy that the collected information matches includes:
When the acquired information is text data, determining that an information receiving strategy matched with the acquired information is a short link protocol and an information compensation mechanism;
When the acquired information is picture data or video data, determining that the information receiving strategy matched with the acquired information is a long link protocol and a discontinuous network transmission mechanism.
By adopting the technical scheme, the corresponding matched information receiving strategies are adopted for receiving the acquired information of different information types, so that the receiving efficiency of the acquired information is improved.
Optionally, after storing the collected information based on the information identifier, the method further includes:
responding to a query request for collecting information, and acquiring a target query identifier in the query request;
if the target information identification matched with the target query identification is found in the mapping relation between the acquired information and the information identification, taking the target acquired information corresponding to the target information identification as a response result of the query request;
Otherwise, searching a target information identifier matched with the target query identifier in a mapping relation between the information identifier and a storage server according to the target query identifier, sending the query request to a target storage server corresponding to the target information identifier, and sending acquired information corresponding to the target query identifier to a sender of the query request through the target storage server.
By adopting the technical scheme, the receiving server searches the matched acquisition information in the local or storage server according to the target query identifier in the query request, and sends the searched matched acquisition information to the query request sender, so that the high-efficiency search of the acquisition information is realized, and the information search efficiency is improved.
Optionally, before determining the information receiving policy matched with the acquired information according to the information type of the acquired information when the acquired information sent by the terminal device is detected, the method further includes:
Receiving a registration request of the terminal equipment through a registration server, and determining the area of the terminal equipment through the registration server according to the IP address of the registration request;
and determining a matched receiving server of the terminal equipment according to the belonging area through a registration server, and feeding back the IP address of the matched receiving server to the terminal equipment so that the receiving server receives the acquisition information sent by the terminal equipment.
By adopting the technical scheme, the registration server is used for registering the terminal equipment, and the corresponding receiving server is not allocated to the terminal equipment, so that the terminal equipment can acquire the IP address of the matched receiving server, and the safety of information transmission is improved.
Optionally, the determining, by the registration server, the receiving server matched with the terminal device according to the area, includes:
Determining at least one alternative receiving server matched with the terminal equipment according to the belonging area through a registration server;
And determining the receiving server matched with the terminal equipment from the alternative receiving servers through the registration server according to the nearby principle and/or the load balancing principle.
By adopting the technical scheme, the registration server can realize more reasonable distribution of the receiving servers, and the efficiency of the receiving servers in receiving and storing the acquired information can be improved.
In a second aspect, an embodiment of the present invention further provides an information storage device, including:
The information receiving strategy determining module is used for determining an information receiving strategy matched with the acquired information according to the information type of the acquired information when the acquired information sent by the terminal equipment is detected;
the acquisition information receiving module is used for receiving the acquisition information sent by the terminal equipment according to the information receiving strategy;
The system comprises an acquisition information storage module, a storage module and a storage module, wherein the acquisition information storage module is used for generating an information identifier of the characterization area information corresponding to the acquisition information according to the information type of the acquisition information, and storing the acquisition information based on the information identifier.
In a third aspect, an embodiment of the present invention further provides an electronic device, including:
One or more processors;
storage means for storing one or more programs,
The one or more programs, when executed by the one or more processors, cause the one or more processors to implement a method of storing information as described in any embodiment of the present invention.
In a fourth aspect, embodiments of the present invention further provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method for storing information according to any of the embodiments of the present invention.
According to the technical scheme, when the acquisition information sent by the terminal equipment is detected, an information receiving strategy matched with the acquisition information is determined according to the information type of the acquisition information, and the acquisition information sent by the terminal equipment is received according to the information receiving strategy; and then according to the information type of the collected information, the information identification of the characterization area information corresponding to the collected information is generated, the collected information is stored based on the information identification, the information is received by adopting corresponding different receiving strategies for different types of the collected information, the receiving efficiency of the collected information can be improved, meanwhile, the information identification of the characterization area information is generated, the collected information is stored based on the information identification, the area division storage of the collected information is realized, the information management difficulty is reduced, meanwhile, the effective index of the collected information is established, and the information retrieval difficulty is reduced.
Drawings
FIG. 1 is a schematic diagram of a prior art method of storing information;
FIG. 2 is a flow chart of a method for storing information according to an embodiment of the present invention;
FIG. 3A is a flowchart of a method for storing information according to an embodiment of the present invention;
FIG. 3B is a schematic diagram of information identification based on a snowflake algorithm according to an embodiment of the present invention;
FIG. 3C is a schematic diagram of another information identification based on a snowflake algorithm according to an embodiment of the present invention;
FIG. 4A is a flowchart of a method for storing information according to an embodiment of the present invention;
Fig. 4B is an application scenario schematic diagram of a method for storing information according to an embodiment of the present invention;
fig. 4C is an application scenario schematic diagram of another information storage method according to an embodiment of the present invention;
FIG. 5 is a block diagram of an information storage device according to an embodiment of the present invention;
fig. 6 is a block diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings.
Fig. 2 is a flowchart of a method for storing information provided in an embodiment of the present invention, where the embodiment of the present invention is applicable to generating a corresponding information identifier according to area information of collected information and storing the collected information based on a current information identifier, where the method may be performed by an apparatus for storing information in the embodiment of the present invention, where the apparatus may be implemented by software and/or hardware and integrated on an electronic device, typically, the electronic device may be a server, and the method specifically includes the following steps:
S110, when the acquired information sent by the terminal equipment is detected, determining an information receiving strategy matched with the acquired information according to the information type of the acquired information.
The terminal device may be an electronic device integrated with a photographing or image capturing function module, for example, a camera, a video camera, etc.; but may also be a cell phone or computer device including text input means, such as a keyboard. It can be understood that one terminal device can collect multiple types of information, for example, a computer device can collect text, voice, pictures, video and other types of information at the same time; in addition, the collected information may also be existing information in the network. In this embodiment, the type of information that the terminal device can collect information and the manner of collecting information are not particularly limited.
The information receiving strategy refers to an information transmission mode between the server and the terminal equipment; it should be noted that, in an information transmission manner, only effective transmission of specific information or information of a plurality of types can be generally realized; for example, the information transmission method of the message queue is only suitable for transmitting text information, and the transmission efficiency is extremely low for large data amount information such as pictures or videos. Therefore, when the receiving server for collecting information detects that the terminal equipment needs to send the collected information, the corresponding information receiving strategy is determined according to the information type of the collected information to be transmitted, the problem of low information transmission rate caused by mismatching of the information receiving mode and the collected information type can be avoided, and the receiving efficiency of the collected information is improved.
In a specific implementation manner of this embodiment, determining, according to the information type of the collected information, an information receiving policy that the collected information matches may include: according to the information type of the collected information, searching an information receiving strategy matched with the information type of the collected information in a mapping relation between the information type and the information receiving strategy, which is established in advance.
In an optional implementation manner of this embodiment, determining, according to the information type of the collected information, an information receiving policy that the collected information matches may include: when the acquired information is text data, determining that an information receiving strategy matched with the acquired information is a short link protocol and an information compensation mechanism; when the acquired information is picture data or video data, determining that the information receiving strategy matched with the acquired information is a long link protocol and a discontinuous network transmission mechanism.
The short link protocol is that a link is established every time information transmission is performed, and the link is interrupted when the information transmission is finished, so that the short link protocol is suitable for information transmission with small unit data volume but high frequency, such as text data transmission. The information compensation mechanism is used for avoiding information loss, an information sender stores information locally when transmitting the information, and regularly detects whether the locally stored information is consistent with the information stored by a receiver, if the locally stored information is inconsistent with the information stored by the receiver, the information is considered to be lost, and the information is retransmitted, so that the stability of information transmission can be ensured. In this embodiment, when the receiving server determines that the collected information is text data, a short link protocol and an information compensation mechanism are adopted to receive the collected information, so that efficient and stable receiving of the collected information can be ensured.
The long-link protocol means that after the communication link is established, the communication link is kept for a certain time without interruption; the time of the link holding can be adaptively set, and the method is suitable for continuous transmission of information with large unit data volume. For example, the transmission of picture or video data. The network disconnection and continuous transmission mechanism is used for dividing the information to be transmitted into a plurality of parts when the information is transmitted, transmitting the parts at the same time, and suspending a transmission task if network link is interrupted in the transmission process; when the network link is restored, the information transmission is continued from the paused position, so that the stability of the information transmission can be improved. In this embodiment, when the receiving server receives a large amount of collected information such as pictures or videos, a long link protocol is used to combine with a discontinuous network transmission mechanism to receive the collected information, so that the information receiving efficiency is ensured, and meanwhile, the stability of information receiving is further improved.
S120, receiving acquisition information sent by the terminal equipment according to the information receiving strategy.
Specifically, after determining an information receiving policy matched with the current collected information, the receiving server receives the collected information sent by the terminal device in real time based on the current information receiving policy.
It should be noted that, since the terminal device may collect different types of information, the information type of the collected information sent by the terminal device may change. In this embodiment, the receiving server detects the information type of the acquired information to be received in real time, so that when the information type of the acquired information is changed, the information receiving policy can be switched in time.
In an optional implementation manner of this embodiment, the receiving server may receive the acquired information of the terminal device through an information transceiver element based on the Netty architecture. Wherein Netty is a Java-based client/server framework; in this embodiment, by using the zero copy characteristic of the NIO (Nonblocking I/O, non-blocking IO) in the Netty, when the acquired information needs to be received, a memory is opened up from outside the heap memory to directly read the acquired information, so that multiple copies of the acquired information can be avoided, and the receiving efficiency of the acquired information is improved.
In this embodiment, the receiving server receives the acquired information of the terminal device through the information transceiver based on the Netty architecture, so that efficient transmission of large data amount information such as pictures or videos can be realized, the limitation that the existing message queue or distributed log system technology can only transmit text data is overcome, high concurrency and high fault tolerance transmission of the acquired information are realized, and the receiving efficiency of the receiving server on the acquired information is improved.
S130, generating an information identifier of the characterization area information corresponding to the acquired information according to the information type of the acquired information, and storing the acquired information based on the information identifier.
Specifically, after receiving the acquired information of the terminal device, the receiving server determines an information identifier of the acquired information according to the area to which the acquired information belongs, and stores the acquired information by taking the information identifier as an index of the acquired information.
It should be noted that, the collected information sent by the terminal device includes own internet protocol (Internet Protocol, IP) address, which is used to indicate the identity information of the sender of the collected information; the IP address of the terminal equipment is distributed by an operator in the region according to the region in which the terminal equipment is located, and one terminal equipment is uniquely corresponding to one IP address. Therefore, after receiving the IP address of the terminal equipment, the receiving server can inquire the attribution of the corresponding IP address according to the current IP address so as to determine the current area of the terminal equipment, namely the area where the information is collected.
Secondly, after determining the area of the acquired information, the receiving server generates a unique area identifier corresponding to the acquired information according to the area of the acquired information; for example, different regions may be identified using numbers and characters, e.g., A for Beijing, A1 for east urban area, and A2 for west urban area. The manner of generating the area identifier in this embodiment is not particularly limited.
Note that, after determining the area identifier of the collected information, the receiving server further determines the device identifier of the collected information according to the terminal device that sends the collected information; specifically, the device identifier of the terminal device may be determined according to the access sequence of the terminal device and according to the code increment principle. Meanwhile, the receiving server determines a time identifier corresponding to each piece of acquired information according to the receiving time of each piece of acquired information; and finally, combining the area identifier, the equipment identifier and the time identifier to generate an information identifier corresponding to each piece of acquired information, thereby realizing the creation of a unique index of each piece of acquired information.
In an optional implementation manner of this embodiment, the receiving server may store the collected information in a classified manner according to the region information of the collected information, so as to generate a sub-database corresponding to each region; typically, with the city as a unit, sub-databases corresponding to the cities are established, and subsequently after acquisition of the acquired information of the terminal device, the receiving server stores the acquired information into the sub-databases matched with the city according to the area to which the acquired information belongs and the membership of the area to the city. Correspondingly, when the stored information is queried, the sub-database of the current regional affiliated city can be determined according to the regional information in the query request, so that the corresponding stored information is searched in the corresponding sub-database, and the query efficiency of the stored information can be greatly improved.
In the embodiment, the information identification of the acquired information is determined through the server according to the regional information of the acquired information, and the information identification is used as an index of the acquired information to store the acquired information, so that the classified storage of the acquired information of different affiliated regions is realized, and the management difficulty of the stored information is reduced; meanwhile, an effective index of the acquired information is generated, and the retrieval efficiency of the subsequent acquired information is improved.
According to the technical scheme, when the acquisition information sent by the terminal equipment is detected, an information receiving strategy matched with the acquisition information is determined according to the information type of the acquisition information, and the acquisition information sent by the terminal equipment is received according to the information receiving strategy; and then according to the information type of the collected information, the information identification of the characterization area information corresponding to the collected information is generated, the collected information is stored based on the information identification, the information is received by adopting corresponding different receiving strategies for different types of the collected information, the receiving efficiency of the collected information can be improved, meanwhile, the information identification of the characterization area information is generated, the collected information is stored based on the information identification, the area division storage of the collected information is realized, the information management difficulty is reduced, meanwhile, the effective index of the collected information is established, and the information retrieval difficulty is reduced.
Fig. 3A is a flowchart of a method for storing information according to an embodiment of the present invention, where the embodiment is implemented on the basis of the foregoing embodiment, and in this embodiment, for collected information of different information types, corresponding information storage policies are used for storing the collected information, respectively, and the method specifically includes:
And S210, when the acquisition information sent by the terminal equipment is detected, determining an information receiving strategy matched with the acquisition information according to the information type of the acquisition information, and executing S220.
S220, receiving acquisition information sent by the terminal equipment according to the information receiving strategy.
Wherein, there are two cases when storing the acquisition information: when the acquired information is text data, S230 is executed; when the acquisition information is picture data or video data, S240 is performed. In this embodiment, for the collected information of different information types, the receiving server stores the collected information by adopting corresponding different information storage modes, so that the information storage modes are more consistent with the characteristics of the collected information, and the information management efficiency is improved.
S230, generating an information identifier of the characterization area information corresponding to the acquired information through a snowflake algorithm, storing the acquired information and the information identifier in a local corresponding mode, and forming a mapping relation between the acquired information and the information identifier.
The snowflake algorithm (snowflake) is a method for generating an information Identification (ID) according to the current system time; the information generated based on the snowflake algorithm is identified as 64bit integer data, as shown in FIG. 3B; wherein the highest bit 1bit is an identification bit, 1 represents a negative number, 0 represents a positive number, and the information ID is a positive number, so the identification bit is constantly 0; the 41bit stores the time stamp with accuracy of millisecond and maximum service life of 69 years; the 10bit machine bit can be deployed in 2 10 =1024 terminal devices to generate corresponding information identifiers; the 12bit sequence number indicates that the number of unique IDs generated at maximum of one millisecond is 2 12 =4096.
It can be understood that when the information type of the collected information is text data, the local storage of the text data does not affect the information management and retrieval capability of the server because the data volume of the text data is usually smaller; when receiving text data, the receiving server generates an information identifier for representing the region information through a snowflake algorithm, takes the current information identifier as an index of the text data, and locally stores the text data; and simultaneously, establishing a mapping relation between the text data and the information identifier, and storing the current mapping relation.
In this embodiment, the text data with smaller data size is directly stored, so that the flow of information storage can be simplified, and the information storage efficiency can be improved.
In an optional implementation manner of this embodiment, the generating, by a snowflake algorithm, an information identifier of the characterizing area information corresponding to the acquired information may include: determining an area identifier in ten-bit working machine identifiers based on a snowflake algorithm; determining the area of the terminal equipment according to the Internet Protocol (IP) address of the acquired information; determining a target area identifier matched with the terminal equipment according to the belonging area; and filling the region identifier by adopting the target region identifier to obtain the information identifier corresponding to the acquired information.
It should be noted that, because the snowflake algorithm generates the information identifier and completely depends on time, if there is time callback, duplicate ID is generated; in order to avoid the above problem, in this embodiment, a preset bit is divided from a 10bit working machine identifier in a snowflake algorithm to be used as an area identifier, and the area of a terminal device sending the collected information is determined according to the IP address of the collected information, so as to determine a target area identifier corresponding to the area, and the target area identifier is filled into the pre-divided area identifier; wherein the other bits are still determined according to the snowflake algorithm. Thus, accurate acquisition of unique information identification of the identification area information is realized.
It can be understood that the length of the area dividing identifier determines the number of identifiable areas, and the length of the remaining work machine identifier determines the number of deployable terminal devices in each area; therefore, the number of the areas and the number of the terminal devices in each area can be comprehensively considered, and the length of the area dividing mark can be adaptively adjusted. For example, when the number of areas is large and the number of terminal devices deployed in each area is small, the length of the area dividing mark can be reduced; when the number of the areas is small, the length of the area dividing identifier can be increased so as to increase the number of the terminal devices which can be deployed in each area.
In a specific embodiment, as shown in fig. 3C, 4 bits are divided into 10 bits of work machine identification as area identification; at this time, the current receiving server supports deployment in 2 4 =16 areas, and the terminal device deployable in each area is 2 6 =64.
S240, generating an information identifier of the characterization area information corresponding to the acquired information through a snowflake algorithm, determining a target storage server matched with the terminal equipment based on a mapping relation between the information identifier and the storage server, and executing S250.
The storage server is a server for storing information only. In this embodiment, when the information type of the collected information is picture data or video data, because the data size is large, if the collected information is stored in the local server, the collected information occupies a large amount of server memory space, and the capability of the receiving server for managing and retrieving the collected information is seriously affected. Therefore, when the receiving server receives the picture data or the video data, the receiving server distributes a corresponding storage server for the receiving server so as to store the acquisition information with a large data volume through the corresponding storage server, and the information management and retrieval efficiency of the receiving server can be ensured.
It should be noted that, a mapping relationship between the area identifier and the storage server is pre-established; specifically, the receiving server for collecting information configures a corresponding storage server for each region, and further determines the association relationship between each region identifier and the storage server according to a preset region identifier generation criterion. After the receiving server generates the information identifier corresponding to the acquired information, the mapping relationship between the information identifier and the storage server can be determined according to the area identifier in the information identifier and the association relationship between the pre-established area identifier and the storage server, so that the storage server matched with the terminal equipment can be determined.
S250, the IP address of the target storage server is sent to the terminal equipment, so that the acquisition information sent by the terminal equipment is stored through the target storage server.
It can be understood that the IP addresses of all storage servers are prestored in the receiving servers for collecting information; after determining the target storage server matched with the terminal equipment, the receiving server sends the IP address of the target storage server to the terminal equipment. And after receiving the IP address, the terminal equipment resends the acquired information to the target storage server according to the IP address so as to realize the storage of the acquired information.
Note that the collected information of the terminal device is initially sent to the receiving server, and the receiving server determines whether to perform local storage or not according to the information type of the collected information, or performs storage through the storage server.
According to the technical scheme, after the server finishes receiving the acquired information and generates the information identification of the characterization area information corresponding to the acquired information according to the information type of the acquired information, if the acquired information is text data, the acquired information is stored locally according to the information identification; if the acquired information is picture data or video data, determining a matched storage server according to the information identification, and storing the acquired information through the storage server; aiming at the collected information of different information types, the method adopts corresponding different information storage modes, so that the collected information can be efficiently stored, and meanwhile, the stored information can be efficiently managed and retrieved.
Fig. 4A is a flowchart of a method for storing information according to an embodiment of the present invention, where the method is implemented based on the above embodiment, and in this embodiment, after storing collected information is completed, the matched collected information is retrieved according to a query request of a user for the collected information, where the method specifically includes:
S310, receiving a registration request of the terminal equipment through a registration server, and determining the area of the terminal equipment through the registration server according to the IP address of the registration request.
The registration server is used for distributing a corresponding receiving server for the registered terminal equipment.
Before storing the acquired information of the terminal device, the terminal device first performs device registration on a registration server of the information storage system to obtain an IP address of a corresponding receiving server; and then sending the acquisition information to the receiving server according to the IP address. Specifically, the terminal device sends a registration request to a registration server responsible for the region to which the terminal device belongs, and the registration server determines the region to which the terminal device belongs according to the IP address of the registration request after receiving the registration request.
S320, determining a matched receiving server of the terminal equipment through a registration server according to the belonging area, and feeding back the IP address of the matched receiving server to the terminal equipment so that the receiving server receives the acquisition information sent by the terminal equipment.
Further, the registration server determines a receiving server deployed in the affiliated area according to the affiliated area of the terminal equipment, and sends the IP address of the current receiving server to the terminal equipment to finish the registration of the terminal equipment. Wherein, the registration server stores the IP address of each receiving server in advance. Corresponding receiving servers are deployed in different areas and are used for receiving and storing the acquired information of the matching areas.
In an optional implementation manner of this embodiment, the determining, by the registration server, the receiving server that the terminal device matches according to the area to which the terminal device belongs may include: determining at least one alternative receiving server matched with the terminal equipment according to the belonging area through a registration server; and determining the receiving server matched with the terminal equipment from the alternative receiving servers through the registration server according to the nearby principle and/or the load balancing principle.
Specifically, when determining a receiving server matched with the terminal device, the registration server may use, as an alternative receiving server, a plurality of receiving servers having a linear distance from the belonging area smaller than or equal to a preset distance threshold according to the belonging area of the terminal device; and finally selecting a receiving server matched with the terminal equipment from a plurality of alternative receiving servers according to the nearby principle and the load balancing principle.
The nearby principle refers to that an alternative receiving server with the nearest linear distance to the area of the terminal equipment is used as a receiving server for final matching; the load balancing principle refers to that the registration server preferentially arranges the alternative receiving servers with lower service processing loads as matched receiving servers according to the service processing loads (such as memory occupancy rate) of the current alternative receiving servers.
S330, when the acquisition information sent by the terminal equipment is detected, determining an information receiving strategy matched with the acquisition information according to the information type of the acquisition information.
S340, receiving acquisition information sent by the terminal equipment according to the information receiving strategy.
S350, generating an information identifier of the characterization area information corresponding to the acquired information according to the information type of the acquired information, and storing the acquired information based on the information identifier.
S360, responding to a query request for collecting information, and acquiring a target query identifier in the query request.
The query request is a query command which is sent by a user and aims at the acquisition information stored in the receiving server and the storage server, and comprises a query identifier; and the query identifier is an information identifier of the acquired information which needs to be queried currently.
It should be noted that, in this embodiment, all the query requests of the user are first sent to the receiving server, and the receiving server searches the corresponding collected information in the local storage or each storage server according to the target query identifier in the query request.
S370, judging whether the target information identification matched with the target inquiry identification can be found in the mapping relation between the acquired information and the information identification.
If yes, executing S380; otherwise, S390 is performed. Specifically, after the receiving server obtains the target query identifier in the query request, matching and searching are firstly performed in the mapping relation between the locally stored acquired information and the information identifier, and at this time, if the stored information identifier consistent with the target query identifier is searched, the acquired information matched with the current stored information identifier can be directly read in the local storage. Note that since the receiving server stores only text data locally, the currently found collection information must also be text data.
If the stored information identification consistent with the target query identification is not found, the image data and the video data are stored in the storage server library, so that matching search is further carried out in the mapping relation between the information identification and the storage server according to the target query identification, and whether the acquired information corresponding to the current target query identification is stored in the storage server is determined.
S380, taking the target acquisition information corresponding to the target information identification as a response result of the query request.
S390, searching a target information identifier matched with the target query identifier in a mapping relation between the information identifier and a storage server according to the target query identifier, sending the query request to a target storage server corresponding to the target information identifier, and sending acquired information corresponding to the target query identifier to a sender of the query request through the target storage server.
Specifically, if the receiving server searches the target information identifier consistent with the target query identifier in the mapping relation between the information identifier and the storage server according to the target query identifier, the receiving server indicates that the acquired information corresponding to the current target query identifier is stored in the corresponding storage server; at this time, the receiving server transmits the query request of the user to the corresponding storage server; when receiving the query request, the storage server searches matched acquisition information according to a target query identifier in the query request, and transmits the searched matched acquisition information to a sender of the query request according to an IP address of the query request.
In this embodiment, optionally, when the storage server sends the acquired information corresponding to the target query identifier, in order to increase the information transmission efficiency, the link of the picture data or the video data may be sent to the query request sender, and the query request sender may view the corresponding picture or video according to the link, because the data amount of the picture data or the video data is too large.
In addition, optionally, if the receiving server does not find the target information identifier consistent with the target query identifier in the mapping relationship between the information identifier and the storage server according to the target query identifier, it indicates that the information storage system does not store the acquired information matched with the query request; at this time, a preset prompt message, for example, "no match found, please input again" may be fed back to the user.
In a specific implementation manner of the present embodiment, the method for storing information in the present embodiment may be applied to a scenario as shown in fig. 4B. The terminal equipment sends a registration request to a registration server for equipment registration, and the registration server returns an IP address matched with the receiving server according to the IP address information of the registration request in terms of the near principle and the load balancing strategy. And the terminal equipment sends acquisition information to the receiving server according to the returned IP address of the receiving server. The receiving server classifies and stores the acquired information according to the information type of the acquired information, and then performs data cleaning and management. The text data is stored locally, and the picture or video data is stored through a storage server. When the information inquiry terminal performs information inquiry, the inquiry request is uniformly forwarded by the information inquiry routing service; and the receiving server classifies and inquires the query according to the query ID according to the region, gathers the query results and returns the query results to the information query terminal, and finally completes the query service of the information.
In another specific implementation manner of the present embodiment, the method for storing information in the present embodiment may be applied to a scenario as shown in fig. 4C. The collected information of the terminal device is stored in a distributed manner, that is, a plurality of receiving servers are used for receiving and storing the collected information of the terminal device at the same time, and two receiving servers and two storage servers are taken as an example in fig. 4C.
Specifically, the terminal device sends a registration request to the registration server to register the device, and the registration server distributes two matched receiving servers, namely a receiving server 1 and a receiving server 2, for the terminal device according to the IP address information of the registration request and by using a proximity principle and a load balancing strategy, and sends the IP addresses of the two receiving servers to the terminal device. After receiving the feedback information of the registration server, the terminal equipment segments the acquired information and sends the segmented acquired information to two receiving servers sequentially or simultaneously according to the fed-back IP address. Each receiving server receives the acquired information sent by the terminal equipment, and when the acquired information is determined to be picture or video information, the matched storage server 1 and the storage server 2 are respectively determined, and then the IP addresses of the matched storage servers are respectively sent to the terminal equipment. After receiving the IP addresses of the storage servers fed back by the receiving servers respectively, the terminal equipment sends the acquired information to the matched storage server 1 and the storage server 2 for storage according to the IP addresses.
Correspondingly, when searching the current acquired information, the query request of the information query terminal is respectively forwarded to the corresponding receiving server 1 and the receiving server 2 by the information query routing service, each receiving server firstly performs local search according to the query identifier, and when determining that the corresponding acquired information is not stored locally, searches the corresponding storage server according to the query identifier and forwards the query request to the corresponding storage server so as to feed the acquired information corresponding to the query identifier back to the information query terminal through the storage server.
According to the technical scheme, the IP address of the receiving server corresponding to the terminal equipment is sent to the terminal equipment through the registration server, the acquired information of the terminal equipment is received through the corresponding receiving server, the acquired information is stored based on the information identification of the characteristic area information corresponding to the acquired information, an effective index of the acquired information is established, the regional storage of the acquired information is realized, and the storage and management efficiency of the acquired information are improved; furthermore, when a query request for the collected information is received, the collected information corresponding to the query identifier in the query request is searched in the local and each storage server, so that the collected information is efficiently searched, and the information searching difficulty is reduced.
Fig. 5 is a block diagram of a structure of an information storage device according to an embodiment of the present invention, where the device specifically includes: an information reception policy determination module 410, an acquisition information reception module 420, and an acquisition information storage module 430;
an information receiving policy determining module 410, configured to determine, when detecting the collected information sent by the terminal device, an information receiving policy that the collected information matches according to an information type of the collected information;
the acquisition information receiving module 420 is configured to receive acquisition information sent by the terminal device according to the information receiving policy;
The collected information storage module 430 is configured to generate an information identifier of the characterization area information corresponding to the collected information according to an information type of the collected information, and store the collected information based on the information identifier.
According to the technical scheme, when the acquisition information sent by the terminal equipment is detected, an information receiving strategy matched with the acquisition information is determined according to the information type of the acquisition information, and the acquisition information sent by the terminal equipment is received according to the information receiving strategy; and then according to the information type of the collected information, the information identification of the characterization area information corresponding to the collected information is generated, the collected information is stored based on the information identification, the information is received by adopting corresponding different receiving strategies for different types of the collected information, the receiving efficiency of the collected information can be improved, meanwhile, the information identification of the characterization area information is generated, the collected information is stored based on the information identification, the area division storage of the collected information is realized, the information management difficulty is reduced, meanwhile, the effective index of the collected information is established, and the information retrieval difficulty is reduced.
Optionally, based on the above technical solution, the collected information storage module 430 includes:
The mapping relation forming unit is used for generating an information identifier of the characterization area information corresponding to the acquired information through a snowflake algorithm when the acquired information is text data, storing the acquired information and the information identifier in a local corresponding mode, and forming a mapping relation between the acquired information and the information identifier;
And the target storage server determining unit is used for generating an information identifier of the characterization area information corresponding to the acquired information through a snowflake algorithm when the acquired information is picture data or video data, determining a target storage server matched with the terminal equipment based on the mapping relation between the information identifier and the storage server, and transmitting an IP address of the target storage server to the terminal equipment so as to store the acquired information transmitted by the terminal equipment through the target storage server.
Optionally, based on the above technical solution, the collected information storage module 430 includes:
the area identification determining unit is used for determining an area identification in ten-bit working machine identifications based on a snowflake algorithm;
the affiliated area determining unit is used for determining the affiliated area of the terminal equipment according to the Internet Protocol (IP) address of the acquired information;
A target area identification determining unit, configured to determine a target area identification matched with the terminal device according to the belonging area;
and the information identifier acquisition unit is used for filling the region identifier by adopting the target region identifier to obtain the information identifier corresponding to the acquired information.
Optionally, based on the above technical solution, the information receiving policy determining module 410 is specifically configured to determine that, when the collected information is text data, an information receiving policy matched with the collected information is a short link protocol and an information compensation mechanism;
When the acquired information is picture data or video data, determining that the information receiving strategy matched with the acquired information is a long link protocol and a discontinuous network transmission mechanism.
Optionally, on the basis of the above technical solution, the information storage device further includes:
the target query identifier acquisition module is used for responding to a query request for acquiring information and acquiring a target query identifier in the query request;
The target information identification query module is used for taking target acquisition information corresponding to the target information identification as a response result of the query request if the target information identification matched with the target query identification is found in the mapping relation between the acquisition information and the information identification;
Otherwise, searching a target information identifier matched with the target query identifier in a mapping relation between the information identifier and a storage server according to the target query identifier, sending the query request to a target storage server corresponding to the target information identifier, and sending acquired information corresponding to the target query identifier to a sender of the query request through the target storage server.
Optionally, on the basis of the above technical solution, the information storage device further includes:
the terminal equipment comprises a registration server, a belonging area determining module and a terminal equipment management module, wherein the registration server is used for receiving a registration request of the terminal equipment and determining the belonging area of the terminal equipment according to an IP address of the registration request;
And the receiving server determining module is used for determining a receiving server matched with the terminal equipment through the registration server according to the belonging area, and feeding back the IP address of the matched receiving server to the terminal equipment so that the receiving server receives the acquisition information sent by the terminal equipment.
Optionally, on the basis of the above technical solution, the receiving server determining module includes:
An alternative receiving server determining unit, configured to determine, by a registration server, at least one alternative receiving server that the terminal device matches according to the belonging area;
And the receiving server determining unit is used for determining the receiving server matched with the terminal equipment from the alternative receiving servers through the registration server according to the nearby principle and/or the load balancing principle.
The information storage device provided by the embodiment of the invention can execute the information storage method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 6, the electronic device includes a processor 50, a memory 51, an input device 52 and an output device 53; providing that the number of processors 50 in the electronic device may be one or more, one processor 50 is taken as an example in fig. 6; the processor 50, the memory 51, the input means 52 and the output means 53 in the electronic device may be connected by a bus or other means, in fig. 6 by way of example.
The memory 51 is a computer readable storage medium, and may be used to store a software program, a computer executable program, and modules, such as program instructions/modules corresponding to the method of storing information in the embodiment of the present invention (for example, the information receiving policy determining module 410, the collected information receiving module 420, and the collected information storing module 430 in the information storage device). The processor 50 executes various functional applications of the electronic device and data processing by running software programs, instructions and modules stored in the memory 51, i.e. implements the above-described information storage method, namely:
When the acquisition information sent by the terminal equipment is detected, determining an information receiving strategy matched with the acquisition information according to the information type of the acquisition information;
receiving acquisition information sent by the terminal equipment according to the information receiving strategy;
And generating an information identifier of the characterization area information corresponding to the acquired information according to the information type of the acquired information, and storing the acquired information based on the information identifier.
The memory 51 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, at least one application program required for functions; the storage data area may store data created according to the use of the terminal, etc. In addition, memory 51 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some examples, memory 51 may further include memory located remotely from processor 50, which may be connected to the electronic device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input means 52 may be used to receive entered numeric or character information and to generate key signal inputs related to user settings of the device/terminal/server and function control. The output means 53 may comprise a display device such as a display screen.
Embodiments of the present invention also provide a storage medium containing computer-executable instructions for performing a method of storing information when executed by a computer processor, the method comprising:
When the acquisition information sent by the terminal equipment is detected, determining an information receiving strategy matched with the acquisition information according to the information type of the acquisition information;
receiving acquisition information sent by the terminal equipment according to the information receiving strategy;
And generating an information identifier of the characterization area information corresponding to the acquired information according to the information type of the acquired information, and storing the acquired information based on the information identifier.
Of course, the storage medium containing computer executable instructions provided in the embodiments of the present invention is not limited to the method operations described above, and may also perform related operations in the method for storing information provided in any embodiment of the present invention.
From the above description of embodiments, it will be clear to a person skilled in the art that the present invention may be implemented by means of software and necessary general purpose hardware, but of course also by means of hardware, although in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a FLASH Memory (FLASH), a hard disk, or an optical disk of a computer, etc., and include several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments of the present invention.
It should be noted that, in the embodiment of the above information storage device, each unit and module included are only divided according to the functional logic, but not limited to the above division, so long as the corresponding functions can be implemented; in addition, the specific names of the functional units are also only for distinguishing from each other, and are not used to limit the protection scope of the present invention.
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.

Claims (8)

1. A method of storing information, comprising:
When the acquisition information sent by the terminal equipment is detected, determining an information receiving strategy matched with the acquisition information according to the information type of the acquisition information;
receiving acquisition information sent by the terminal equipment according to the information receiving strategy;
Generating an information identifier of the characterization area information corresponding to the acquired information according to the information type of the acquired information, and storing the acquired information based on the information identifier;
Before determining the information receiving strategy matched with the acquired information according to the information type of the acquired information when the acquired information sent by the terminal equipment is detected, the method further comprises the following steps:
Receiving a registration request of the terminal equipment through a registration server, and determining the area of the terminal equipment through the registration server according to the IP address of the registration request;
Determining a matched receiving server of the terminal equipment according to the belonging area through a registration server, and feeding back the IP address of the matched receiving server to the terminal equipment so that the receiving server receives the acquisition information sent by the terminal equipment; the registration server is used for distributing the corresponding receiving server for the registered terminal equipment; the receiving server receives the acquired information of the terminal equipment based on the information receiving and transmitting element of the Netty architecture;
The method for generating the information identification of the characterization area information corresponding to the collected information according to the information type of the collected information, storing the collected information based on the information identification comprises the following steps:
When the acquired information is text data, a receiving server receives the text data, generates an information identifier of the characterization area information corresponding to the acquired information through a snowflake algorithm, locally stores the acquired information and the information identifier in a corresponding manner, and forms a mapping relation between the acquired information and the information identifier;
When the acquired information is picture data or video data, generating an information identifier of the characterization area information corresponding to the acquired information through a snowflake algorithm, determining a target storage server matched with the terminal equipment based on a mapping relation between the information identifier and the storage server, and transmitting an IP address of the target storage server to the terminal equipment so as to store the acquired information transmitted by the terminal equipment through the target storage server; the mapping relation between the information mark and the storage server is determined according to the area mark in the information mark and the association relation between the pre-established area mark and the storage server; the association relation between the area identifier and the storage server is determined according to a preset area identifier generation criterion;
The sending the IP address of the target storage server to the terminal device, so as to store, by using the target storage server, the acquisition information sent by the terminal device, includes:
the receiving server sends the IP address of the target storage server to the terminal equipment; wherein, the receiving server stores the IP address of each storage server in advance;
And after receiving the IP address of the target storage server, the terminal equipment resends the acquisition information to the target storage server according to the IP address of the target storage server so as to store the acquisition information through the target storage server.
2. The method of claim 1, wherein the generating, by a snowflake algorithm, an information identification of the characterizing region information corresponding to the acquired information, comprises:
determining an area identifier in ten-bit working machine identifiers based on a snowflake algorithm;
determining the area of the terminal equipment according to the Internet Protocol (IP) address of the acquired information;
determining a target area identifier matched with the terminal equipment according to the belonging area;
and filling the region identifier by adopting the target region identifier to obtain the information identifier corresponding to the acquired information.
3. The method of claim 1, wherein said determining an information receiving policy for matching said collected information based on an information type of said collected information comprises:
When the acquired information is text data, determining that an information receiving strategy matched with the acquired information is a short link protocol and an information compensation mechanism;
When the acquired information is picture data or video data, determining that the information receiving strategy matched with the acquired information is a long link protocol and a discontinuous network transmission mechanism.
4. The method of claim 1, further comprising, after storing the collected information based on the information identification:
responding to a query request for collecting information, and acquiring a target query identifier in the query request;
if the target information identification matched with the target query identification is found in the mapping relation between the acquired information and the information identification, taking the target acquired information corresponding to the target information identification as a response result of the query request;
Otherwise, searching a target information identifier matched with the target query identifier in a mapping relation between the information identifier and a storage server according to the target query identifier, sending the query request to a target storage server corresponding to the target information identifier, and sending acquired information corresponding to the target query identifier to a sender of the query request through the target storage server.
5. The method according to claim 1, wherein the determining, by the registration server, the receiving server to which the terminal device matches according to the belonging area, includes:
Determining at least one alternative receiving server matched with the terminal equipment according to the belonging area through a registration server;
And determining the receiving server matched with the terminal equipment from the alternative receiving servers through the registration server according to the nearby principle and/or the load balancing principle.
6. An information storage device, comprising:
The information receiving strategy determining module is used for determining an information receiving strategy matched with the acquired information according to the information type of the acquired information when the acquired information sent by the terminal equipment is detected;
the acquisition information receiving module is used for receiving the acquisition information sent by the terminal equipment according to the information receiving strategy;
The system comprises an acquisition information storage module, a storage module and a storage module, wherein the acquisition information storage module is used for generating an information identifier of characterization area information corresponding to acquisition information according to the information type of the acquisition information, and storing the acquisition information based on the information identifier;
Before determining the information receiving strategy matched with the acquired information according to the information type of the acquired information when the acquired information sent by the terminal equipment is detected, the method further comprises the following steps:
Receiving a registration request of the terminal equipment through a registration server, and determining the area of the terminal equipment through the registration server according to the IP address of the registration request;
Determining a matched receiving server of the terminal equipment according to the belonging area through a registration server, and feeding back the IP address of the matched receiving server to the terminal equipment so that the receiving server receives the acquisition information sent by the terminal equipment; the registration server is used for distributing the corresponding receiving server for the registered terminal equipment; the receiving server receives the acquired information of the terminal equipment based on the information receiving and transmitting element of the Netty architecture;
wherein, the information collection storage module includes:
The mapping relation forming unit is used for receiving the text data by the receiving server when the acquired information is the text data, generating an information identifier of the characterization area information corresponding to the acquired information by a snowflake algorithm, storing the acquired information and the information identifier in a local corresponding mode, and forming a mapping relation between the acquired information and the information identifier;
The target storage server determining unit is used for generating an information identifier of the characterization area information corresponding to the acquired information through a snowflake algorithm when the acquired information is picture data or video data, determining a target storage server matched with the terminal equipment based on a mapping relation between the information identifier and the storage server, and transmitting an IP address of the target storage server to the terminal equipment so as to store the acquired information transmitted by the terminal equipment through the target storage server; the mapping relation between the information mark and the storage server is determined according to the area mark in the information mark and the association relation between the pre-established area mark and the storage server; the association relation between the area identifier and the storage server is determined according to a preset area identifier generation criterion;
The sending the IP address of the target storage server to the terminal device, so as to store, by using the target storage server, the acquisition information sent by the terminal device, includes:
the receiving server sends the IP address of the target storage server to the terminal equipment; wherein, the receiving server stores the IP address of each storage server in advance;
And after receiving the IP address of the target storage server, the terminal equipment resends the acquisition information to the target storage server according to the IP address of the target storage server so as to store the acquisition information through the target storage server.
7. An electronic device, comprising:
One or more processors;
storage means for storing one or more programs,
When executed by the one or more processors, causes the one or more processors to implement the method of storing information as recited in any one of claims 1-5.
8. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements a method of storing information according to any one of claims 1-5.
CN202111037530.XA 2021-09-06 2021-09-06 Information storage method, device, equipment and storage medium Active CN113791733B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111037530.XA CN113791733B (en) 2021-09-06 2021-09-06 Information storage method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111037530.XA CN113791733B (en) 2021-09-06 2021-09-06 Information storage method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113791733A CN113791733A (en) 2021-12-14
CN113791733B true CN113791733B (en) 2024-07-19

Family

ID=79182708

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111037530.XA Active CN113791733B (en) 2021-09-06 2021-09-06 Information storage method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113791733B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114185493B (en) * 2022-02-15 2022-05-06 烟台市地理信息中心 Method for dividing and storing surveying and mapping data
CN115114660A (en) * 2022-06-29 2022-09-27 中国银行股份有限公司 A data storage method and related equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106255172A (en) * 2016-07-22 2016-12-21 乐视控股(北京)有限公司 Communication means based on multipath and device
CN110196842A (en) * 2019-04-26 2019-09-03 视联动力信息技术股份有限公司 File memory method, management method, device, server and storage medium
CN111399756A (en) * 2019-09-29 2020-07-10 杭州海康威视系统技术有限公司 Data storage method, data downloading method and device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080294694A1 (en) * 2007-05-24 2008-11-27 Videoclix Technologies Inc. Method, apparatus, system, medium, and signals for producing interactive video content
CN106131102A (en) * 2016-06-01 2016-11-16 乐视控股(北京)有限公司 A kind of method and device of distribution server
JP6958100B2 (en) * 2017-04-27 2021-11-02 株式会社リコー Information processing equipment, information processing systems, information processing methods, and programs
CN112347503A (en) * 2020-10-14 2021-02-09 重庆传音通讯技术有限公司 Management method, management device and computer storage medium
CN112559908B (en) * 2020-12-16 2024-04-26 北京百度网讯科技有限公司 Data identifier generation method, device, equipment, medium and program product

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106255172A (en) * 2016-07-22 2016-12-21 乐视控股(北京)有限公司 Communication means based on multipath and device
CN110196842A (en) * 2019-04-26 2019-09-03 视联动力信息技术股份有限公司 File memory method, management method, device, server and storage medium
CN111399756A (en) * 2019-09-29 2020-07-10 杭州海康威视系统技术有限公司 Data storage method, data downloading method and device

Also Published As

Publication number Publication date
CN113791733A (en) 2021-12-14

Similar Documents

Publication Publication Date Title
US8819080B2 (en) System and method for collection, retrieval, and distribution of data
CN113596863B (en) Method, equipment and medium for determining user plane function and providing information
EP2530899A1 (en) Method and node for obtaining the content and content network
US20090190587A1 (en) Method for deploying multicast network, multicast network and control server
CN105357246B (en) Caching method based on information centre's network and system
CN113791733B (en) Information storage method, device, equipment and storage medium
CN111343237A (en) Server cluster communication method, communication device and computer storage medium
CN110336848B (en) Scheduling method, scheduling system and scheduling equipment for access request
CN110659560A (en) Method and system for identifying associated object
EP3618404B1 (en) Data caching control method and device
CN111757353A (en) Network data processing method and device in 5G core network
CN113542420B (en) Processing method and device of hot spot file, electronic equipment and medium
US11212329B2 (en) Method, apparatus, device and storage medium for pushing video stream
US10025859B2 (en) Method and system for second-degree friend query
CN111600929B (en) Transmission line detection method, routing strategy generation method and proxy server
CN103685344A (en) Synergetic method and system for multiple P2P (point-to-point) cache peers
CN101938383A (en) On-line monitoring method and system of user account with multiple services as well as monitoring service system
CN110166487B (en) Local area network equipment information transmission method, main equipment, storage medium and intelligent equipment
CN106815334A (en) A kind of data query method and device for terminal
CN114978992B (en) Communication method, node and network of safety naming data network
CN112104888B (en) Method and system for grouping live broadcast users
CN101425980A (en) Method and apparatus for assisted managing arbitrary broadcast group in communication network device
CN101741889A (en) Method, system and service for centralized management of network services
CN102891763A (en) Method and device for acquiring CIM (Common Information Model) resource
JP2009194666A (en) Multicast address information processing apparatus and multicast address information processing program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant