CN114817409A - Label generation method, device, equipment and medium - Google Patents

Label generation method, device, equipment and medium Download PDF

Info

Publication number
CN114817409A
CN114817409A CN202210529372.8A CN202210529372A CN114817409A CN 114817409 A CN114817409 A CN 114817409A CN 202210529372 A CN202210529372 A CN 202210529372A CN 114817409 A CN114817409 A CN 114817409A
Authority
CN
China
Prior art keywords
real
time
main body
data
request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210529372.8A
Other languages
Chinese (zh)
Inventor
王志清
罗旋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Volcano Engine Technology Co Ltd
Original Assignee
Beijing Volcano Engine Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Volcano Engine Technology Co Ltd filed Critical Beijing Volcano Engine Technology Co Ltd
Priority to CN202210529372.8A priority Critical patent/CN114817409A/en
Publication of CN114817409A publication Critical patent/CN114817409A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • G06F16/278Data partitioning, e.g. horizontal or vertical partitioning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/219Managing data history or versioning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2379Updates performed during online database operations; commit processing
    • G06F16/2386Bulk updating operations

Abstract

The application discloses a tag generation method, a tag generation device, a tag generation equipment and a tag generation medium. The real-time data of the first subject is obtained from the real-time storage partition according to the first request, and the first historical data of the first subject is obtained from the historical storage partition. And determining a real-time label corresponding to the first main body according to the real-time data and the first historical data. The real-time storage partition and the historical storage partition are located in the same storage engine, so that the efficiency of reading the real-time data and the first historical data is improved, and the calculation speed of the real-time tag is increased. And when the real-time label is calculated, the calculation is carried out according to the real-time data and some historical data, and the calculation is not carried out according to the real-time data any more, so that the real-time label can reflect the characteristics of the first main body more, and the accuracy of the real-time label is improved.

Description

