CN113760979A - Method and apparatus for generating information - Google Patents

Method and apparatus for generating information Download PDF

Info

Publication number
CN113760979A
CN113760979A CN202011262378.0A CN202011262378A CN113760979A CN 113760979 A CN113760979 A CN 113760979A CN 202011262378 A CN202011262378 A CN 202011262378A CN 113760979 A CN113760979 A CN 113760979A
Authority
CN
China
Prior art keywords
data
current time
database
association identifier
data stream
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
CN202011262378.0A
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 Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information 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 Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN202011262378.0A priority Critical patent/CN113760979A/en
Publication of CN113760979A publication Critical patent/CN113760979A/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/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24568Data stream processing; Continuous queries
    • 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/22Indexing; Data structures therefor; Storage structures
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0633Lists, e.g. purchase orders, compilation or processing
    • G06Q30/0635Processing of requisition or of purchase orders

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • General Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Computational Linguistics (AREA)
  • Marketing (AREA)
  • Economics (AREA)
  • Development Economics (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a method and a device for generating information, and relates to the technical field of computers. The method comprises the following steps: acquiring at least two data streams and an association identifier for associating the at least two data streams, and storing the at least two data streams into a database; for each of the at least two data streams, in response to determining that the data stream does not have the data at the current moment corresponding to the association identifier, acquiring and storing the data at the current moment corresponding to the association identifier, and then acquiring the data at the current moment corresponding to the association identifier from the database; and generating the information of the current time by adopting the data of the current time corresponding to the associated identification in each path of data stream. The method can ensure the integrity and stability of the information stream generated based on the multi-path data stream.

Description

Method and apparatus for generating information
Technical Field
The present disclosure relates to the field of computer technology, and in particular, to a method and apparatus for generating information.
Background
The result information is generated by adopting the data in the multi-path data stream, so that a user can obtain the result information stream of the multi-path data stream. The current method for generating result information by using data in multiple data streams is to generate result information according to multiple data extracted from multiple data streams in real time.
However, the current method of generating result information has a problem of poor stability.
Disclosure of Invention
The present disclosure provides a method, an apparatus, an electronic device, and a computer-readable storage medium for generating information.
According to a first aspect of the present disclosure, there is provided a method for generating information, comprising: acquiring at least two data streams and an association identifier for associating the at least two data streams, and storing the at least two data streams into a database; for each of the at least two data streams, in response to determining that the data stream does not have the data at the current moment corresponding to the association identifier, acquiring and storing the data at the current moment corresponding to the association identifier, and then acquiring the data at the current moment corresponding to the association identifier from the database; and generating the information of the current time by adopting the data of the current time corresponding to the associated identification in each path of data stream.
In some embodiments, a method for generating information comprises: and for each of the at least two data streams, in response to determining that the data stream has data at the current moment corresponding to the association identifier, acquiring the data at the current moment corresponding to the association identifier from the data stream.
In some embodiments, storing at least two data streams in a database includes: and storing the at least two data streams into a database at a preset frequency.
In some embodiments, storing at least two data streams in a database includes: and storing the data stream into the database by taking the associated identification as a key in the storage key value pair and taking the data corresponding to the associated identification in the data stream as a value in the storage key value pair.
In some embodiments, the data stream includes real-time order data for the item, and the information at the current time includes real-time status information for the item.
According to a second aspect of the present disclosure, there is provided an apparatus for generating information, comprising: the storage unit is configured to acquire the at least two data streams and the association identifier for associating the at least two data streams, and store the at least two data streams into a database; the first extraction unit is configured to respond to the fact that data at the current moment corresponding to the association identifier does not exist in the data stream for each of the at least two data streams, and after the data at the current moment corresponding to the association identifier is obtained and stored, the data at the current moment corresponding to the association identifier is obtained from the database; and the generating unit is configured to generate the information of the current time by adopting the data of the current time corresponding to the association identifier in each path of data stream.
In some embodiments, the means for generating information comprises: and the second extraction unit is configured to respond to the determination that the data of the current moment corresponding to the association identifier exists in the data stream for each of the at least two data streams, and acquire the data of the current moment corresponding to the association identifier from the data stream.
In some embodiments, a memory cell, comprises: the storage module is configured to store the at least two data streams into a database at a preset frequency.
In some embodiments, a memory module, comprising: and the storage submodule is configured to store the data stream into the database by taking the associated identifier as a key in the storage key value pair and taking the data corresponding to the associated identifier in the data stream as a value in the storage key value pair.
In some embodiments, the data stream includes real-time order data for the item, and the information at the current time includes real-time status information for the item.
According to a third aspect of the present disclosure, an embodiment of the present disclosure provides an electronic device, including: one or more processors: a storage device for storing one or more programs which, when executed by one or more processors, cause the one or more processors to implement a method for generating information as provided in the first aspect.
According to a fourth aspect of the present disclosure, embodiments of the present disclosure provide a computer-readable storage medium having a computer program stored thereon, where the program, when executed by a processor, implements the method for generating information provided by the first aspect.
The method and the device for generating information provided by the present disclosure obtain at least two data streams and associated identifiers for associating the at least two data streams, store the at least two data streams in a database, for each data stream of the at least two data streams, in response to determining that there is no data at a current moment corresponding to the associated identifiers in the data stream, obtain and store the data at the current moment from the database after obtaining and storing the data at the current moment, then generate information at the current moment by using the data at the current moment corresponding to the associated identifiers in each data stream, when the data at the current moment does not appear in the data stream in real time, obtain and store the data at the current moment in the database, obtain the data at the current moment from the database after obtaining and storing the data at the current moment in the database, and generate the information at the current moment based on the data at the current moment in the multiple data streams, to ensure the integrity and stability of the information stream generated based on the multiple data streams.
According to the technology of the application, the problem of poor stability of the generated result information due to the fact that a plurality of data obtained from a plurality of paths of data streams in real time are adopted is solved.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not intended to limit the present application. Wherein:
FIG. 1 is an exemplary system architecture diagram in which embodiments of the present application may be applied;
FIG. 2 is a flow diagram of one embodiment of a method for generating information according to the present application;
FIG. 3 is a schematic block diagram illustrating one embodiment of an apparatus for generating information according to the present application;
fig. 4 is a block diagram of an electronic device for implementing a method for generating information according to an embodiment of the present application.
Detailed Description
The following description of the exemplary embodiments of the present application, taken in conjunction with the accompanying drawings, includes various details of the embodiments of the application for the understanding of the same, which are to be considered exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 shows an exemplary system architecture 100 to which embodiments of the method for generating information or the apparatus for generating information of the present application may be applied.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have various client applications installed thereon, such as shopping-type applications, financial-type applications, computing-type applications, image-type applications, video-type applications, and the like.
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting receiving of server messages, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III, motion Picture Experts compression standard Audio Layer 3), MP4 players (Moving Picture Experts Group Audio Layer IV, motion Picture Experts compression standard Audio Layer 4), laptop portable computers, desktop computers, and the like.
The terminal apparatuses 101, 102, and 103 may be hardware or software. When the terminal devices 101, 102, and 103 are hardware, various electronic devices may be used, and when the terminal devices 101, 102, and 103 are software, the electronic devices may be installed in the above-listed electronic devices. It may be implemented as multiple pieces of software or software modules (e.g., multiple software modules to provide distributed services) or as a single piece of software or software module. And is not particularly limited herein.
The server 105 may obtain, through the network 104, the multiple data streams collected by the terminal devices 101, 102, and 103 and the association identifier for associating the multiple data streams, and store the obtained multiple data streams in a database stored persistently. The server 105 may obtain data at the current time corresponding to the association identifier from each of the multiple data streams, when it is determined that the data at the current time corresponding to the association identifier does not exist in the data stream, after obtaining the data at the current time in the data stream and storing the data at the current time in the persistently stored database, extract the data at the current time in the data stream from the persistently stored database, and then the server 105 may generate information at the current time by using the data at the current time corresponding to the association identifier in each data stream.
It should be noted that the method for generating information provided by the embodiment of the present disclosure is generally performed by the server 105, and accordingly, the apparatus for generating information is generally disposed in the server 105.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to FIG. 2, a flow 200 of one embodiment of a method for generating information in accordance with the present disclosure is shown, including the steps of:
step 201, acquiring at least two data streams and an association identifier for associating the at least two data streams, and storing the at least two data streams into a database.
In this embodiment, an executing entity (for example, the server 105 shown in fig. 1) of the method for generating information may acquire the multiple data streams and the association identifier for associating the multiple data streams in a wired or wireless manner, and store the acquired multiple data streams in a database in persistent storage.
In this embodiment, the association identifier of the multiple data streams may be an association identifier that is collected by the terminal and sent to the server and that is input by the user based on the multiple data streams or the user requirement. For example, one of the multiple data streams may be a real-time purchase item data stream of the e-commerce platform, and the other one may be a real-time payment data stream of the e-commerce platform, so that the order number may be used as an association identifier of the order data stream and the payment data stream, and at this time, the item data stream and the payment data stream may be associated through the order number, so that the e-commerce background knows which items are paid items.
For another example, one of the multiple data streams may be a foreign exchange real-time exchange rate data stream of multiple currencies, and the other may be a real-time renminbi price data stream of a certain article, so that the currency identifier of the renminbi may be used as the association identifier of the foreign exchange real-time exchange rate data stream and the real-time renminbi price data stream of the certain article, and at this time, the real-time renminbi price of the certain article may be associated with the exchange rate data of the renminbi to the foreign currency through the currency identifier of the renminbi, so that the server may generate the real-time foreign currency price information of the certain article.
In this embodiment, a persistent database refers to a database that can persistently store data, where persistent refers to keeping unchanged for a certain period of time, that is, persistent is relative to time. A persistently stored database is typically a storage device, such as a disk, cloud storage space, etc., that holds data long relative to the memory that stores data instantaneously.
Step 202, for each of the at least two data streams, in response to determining that there is no data at the current time corresponding to the association identifier in the data stream, after acquiring and storing the data at the current time corresponding to the association identifier, acquiring the data at the current time corresponding to the association identifier from the database.
In this embodiment, for each of the multiple data streams, when it is determined that there is no data at the current time corresponding to the association identifier in the data stream, that is, when data generated by the time node at the current time corresponding to the association identifier does not appear in the real-time data stream due to network delay, system jitter, or the like, the data generated by the time node at the current time is extracted from the server after the network/system is recovered to normal and the server receives and stores the data generated by the time node at the current time. It should be noted that the current time may be any time when the real-time data stream is acquired.
And 203, generating the information of the current time by adopting the data of the current time corresponding to the associated identifier in each path of data stream.
In this embodiment, the current time information may be generated by using the current time data corresponding to the association identifier, which is acquired from the multiple data streams. It is understood that the generated information at each time may constitute an information stream generated based on a plurality of data streams.
The method for generating information, which is provided by the disclosure, includes acquiring at least two data streams and associated identifiers for associating the at least two data streams, storing the at least two data streams in a database, for each data stream of the at least two data streams, in response to determining that data at a current moment corresponding to the associated identifiers does not exist in the data stream, acquiring and storing the data at the current moment from the database, and then generating information at the current moment by using the data at the current moment corresponding to the associated identifiers in the data streams, when the data at the current moment does not exist in the data stream in real time, acquiring the data at the current moment from the database after acquiring and storing the data at the current moment in the database, and generating the information at the current moment based on the data at the current moment, so as to avoid that the data at the current moment cannot be acquired in real time, the problem that the information at the current moment in the information stream is lost due to the fact that the memory cannot generate the information at the current moment based on the data at the current moment is solved, so that the integrity and the stability of the information stream generated based on the multi-path data stream are guaranteed, and the robustness of a system is improved.
Optionally, the method for generating information further comprises: and for each of the at least two data streams, in response to determining that the data stream has data at the current moment corresponding to the association identifier, acquiring the data at the current moment corresponding to the association identifier from the data stream.
In this embodiment, for each of the multiple data streams, when it is determined that data at the current time corresponding to the association identifier exists in the data stream, that is, when the current network and system status is good and the real-time data in the data stream is transmitted normally, data corresponding to the time node at the current time corresponding to the association identifier is obtained from the data stream.
In this embodiment, when it is determined that data at the current moment corresponding to the association identifier exists in the data stream read in real time by the server memory, the data at the current moment is directly acquired from the memory, so that the efficiency of acquiring the data can be improved, and the processing efficiency of the system is further improved.
Optionally, storing the at least two data streams into a database includes: and storing the at least two data streams into a database at a preset frequency.
In this embodiment, for each of the multiple data streams, the data stream read in real time from the server memory may be first temporarily stored in the server memory, and the data stream read during the time interval temporarily stored in the server memory may be stored in the database persistently stored at preset time intervals (for example, every two seconds). Alternatively, the data in the data stream read during the time interval may be subjected to a deduplication operation, only one piece of newly acquired data is retained, and the newly acquired piece of data is stored in the database in the persistent storage as the data of the data stream during the time interval.
In this embodiment, the data stream read by the memory of the server is stored in the database with persistent storage at a preset frequency, so that read-write operations between the memory and the database can be reduced, the service lives of the memory and the database can be prolonged, and the device resources can be saved.
Optionally, when the data stream is stored in the database, information such as a table name, an association identifier, a field name of a storage unit, and the like stored in the data stream may be updated into the configuration file, so as to facilitate management and maintenance of the stored data stream.
Optionally, storing the at least two data streams into a database includes: and storing the data stream into the database by taking the associated identification as a key in the storage key value pair and taking the data corresponding to the associated identification in the data stream as a value in the storage key value pair.
In this embodiment, the data stream may be stored in the database in a data storage manner of key-value pair storage, the associated identifier is used as a key in the stored key-value pair, and the data corresponding to the associated identifier is used as a value in the stored key-value pair. In this embodiment, the data stream is stored in the database in a key-value-pair storage manner, the association identifier is used as a key for storing the key-value pair, and the data corresponding to the association identifier is used as a value for storing the key-value pair, so that when the data at the current time corresponding to the association identifier is extracted from the database, the efficiency of extracting the data is improved.
In some optional implementations of the embodiments described above in connection with fig. 2, the data stream includes real-time order data for the item, and the information at the current time includes real-time status information for the item.
In this embodiment, the article may be a physical article such as goods, or may also be a virtual article such as power, storage space, and stored data. The multi-path data stream may be real-time order data of the article, and the current-time information generated by using the current-time data in the multi-path data stream may be real-time status information of the article.
For example, one of the multiple data streams may be a real-time order shipment quantity of an item, another of the multiple data streams may be a real-time shipment quantity of the item, and real-time storage quantity information of the item may be generated based on the two data streams. It is understood that the item identifier such as the item number/item name can be used as the association identifier in this example.
For another example, one of the multiple data streams may be currently consumed data including a device identifier and an operation being performed by a device corresponding to the device identifier (e.g., a server device is performing a data storage operation, a data calculation operation, and the like), and another one of the multiple data streams may be a current completion progress (e.g., a data storage amount, a data calculation amount, and the like) of the device corresponding to the device identifier completing the operation being performed by the device corresponding to the device identifier, and may generate current work efficiency information of each running device based on the two data streams. It will be appreciated that the device identification may be used as the association identification in this example.
In some application scenarios, the server may obtain the two-way data streams Stream1 and Stream2 in real-time and store the two-way data streams into a persistently stored database.
The data of the data Stream1 at the current time is Map1< key, data >, and the data of the data Stream2 at the current time is Map2< key, data >, wherein key is an associated identifier and is also a key in a key value pair in the persistent storage database, and data is data corresponding to the associated identifier and is also a value in the key value pair in the persistent storage database. The data Map1 is associated with the data Map2 through key, and information joindstream 1< key, data > and joindstream 2< key, data > on the association are obtained; obtaining data which exists in Map1 but does not exist in Map2, UnJoinStream1< key, data >; and data that exists in Map2 but does not exist in Map1, UnJoinStream2< key, data >.
Then, after the network failure/jam is relieved or the system is recovered to be stable, and the data at the current moment corresponding to the association identifier is received and stored, the server extracts the data at the current moment from the database stored in a persistent mode: loading data which are not related to the data Stream2 from a persistent storage database, namely traversing the persistent storage database according to a key value in UnJoinStream1 to obtain data DataLoadStream2< key, data >; data which is not related to the data Stream1 is loaded from the database of the persistent storage, namely, the database of the persistent storage is traversed based on the key value in the UnJoinStream2, and data DataLoadStream1< key, data > is obtained.
Thereafter, the server performs a data merge operation: and merging the associated data JoinedStream1 and the data DataLoadStream1 in the data Stream Stream1 loaded from the persistent storage to obtain a data set ToBeCalculatedMap1< key, data >. And merging the associated data JoinedStream2 and the data DataLoadStream2 in the data Stream Stream2 loaded from the database of the persistent storage to obtain a data set ToBeCalculatedMap2< key, data > which needs to be sent to the memory for processing.
And then, loading the merged data into a server memory for calculation/processing to generate the result information of the current moment. And sending the result information of the current time to a result stream. The result information at each moment constitutes a complete result information stream. When the method is adopted to carry out correlation calculation of a plurality of data streams, when a certain data stream is delayed or jittered, the problem of data loss in the result information stream caused by the fact that data cannot be associated and not transmitted can be solved by introducing the persistent storage database to automatically load unassociated data. In addition, the robustness, stability and fault tolerance of the real-time correlation calculation of the multi-path data streams can be improved, and the automation and the intellectualization of the real-time calculation of the multi-path data streams are realized.
With further reference to fig. 3, as an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of an apparatus for generating information, which corresponds to the method embodiment shown in fig. 2, and which is particularly applicable in various electronic devices.
As shown in fig. 3, the apparatus 300 for generating information of the present embodiment includes: storage section 301, first extraction section 302, and generation section 303. The storage unit 301 is configured to obtain at least two data streams and an association identifier for associating the at least two data streams, and store the at least two data streams into a database; a first extracting unit 302, configured to, for each of the at least two data streams, in response to determining that there is no data at the current time corresponding to the association identifier in the data stream, obtain and store the data at the current time corresponding to the association identifier, and then obtain the data at the current time corresponding to the association identifier from the database; the generating unit 303 is configured to generate information of the current time by using the data of the current time corresponding to the association identifier in each data stream.
In some embodiments, the means for generating information comprises: and the second extraction unit is configured to respond to the determination that the data of the current moment corresponding to the association identifier exists in the data stream for each of the at least two data streams, and acquire the data of the current moment corresponding to the association identifier from the data stream.
In some embodiments, a memory cell, comprises: the storage module is configured to store the at least two data streams into a database at a preset frequency.
In some embodiments, a memory module, comprising: and the storage submodule is configured to store the data stream into the database by taking the associated identifier as a key in the storage key value pair and taking the data corresponding to the associated identifier in the data stream as a value in the storage key value pair.
In some embodiments, the data stream includes real-time order data for the item, and the information at the current time includes real-time status information for the item.
The units in the apparatus 300 described above correspond to the steps in the method described with reference to fig. 2. Thus, the operations, features and technical effects that can be achieved by the above-described method for generating information are also applicable to the apparatus 300 and the units included therein, and are not described herein again.
According to an embodiment of the present application, an electronic device and a readable storage medium are also provided.
As shown in fig. 4, is a block diagram of an electronic device 400 for generating information according to an embodiment of the application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application that are described and/or claimed herein.
As shown in fig. 4, the electronic apparatus includes: one or more processors 401, memory 402, and interfaces for connecting the various components, including high-speed interfaces and low-speed interfaces. The various components are interconnected using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions for execution within the electronic device, including instructions stored in or on the memory to display graphical information of a GUI on an external input/output apparatus (such as a display device coupled to the interface). In other embodiments, multiple processors and/or multiple buses may be used, along with multiple memories and multiple memories, as desired. Also, multiple electronic devices may be connected, with each device providing portions of the necessary operations (e.g., as a server array, a group of blade servers, or a multi-processor system). In fig. 4, one processor 401 is taken as an example.
Memory 402 is a non-transitory computer readable storage medium as provided herein. Wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the method for generating information provided herein. The non-transitory computer readable storage medium of the present application stores computer instructions for causing a computer to perform the method for generating information provided herein.
The memory 402, as a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules corresponding to the method for generating information in the embodiment of the present application (for example, the storage unit 301, the first extraction unit 302, and the generation unit 303 shown in fig. 3). The processor 401 executes various functional applications of the server and data processing, i.e., implements the method for generating information in the above-described method embodiments, by running non-transitory software programs, instructions, and modules stored in the memory 402.
The memory 402 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the electronic device for generating information, and the like. Further, the memory 402 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, memory 402 optionally includes memory located remotely from processor 401, which may be connected to an electronic device for generating information over 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 electronic device of the method for generating information may further include: an input device 403, an output device 404, and a bus 405. The processor 401, memory 402, input device 403, and output device 404 may be connected by a bus 405 or otherwise, as exemplified by the connection by bus 405 in fig. 4.
The input device 403 may receive input numeric or character information and generate key signal inputs related to user settings and function controls of the electronic apparatus used to generate the information, such as a touch screen, keypad, mouse, track pad, touch pad, pointer stick, one or more mouse buttons, track ball, joystick, or other input device. The output devices 404 may include a display device, auxiliary lighting devices (e.g., LEDs), and haptic feedback devices (e.g., vibrating motors), among others. The display device may include, but is not limited to, a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display, and a plasma display. In some implementations, the display device can be a touch screen.
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, application specific ASICs (application specific integrated circuits), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
These computer programs (also known as programs, software applications, or code) include machine instructions for a programmable processor, and may be implemented using high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, Programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present application may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in the present application can be achieved, and the present invention is not limited herein.
The above-described embodiments should not be construed as limiting the scope of the present application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (12)

1. A method for generating information, comprising:
acquiring at least two data streams and association identifications for associating the at least two data streams, and storing the at least two data streams into a database;
for each of the at least two data streams, in response to determining that there is no data at the current time corresponding to the association identifier in the data stream, after acquiring and storing the data at the current time corresponding to the association identifier, acquiring the data at the current time corresponding to the association identifier from the database;
and generating the information of the current time by adopting the data of the current time corresponding to the associated identification in each path of data flow.
2. The method of claim 1, wherein the method comprises:
and for each of the at least two data streams, in response to determining that the data stream has the data at the current time corresponding to the association identifier, acquiring the data at the current time corresponding to the association identifier from the data stream.
3. The method of claim 1, wherein said storing said at least two data streams into a database comprises:
and storing the at least two data streams into the database at a preset frequency.
4. The method of claim 1, wherein said storing said at least two data streams into a database comprises:
and taking the associated identification as a key in a storage key value pair, taking data corresponding to the associated identification in the data stream as a value in the storage key value pair, and storing the data stream into the database.
5. The method according to one of claims 1 to 4, wherein the data stream comprises real-time order data for an item, the information of the current time comprising real-time status information of the item.
6. An apparatus for generating information, comprising:
the storage unit is configured to acquire at least two data streams and correlation identifications used for correlating the at least two data streams, and store the at least two data streams into a database;
a first extracting unit, configured to, for each of the at least two data streams, in response to determining that there is no data at the current time corresponding to the association identifier in the data stream, obtain and store the data at the current time corresponding to the association identifier, and then obtain the data at the current time corresponding to the association identifier from the database;
and the generating unit is configured to generate the information of the current time by adopting the data of the current time corresponding to the association identifier in each path of data stream.
7. The apparatus of claim 1, wherein the apparatus comprises:
and for each of the at least two data streams, in response to determining that the data at the current time corresponding to the association identifier exists in the data stream, a second extraction unit is configured to obtain the data at the current time corresponding to the association identifier from the data stream.
8. The apparatus of claim 1, wherein the storage unit comprises:
a storage module configured to store the at least two data streams in the database at a preset frequency.
9. The apparatus of claim 1, wherein the storage module comprises:
and the storage submodule is configured to store the data stream into the database by taking the association identifier as a key in a storage key value pair and taking data corresponding to the association identifier in the data stream as a value in the storage key value pair.
10. The apparatus according to one of claims 6-9, wherein the data stream comprises real-time order data for an item, the information of the current time comprising real-time status information of the item.
11. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-5.
12. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-5.
CN202011262378.0A 2020-11-12 2020-11-12 Method and apparatus for generating information Pending CN113760979A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011262378.0A CN113760979A (en) 2020-11-12 2020-11-12 Method and apparatus for generating information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011262378.0A CN113760979A (en) 2020-11-12 2020-11-12 Method and apparatus for generating information