Label generation method, device, equipment and medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a medium for generating a tag.
Background
Generally, the T-1 day subject label is used in the user operation, and the T-1 day subject label cannot completely reflect the current characteristics of the subject. How to obtain the label of the main body accurately in real time when the data of the main body changes so as to deal with the change of the main body in a targeted manner is a technical problem which needs to be solved urgently.
Disclosure of Invention
In view of this, embodiments of the present application provide a method, an apparatus, a device, and a medium for generating a tag, so that when data of a main body changes, a more accurate real-time tag can be obtained.
In order to achieve the above purpose, the technical solutions provided in the embodiments of the present application are as follows:
in a first aspect of the present application, a tag generation method is provided, which includes:
responding to real-time data obtained from a first main body, and generating a first request, wherein the first request is used for requesting a real-time tag of the first main body;
acquiring real-time data of the first main body from a real-time storage partition and acquiring first historical data of the first main body from a historical storage partition according to the first request, wherein the real-time storage partition and the historical storage partition are located in the same storage engine;
and determining a real-time label corresponding to the first main body according to the real-time data and the first historical data.
In a second aspect of the present application, there is provided a label generation apparatus, the apparatus comprising:
the generating unit is used for responding to the real-time data of the first main body, and generating a first request, wherein the first request is used for requesting a real-time label of the first main body;
the acquiring unit is used for acquiring real-time data of the first main body from a real-time storage partition and acquiring first historical data of the first main body from a historical storage partition according to the first request, wherein the real-time storage partition and the historical storage partition are positioned in the same storage engine;
and the determining unit is used for determining the real-time label corresponding to the first main body according to the real-time data and the first historical data.
In a third aspect of the present application, there is provided an electronic device comprising: a processor and a memory; the memory for storing instructions or computer programs; the processor is configured to execute the instructions or the computer program in the memory to cause the electronic device to perform the method of the first aspect.
In a fourth aspect of the present application, there is provided a computer readable storage medium having stored therein instructions that, when run on a device, cause the device to perform the method of the first aspect.
In a fifth aspect of the application, a computer program product is provided, the computer program product comprising computer programs/instructions which, when executed by a processor, implement the method of the first aspect.
Therefore, the embodiment of the application has the following beneficial effects:
in the application, when real-time data of a certain subject is received, a first request is generated, and the first request is used for requesting generation of a real-time tag of the first subject. The real-time data of the first subject is obtained from the real-time storage partition according to the first request, and the first historical data of the first subject is obtained from the historical storage partition. And determining a real-time label corresponding to the first main body according to the real-time data and the first historical data. The real-time storage partition and the historical storage partition are located in the same storage engine, so that the efficiency of reading the real-time data and the first historical data is improved, and the calculation speed of the real-time tag is increased. And when the real-time label is calculated, the calculation is carried out according to the real-time data and some historical data, and the calculation is not carried out according to the real-time data any more, so that the real-time label can reflect the characteristics of the first main body more, and the accuracy of the real-time label is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a tag generation method provided in an embodiment of the present application;
fig. 2 is a schematic view of an application scenario provided in an embodiment of the present application;
fig. 3 is a schematic view of another application scenario provided in the embodiment of the present application;
fig. 4 is a schematic structural diagram of a label generation apparatus according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The method comprises the steps of storing real-time data and historical data of a main body in different partitions of the same column-type storage area, and determining by utilizing the real-time data and part of the historical data corresponding to the main body when calculating the real-time label of the main body, so that the accuracy of the real-time label is improved. Since the real-time data and the historical data are stored in the same column-type storage area, the reading efficiency is improved when the data are read, and the calculation speed of the real-time tag is further improved.
The specific representation form of the subject may be determined according to the needs of the actual application scene, for example, the subject may be a person, an object, or the like. When the subject is a person, the corresponding data is obtained under the condition of user authorization.
It is understood that before the technical solutions disclosed in the embodiments of the present application are used, the type, the use range, the use scene, etc. of the personal information related to the present application should be informed to the user and authorized by the user in a proper manner according to the relevant laws and regulations.
For example, in response to receiving an active request from a user, a prompt message is sent to the user to explicitly prompt the user that the requested operation to be performed would require the acquisition and use of personal information to the user. Thus, the user can autonomously select whether to provide personal information to software or hardware such as an electronic device, an application program, a server, or a storage medium that performs the operations of the technical solution of the present disclosure, according to the prompt information.
As an optional but non-limiting implementation manner, in response to receiving an active request from the user, the manner of sending the prompt information to the user may be, for example, a pop-up window, and the prompt information may be presented in a text manner in the pop-up window. In addition, a selection control for providing personal information to the electronic device by the user's selection of "agreeing" or "disagreeing" can be carried in the pop-up window.
It is understood that the above notification and user authorization process is only illustrative and not limiting, and other ways of satisfying relevant laws and regulations may be applied to the implementation of the present disclosure.
In order to facilitate understanding of the technical solutions provided by the embodiments of the present application, the following description will be made with reference to the accompanying drawings.
Referring to fig. 1, this figure is a diagram of a tag generation method provided in an embodiment of the present application, where the method may be executed by a tag generation device, and the tag generation device may be a server, an electronic device, or another device, which is not limited herein. The server may be a cloud server or a server cluster or other devices with storage and computing functions. The electronic device may include a mobile phone, a tablet computer, a desktop computer, a notebook computer, a vehicle-mounted terminal, a wearable electronic device, an all-in-one machine, an intelligent home device, and other devices having a communication function, and may also be a virtual machine or a simulator-simulated device. As shown in fig. 1, the method may include the steps of:
s101: and generating a first request in response to acquiring the real-time data of the first main body, wherein the first request is used for requesting to generate a real-time tag of the first main body.
In this embodiment, when the tag generation device acquires a piece of real-time data of the first main body, a first request is generated, so that the generation of the real-time tag of the first main body is triggered by the first request. That is, the tag generation device may detect real-time data of each subject in real time, and when the real-time data of a certain subject is acquired, trigger generation of a real-time tag of the subject.
Optionally, in response to acquiring the real-time data of the first subject, acquiring a subject identifier of the first subject; adding the identification of the first main body to a main body identification queue; a first request is generated according to the subject identification queue. Wherein the body representation queue is used to trigger the computation of the real-time tag. That is, when the tag generation device acquires real-time data of the first subject, a subject identifier of the first subject is determined by some information in the real-time data, and the subject identifier is used for uniquely indicating the first subject. After the body identification of the first body is obtained, the body identification is added to a body identification queue. When monitoring that the main body identification queue has the newly added main body identification, the label generation equipment indicates that newly added real-time data exists, and generates a first request according to the main body identification queue. The first request may include a subject identifier of the first subject. That is, the embodiment triggers the calculation of the real-time tag by collecting the subject identifier.
Alternatively, based on the consideration that if the calculation of the real-time tag is triggered every next piece of real-time data, the embodiment triggers the calculation of the real-time tag after accumulating a small amount of real-time data, so as to increase the query rate per second (QPS). Specifically, a first request is generated in response to the real-time data of the first main body being acquired and the request time reaching a preset time. The first request comprises a main body identifier corresponding to any real-time data acquired before the preset time. Or, in response to that the number of the first bodies acquiring the real-time data reaches a preset number and the request time does not reach the preset time, generating a first request. The first request comprises the subject identifications of a preset number of subjects. The preset time and the preset number can be set according to the actual application situation, and this embodiment is not described herein again.
That is, the subject identifiers accumulated in the preset time are requested in batch or the subject identifiers accumulated in the preset time to the preset number are requested in batch. For example, considering that the timeliness of the real-time tag is higher, the preset time of the device may be 200 milliseconds, the preset number may be 100, and if 100 body identifiers are accumulated within 200 milliseconds, the request is performed in batch; if 200 milliseconds do not accumulate 100 subject identifications, batch requests are also sent after time, and the pressure of accessing the storage space is reduced to the minimum under the condition of ensuring timeliness.
S102: the real-time data of the first subject is obtained from the real-time storage partition according to the first request, and the first historical data of the first subject is obtained from the historical storage partition.
In this embodiment, the storage engine for storing the data of the body is divided into the real-time storage partition and the history storage partition, so that the real-time data and the history data of the body are stored by using the real-time storage partition. The tag generation device acquires implementation data of the first subject from the real-time storage partition and acquires first history data of the first subject from the history storage partition according to the first request. The time for storing the real-time data stored in the real-time storage partition is set according to actual conditions, for example, the real-time storage partition is used for storing data generated on the day.
Optionally, the storage engine is a columnar storage engine, and the data stored by the columnar storage engine can improve the subsequent query speed and improve the calculation efficiency of the real-time tag. For example, if the columnar storage engine is clickhouse, a clickhouse table is divided into a real-time storage partition and a history storage partition.
Optionally, in a big data scenario, the obtained data is usually stored in a distributed storage manner, and in order to ensure that data of the same main body at different times are stored in the same storage node, the embodiment stores the data of each main body in a bucket-dividing manner, specifically, a main body identifier corresponding to the implementation data is determined in response to obtaining real-time data of a certain main body; determining a target real-time storage partition corresponding to the main body according to the main body identification; the real-time data is stored in the target real-time storage partition. Specifically, in response to the fact that the main body identifier corresponding to the real-time data is the main body identifier of the first main body, the real-time data is stored in the first real-time storage partition; and responding to the main body identification corresponding to the real-time data as the main body identification of the second main body, and storing the real-time data to the second real-time storage partition.
Similarly, for historical data, determining a main body identifier corresponding to the historical data; determining a target historical storage partition according to the subject identifier; and storing the historical data to the target historical storage partition.
For example, as shown in the bucket partitioning diagram of fig. 2, for offline service data, calculation is performed in a manner of T +1, after history data is acquired, a main identifier (one id) corresponding to the history data is calculated, and a storage area corresponding to the main identifier is determined through hash calculation. When hash (one id)% 2 ═ 0, the history data is stored in clickwouse local 0; when hash (one id)% 2 ═ 1, the history data is stored in clickwouse local 1; when hash (one id)% 2 ═ 2, the history data is stored in clickwouse local 2, and so on. For real-time data, a main body identifier (one id) corresponding to the real-time data is also calculated, and a storage area corresponding to the real-time data is determined through hash calculation. As can be seen from FIG. 2, the historical data and the real-time data corresponding to the same subject identifier will be stored in the same clickhouse local table. And for the real-time data, determining the corresponding id stream according to the body identifier, so as to add the body identifier to the corresponding id stream, and further triggering the calculation of the real-time tag.
It should be noted that, in order to increase the calculation speed of the real-time tag, batch requests may be made on the premise of bucket allocation. The main body identifications are gathered, and the clickhouse is requested to be inquired at regular time and quantity, so that the real-time labels of a batch of main bodies are acquired at one time.
Optionally, when the real-time data of the first main body is acquired from the real-time storage partition according to the first request, determining a first real-time storage partition corresponding to the first main body according to the main body identifier in the first request; implementation data of a first subject is obtained from a first real-time storage partition. The first real-time storage partition is used for storing real-time data of the first main body. That is, real-time data of a certain subject is stored in its corresponding real-time storage partition.
Optionally, when the historical data of the first subject is acquired from the historical storage partition according to the first request, determining a first historical storage partition corresponding to the first subject according to the subject identifier in the first request; first history data of a first subject is obtained from a first history storage partition. The first history storage partition is used for storing first history data of the first main body. That is, history data of a certain subject is stored in its corresponding history storage partition.
The obtained first history data is determined according to a real-time tag calculation rule, for example, if the real-time tag calculation rule is to obtain history data of the previous 6 days, the first history data is history data of the previous 6 days of the first main body in the first history storage partition. For another example, if the real-time tag calculation rule is to acquire historical data of the previous 10 days, the first historical data is the historical data of the previous 10 days of the first subject in the first history storage partition.
S103: and determining a real-time label corresponding to the first main body according to the real-time data and the first historical data.
After the real-time data and the first historical data corresponding to the first main body are obtained, the real-time label corresponding to the first main body is determined according to the real-time data and the first historical data.
Optionally, after the real-time tag corresponding to the first book body is determined, the real-time tag is stored in the real-time tag set.
Optionally, the embodiment further supports calculation of an offline tag, specifically, in response to a trigger operation of a user, a second request is generated, where the second request is used to request the offline tag of the first main body; acquiring second history data of the first main body from the history storage partition according to the second request; and determining the offline label corresponding to the first main body according to the second historical data. The second history data is determined according to the offline tag calculation rule, and the second history data may be the same as or different from the first history data. For example, if the offline tag calculation rule is to determine the offline tag according to the historical data of the previous 1 month, the second historical data is the data generated by the first subject in the previous 1 month. After the offline tag is obtained, the offline tag may be stored in an offline tag set.
In addition, in order to avoid the stored real-time tags from overlapping with the offline tags and wasting storage space, when the real-time tags are stored, the real-time tags of the first main body are compared with the offline tags of the first main body, and in response to the difference between the real-time tags and the offline tags, the real-time tags of the first main body are stored in the real-time tag set.
In practical application, when a user needs to acquire a real-time tag of a first main body, reading the real-time tag of the first main body from a real-time tag set; when a user needs to acquire the offline tag of the first main body, the offline tag of the first main body is read from the offline tag set.
It can be seen that when real-time data of a certain subject is received, a first request is generated, and the first request is used for requesting generation of a real-time tag of the first subject. The real-time data of the first subject is obtained from the real-time storage partition according to the first request, and the first historical data of the first subject is obtained from the historical storage partition. And determining a real-time label corresponding to the first main body according to the real-time data and the first historical data. The real-time storage partition and the historical storage partition are located in the same storage engine, so that the efficiency of reading the real-time data and the first historical data is improved, and the calculation speed of the real-time tag is increased. And when the real-time label is calculated, the calculation is carried out according to the real-time data and some historical data, and the calculation is not carried out according to the real-time data any more, so that the real-time label can reflect the characteristics of the first main body more, and the accuracy of the real-time label is improved.
For the convenience of understanding of the present application, refer to an application scenario diagram shown in fig. 3, in which real-time data of 3 subjects coexist, and the path of the real-time data of each subject is kafka-etl-kafka-data storage-real-time tag calculation. I.e. the body identity of the real-time data of each body is added to the id stream, triggering the tag computation. Due to the fact that the columnar storage engine is adopted for data storage, storage of real-time data of a plurality of subjects can be supported.
Based on the above method example, the embodiment of the present application provides a label generating apparatus, which will be described below with reference to the accompanying drawings.
Referring to fig. 4, which is a block diagram of a tag generation apparatus provided in an embodiment of the present application, as shown in fig. 4, the apparatus 400 may include: a generation unit 401, an acquisition unit 402, and a determination unit 403.
A generating unit 401, configured to generate a first request in response to acquiring real-time data of a first main body, where the first request is used to request a real-time tag of the first main body;
an obtaining unit 402, configured to obtain, according to the first request, real-time data of the first subject from a real-time storage partition and first history data of the first subject from a history storage partition, where the real-time storage partition and the history storage partition are located in a same storage engine;
a determining unit 403, configured to determine a real-time tag corresponding to the first subject according to the real-time data and the first historical data.
In an optional implementation manner, the generating unit 401 is specifically configured to obtain a subject identifier of a first subject in response to obtaining real-time data of the first subject; adding the body identification of the first body to a body identification queue; and generating a first request according to the main body identification queue, wherein the main body identification queue is used for triggering the calculation of the real-time label.
In an optional implementation manner, the obtaining unit 402 is specifically configured to determine, according to a body identifier in the first request, a first real-time storage partition corresponding to the first body, where the first real-time storage partition is used to store real-time data of the first body; and acquiring real-time data of the first main body from the first real-time storage partition.
In an optional implementation, the apparatus further includes: a storage unit;
the determining unit 403 is further configured to determine, in response to acquiring real-time data, a subject identifier corresponding to the real-time data;
and the storage unit is used for responding to the main body identifier corresponding to the real-time data as the main body identifier of the first main body, and storing the real-time data to the first real-time storage partition.
In an optional implementation manner, the generating unit 401 is specifically configured to generate the first request in response to that the real-time data of the first main body is acquired and the request time reaches a preset time; or, in response to the fact that the number of the first bodies acquiring the real-time data reaches a preset number and the request time does not reach the preset time, generating a first request.
In an optional implementation manner, the obtaining unit 402 is specifically configured to determine, according to a subject identifier in the first request, a first history storage partition corresponding to the first subject, where the first history storage partition is used to store first history data of the first subject; first history data of the first subject is obtained from the first history storage partition.
In an optional implementation, the apparatus further includes: a storage unit;
the determining unit 403 is further configured to determine, for any historical data, a subject identifier corresponding to the historical data;
the storage unit is configured to store the history data in the first history storage partition in response to that a subject identifier corresponding to the history data is a subject identifier of the first subject.
In an optional implementation manner, the generating unit 401 is further configured to generate a second request in response to a triggering operation of a user, where the second request is used to request an offline tag of the first subject;
the obtaining unit 402 is further configured to obtain second history data of the first main body from the history storage partition according to the second request;
the determining unit 403 is further configured to determine an offline label corresponding to the second main body according to the second historical data.
In an optional implementation, the apparatus further includes: a storage unit;
the storage unit is further configured to store the real-time tag corresponding to the first main body in a real-time tag set.
In an optional implementation manner, the storage unit is specifically configured to store the real-time tag of the first subject in a real-time tag set in response to that the real-time tag corresponding to the first subject is different from an offline tag.
It should be noted that, for implementation of each unit in this embodiment, reference may be made to relevant descriptions in the foregoing method embodiments, and details of this embodiment are not described herein again.
The division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation. Each functional unit in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. For example, in the above embodiment, the processing unit and the sending unit may be the same unit or different units. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
Referring to fig. 5, a schematic diagram of an electronic device 500 suitable for implementing embodiments of the present application is shown. The terminal device in the embodiment of the present application may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a Digital broadcast receiver, a PDA (Personal Digital Assistant), a PAD (Portable android device), a PMP (Portable multimedia Player), a car terminal (e.g., car navigation terminal), and the like, and a fixed terminal such as a Digital TV (television), a desktop computer, and the like. The electronic device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 5, electronic device 500 may include a processing means (e.g., central processing unit, graphics processor, etc.) 501 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage means 508 into a Random Access Memory (RAM) 503. In the RAM503, various programs and data necessary for the operation of the electronic apparatus 500 are also stored. The processing device 501, the ROM502, and the RAM503 are connected to each other through a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
Generally, the following devices may be connected to the I/O interface 505: input devices 506 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 507 including, for example, a Liquid Crystal Display (LCD), speakers, vibrators, and the like; storage devices 508 including, for example, magnetic tape, hard disk, etc.; and a communication device 509. The communication means 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. While fig. 5 illustrates an electronic device 500 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to embodiments of the application, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 509, or installed from the storage means 508, or installed from the ROM 502. The computer program performs the above-described functions defined in the methods of the embodiments of the present application when executed by the processing device 501.
The electronic device provided by the embodiment of the present application and the method provided by the embodiment of the present application belong to the same inventive concept, and technical details that are not described in detail in the embodiment can be referred to the embodiment of the present application, and the embodiment of the present application have the same beneficial effects.
The present application provides a computer readable medium, on which a computer program is stored, wherein the program is executed by a processor to implement the method according to any of the above embodiments.
It should be noted that the computer readable medium mentioned above in the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (Hyper Text Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to perform the method.
Computer program code for carrying out operations for aspects of the present application may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software or hardware. Where the name of a unit/module does not in some cases constitute a limitation on the unit itself, for example, a voice data collection module may also be described as a "data collection module".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this application, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
It should be noted that, in the present specification, the embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. For the system or the device disclosed by the embodiment, the description is simple because the system or the device corresponds to the method disclosed by the embodiment, and the relevant points can be referred to the method part for description.
It should be understood that in the present application, "at least one" means one or more, "a plurality" means two or more. "and/or" for describing an association relationship of associated objects, indicating that there may be three relationships, e.g., "a and/or B" may indicate: only A, only B and both A and B are present, wherein A and B may be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of single item(s) or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b, c may be single or plural.
It is further noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (13)

1. A method of tag generation, the method comprising:
responding to real-time data obtained from a first main body, and generating a first request, wherein the first request is used for requesting a real-time tag of the first main body;
acquiring real-time data of the first main body from a real-time storage partition and acquiring first historical data of the first main body from a historical storage partition according to the first request, wherein the real-time storage partition and the historical storage partition are located in the same storage engine;
and determining a real-time label corresponding to the first main body according to the real-time data and the first historical data.
2. The method of claim 1, wherein generating the first request in response to obtaining real-time data of the first subject comprises:
responding to the real-time data of a first main body, and acquiring a main body identifier of the first main body;
adding the body identification of the first body to a body identification queue;
and generating a first request according to the main body identification queue, wherein the main body identification queue is used for triggering the calculation of the real-time label.
3. The method of claim 1 or 2, wherein the obtaining real-time data of the first subject from a real-time storage partition according to the first request comprises:
determining a first real-time storage partition corresponding to the first main body according to the main body identifier in the first request, wherein the first real-time storage partition is used for storing real-time data of the first main body;
and acquiring real-time data of the first main body from the first real-time storage partition.
4. The method of claim 3, further comprising:
in response to the acquisition of real-time data, determining a main body identifier corresponding to the real-time data;
and in response to the fact that the main body identification corresponding to the real-time data is the main body identification of the first main body, storing the real-time data to the first real-time storage partition.
5. The method according to any one of claims 1 to 4, wherein generating the first request in response to obtaining the real-time data of the first subject comprises:
responding to the real-time data of the first main body and the request time reaching the preset time, and generating a first request; alternatively, the first and second electrodes may be,
and responding to the situation that the number of the first main bodies acquiring the real-time data reaches a preset number and the request time does not reach the preset time, and generating a first request.
6. The method of claim 1 or 2, wherein the obtaining the first history data of the first subject from the history storage partition according to the first request comprises:
determining a first history storage partition corresponding to the first main body according to the main body identification in the first request, wherein the first history storage partition is used for storing first history data of the first main body;
first history data of the first subject is obtained from the first history storage partition.
7. The method of claim 6, further comprising:
for any historical data, determining a subject identifier corresponding to the historical data;
and in response to the main body identification corresponding to the historical data being the main body identification of the first main body, storing the historical data into the first history storage partition.
8. The method of claim 1, further comprising:
generating a second request in response to a trigger operation of a user, wherein the second request is used for requesting an offline label of the first main body;
acquiring second history data of the first main body from the history storage partition according to the second request;
and determining the offline label corresponding to the second main body according to the second historical data.
9. The method of claim 1, further comprising:
and storing the real-time label corresponding to the first main body in a real-time label set.
10. The method of claim 9, the storing the real-time tag corresponding to the first subject in a real-time tag set, comprising:
and in response to that the real-time label corresponding to the first main body is different from an offline label, storing the real-time label of the first main body in a real-time label set.
11. A label generation apparatus, characterized in that the apparatus comprises:
the generating unit is used for responding to the real-time data of the first main body, and generating a first request, wherein the first request is used for requesting a real-time label of the first main body;
the acquiring unit is used for acquiring real-time data of the first main body from a real-time storage partition and acquiring first historical data of the first main body from a historical storage partition according to the first request, wherein the real-time storage partition and the historical storage partition are positioned in the same storage engine;
and the determining unit is used for determining the real-time label corresponding to the first main body according to the real-time data and the first historical data.
12. An electronic device, characterized in that the device comprises: a processor and a memory;
the memory for storing instructions or computer programs;
the processor to execute the instructions or computer program in the memory to cause the electronic device to perform the method of any of claims 1-10.
13. A computer-readable storage medium having stored therein instructions that, when executed on a device, cause the device to perform the method of any one of claims 1-10.
CN202210529372.8A 2022-05-16 2022-05-16 Label generation method, device, equipment and medium Pending CN114817409A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210529372.8A CN114817409A (en) 2022-05-16 2022-05-16 Label generation method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210529372.8A CN114817409A (en) 2022-05-16 2022-05-16 Label generation method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN114817409A true CN114817409A (en) 2022-07-29

Family

ID=82515771

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210529372.8A Pending CN114817409A (en) 2022-05-16 2022-05-16 Label generation method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN114817409A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115062233A (en) * 2022-08-18 2022-09-16 中航信移动科技有限公司 Combined label generation method for civil aviation data

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115062233A (en) * 2022-08-18 2022-09-16 中航信移动科技有限公司 Combined label generation method for civil aviation data
CN115062233B (en) * 2022-08-18 2022-11-04 中航信移动科技有限公司 Combined label generation method for civil aviation data

Similar Documents

Publication Publication Date Title
CN109299348B (en) Data query method and device, electronic equipment and storage medium
CN108810047B (en) Method and device for determining information push accuracy rate and server
CN111432001B (en) Method, apparatus, electronic device and computer readable medium for jumping scenes
CN111597467A (en) Display method and device and electronic equipment
CN112379982B (en) Task processing method, device, electronic equipment and computer readable storage medium
CN111198859A (en) Data processing method and device, electronic equipment and computer readable storage medium
EP3879795A1 (en) Method and apparatus for acquiring information, device, medium and computer program product
CN111309496A (en) Method, system, device, equipment and storage medium for realizing delay task
CN114817409A (en) Label generation method, device, equipment and medium
CN111163324A (en) Information processing method and device and electronic equipment
CN113139082A (en) Multimedia content processing method, apparatus, device and medium
CN111798251A (en) Verification method and device of house source data and electronic equipment
CN114827750B (en) Viewing angle prediction method, device, equipment and storage medium
CN109933508B (en) Method and apparatus for transmitting information
CN111628913B (en) Online time length determining method and device, readable medium and electronic equipment
CN111274104B (en) Data processing method, device, electronic equipment and computer readable storage medium
CN111222048A (en) User number query calculation method and device, electronic equipment and storage medium
CN115185667B (en) Visual application acceleration method and device, electronic equipment and storage medium
CN111047229A (en) Order distribution information processing method and system
CN113554385B (en) Distribution robot control method, distribution robot control device, electronic equipment and computer readable medium
CN112883410B (en) Method and device for displaying information
CN110855767B (en) Method, device, equipment and storage medium for responding operation request
CN112286773A (en) Method, device, medium and electronic equipment for collecting crash information
CN114995764A (en) Data storage method and device based on stream computing
CN115017547A (en) Authority determining method, device, equipment and medium

Legal Events

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