Publications (1)

Publication Number Publication Date
CN113760979A true CN113760979A (en) 2021-12-07

Family

ID=78786031

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011262378.0A Pending CN113760979A (en) 2020-11-12 2020-11-12 Method and apparatus for generating information

Country Status (1)

Country Link
CN (1) CN113760979A (en)

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100739986B1 (en) * 2006-10-11 2007-07-16 주식회사 케이티프리텔 System and method for data flow management
US20090319471A1 (en) * 2008-06-20 2009-12-24 Microsoft Corporation Field mapping for data stream output
CN101650563A (en) * 2009-07-29 2010-02-17 江俊逢 Self-adapting control method and system for associated data stream
US20140086431A1 (en) * 2012-09-27 2014-03-27 Hewlett-Packard Devlopment Compnay, L.P. Wireless peripheral hub device
CN104104603A (en) * 2014-08-07 2014-10-15 中国人民解放军信息工程大学 Method and system for establishing data transmission links
CN104160634A (en) * 2011-12-14 2014-11-19 讯宝科技公司 Method and apparatus for providing spatially selectable communications using deconstructed and delayed data streams
WO2014186934A1 (en) * 2013-05-20 2014-11-27 Mediatek Singapore Pte. Ltd. Data stream processing apparatus
CN105763391A (en) * 2014-12-17 2016-07-13 中国移动通信集团公司 Conversation data flow processing system and method, and related equipment
CN106959928A (en) * 2017-03-23 2017-07-18 华中科技大学 A kind of stream data real-time processing method and system based on multi-level buffer structure
CN107077477A (en) * 2014-09-15 2017-08-18 微软技术许可有限责任公司 Data flow for the construction of enhanced event handling
CN107545014A (en) * 2016-06-28 2018-01-05 国网天津市电力公司 Stream calculation instant disposal system for treating based on Storm
CN109726237A (en) * 2018-12-13 2019-05-07 浙江邦盛科技有限公司 A kind of association complementing method for multichannel real-time streaming data
CN110389989A (en) * 2019-07-15 2019-10-29 阿里巴巴集团控股有限公司 A kind of data processing method, device and equipment
US20200125572A1 (en) * 2018-10-19 2020-04-23 Oracle International Corporation Integrating kafka data-in-motion with data-at-rest tables

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100739986B1 (en) * 2006-10-11 2007-07-16 주식회사 케이티프리텔 System and method for data flow management
US20090319471A1 (en) * 2008-06-20 2009-12-24 Microsoft Corporation Field mapping for data stream output
CN101650563A (en) * 2009-07-29 2010-02-17 江俊逢 Self-adapting control method and system for associated data stream
CN104160634A (en) * 2011-12-14 2014-11-19 讯宝科技公司 Method and apparatus for providing spatially selectable communications using deconstructed and delayed data streams
US20140086431A1 (en) * 2012-09-27 2014-03-27 Hewlett-Packard Devlopment Compnay, L.P. Wireless peripheral hub device
WO2014186934A1 (en) * 2013-05-20 2014-11-27 Mediatek Singapore Pte. Ltd. Data stream processing apparatus
CN104104603A (en) * 2014-08-07 2014-10-15 中国人民解放军信息工程大学 Method and system for establishing data transmission links
CN107077477A (en) * 2014-09-15 2017-08-18 微软技术许可有限责任公司 Data flow for the construction of enhanced event handling
CN105763391A (en) * 2014-12-17 2016-07-13 中国移动通信集团公司 Conversation data flow processing system and method, and related equipment
CN107545014A (en) * 2016-06-28 2018-01-05 国网天津市电力公司 Stream calculation instant disposal system for treating based on Storm
CN106959928A (en) * 2017-03-23 2017-07-18 华中科技大学 A kind of stream data real-time processing method and system based on multi-level buffer structure
US20200125572A1 (en) * 2018-10-19 2020-04-23 Oracle International Corporation Integrating kafka data-in-motion with data-at-rest tables
CN109726237A (en) * 2018-12-13 2019-05-07 浙江邦盛科技有限公司 A kind of association complementing method for multichannel real-time streaming data
CN110389989A (en) * 2019-07-15 2019-10-29 阿里巴巴集团控股有限公司 A kind of data processing method, device and equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
李长路;王劲林;郭志川;韩锐;: "DEN-Stream:一种分布式数据流聚类方法", 计算机应用与软件, no. 07, 15 July 2016 (2016-07-15) *
王丹;李茂增;: "数据流系统中的一种查询调度及负载脱落模型", 计算机应用, no. 10, 1 October 2009 (2009-10-01) *

Similar Documents

Publication Publication Date Title
CN111831420B (en) Method for task scheduling, related device and computer program product
CN111460285A (en) Information processing method, device, electronic equipment and storage medium
CN110619002A (en) Data processing method, device and storage medium
CN112084366A (en) Method, apparatus, device and storage medium for retrieving image
CN111984476A (en) Test method and device
CN111246257B (en) Video recommendation method, device, equipment and storage medium
JP7132999B2 (en) METHOD AND APPARATUS FOR VERIFYING OPERATIONAL STATE OF APPLICATION
CN111880914A (en) Resource scheduling method, resource scheduling apparatus, electronic device, and storage medium
CN112561332B (en) Model management method, device, electronic equipment, storage medium and program product
CN111639027A (en) Test method and device and electronic equipment
CN110706147A (en) Image processing environment determination method and device, electronic equipment and storage medium
CN111813623A (en) Page monitoring method and device, electronic equipment and storage medium
CN111865720A (en) Method, apparatus, device and storage medium for processing request
CN111241396A (en) Information pushing method and device, electronic equipment and storage medium
CN111625949A (en) Simulation engine system, simulation processing method, device and medium
CN110750419B (en) Offline task processing method and device, electronic equipment and storage medium
CN113825170A (en) Method and apparatus for determining network channel
CN110781824B (en) Target detection and tracking method and device, electronic equipment and storage medium
CN113792038A (en) Method and apparatus for storing data
CN111339187A (en) Data processing method, device, equipment and storage medium based on intelligent contract
CN111984545A (en) Method and device for testing stability of detection unit, electronic equipment and storage medium
CN113760979A (en) Method and apparatus for generating information
CN114661274A (en) Method and device for generating intelligent contract
CN111597026A (en) Method and device for acquiring information
CN111292223A (en) Graph calculation processing method and device, electronic equipment and storage 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