WO2023142349A1 - 行为序列的生成方法及装置、存储介质、电子装置 - Google Patents

行为序列的生成方法及装置、存储介质、电子装置 Download PDF

Info

Publication number
WO2023142349A1
WO2023142349A1 PCT/CN2022/100202 CN2022100202W WO2023142349A1 WO 2023142349 A1 WO2023142349 A1 WO 2023142349A1 CN 2022100202 W CN2022100202 W CN 2022100202W WO 2023142349 A1 WO2023142349 A1 WO 2023142349A1
Authority
WO
WIPO (PCT)
Prior art keywords
operation event
behavior sequence
target object
value
sequence
Prior art date
Application number
PCT/CN2022/100202
Other languages
English (en)
French (fr)
Inventor
孙凯
刘建国
张旭
区波
张向磊
Original Assignee
青岛海尔科技有限公司
海尔智家股份有限公司
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 青岛海尔科技有限公司, 海尔智家股份有限公司 filed Critical 青岛海尔科技有限公司
Publication of WO2023142349A1 publication Critical patent/WO2023142349A1/zh

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/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2465Query processing support for facilitating data mining operations in structured databases
    • 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/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2474Sequence data queries, e.g. querying versioned data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/36Creation of semantic tools, e.g. ontology or thesauri
    • G06F16/367Ontology
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16YINFORMATION AND COMMUNICATION TECHNOLOGY SPECIALLY ADAPTED FOR THE INTERNET OF THINGS [IoT]
    • G16Y10/00Economic sectors
    • G16Y10/80Homes; Buildings
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Definitions

  • the present disclosure relates to the communication field, and in particular, to a method and device for generating a behavior sequence, a storage medium, and an electronic device.
  • Embodiments of the present disclosure provide a behavior sequence generation method and device, a storage medium, and an electronic device to at least solve the problem of inability to mine behavior sequences of arbitrary length in raw data in the related technologies to determine the operation of different devices by target objects behavioral issues.
  • a method for generating a behavior sequence including: acquiring data records of a target object on different devices, wherein the data records include: operation events of the target object on different devices, and corresponding Action execution time; determine the action execution order of multiple operation events according to the sequence of action execution time of multiple operation events; determine the time interval between every two adjacent operation events according to the action execution order, and determine the target object according to the time interval Behavior sequence, wherein the behavior sequence is used to indicate multiple operation events performed continuously by the target object within a preset time period.
  • an apparatus for generating a behavior sequence including: an acquisition module configured to acquire data records of a target object on different devices, wherein the data records include: the target object pairs different The operation event of the device, and the action execution time corresponding to the operation event; the sequence module is configured to determine the action execution order of the multiple operation events according to the order of the action execution time of the multiple operation events; the determination module, It is set to determine the time interval between every two adjacent operation events according to the action execution order, and determine the behavior sequence of the target object according to the time interval, wherein the behavior sequence is used to indicate that the target object is in Multiple operational events executed consecutively within a preset time period.
  • a storage medium is further provided, and a computer program is stored in the storage medium, wherein the computer program is configured to execute the steps in any one of the above method embodiments when running.
  • an electronic device including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to perform any of the above Steps in the method examples.
  • the data records of the target object on different devices are obtained, wherein the data records include: the operation events of the target object on different devices, and the execution time of actions corresponding to the operation events; the order of execution time of actions according to multiple operation events Determine the action execution sequence of multiple operation events; determine the time interval between every two adjacent operation events according to the action execution order, and determine the behavior sequence of the target object according to the time interval, wherein the behavior sequence is used to indicate that the target object is in the preset Multiple operation events performed continuously within a time period, that is, by extracting the behavior sequence corresponding to the data records of different devices by the target object, and then realizing the processing and mining of the original data without special data requirements, so , which can solve the problem that in the prior art, it is impossible to mine behavior sequences of any length in the original data to determine the operation behavior of the target object on different devices, and then make it possible to generate behaviors belonging to the target object according to the data records of the target object on different devices Sequence, based on the behavior sequence, the knowledge map algorithm can be used
  • FIG. 1 is a block diagram of a cloud hardware structure of a method for generating a behavior sequence according to an embodiment of the present disclosure
  • FIG. 2 is a flow chart of a method for generating a behavior sequence according to an embodiment of the present disclosure
  • Fig. 3 is a sequence diagram of performing data processing and determining an action sequence according to a data structure in an optional embodiment of the present disclosure
  • Fig. 4 is a schematic diagram of a user's temporal action sequence according to an optional embodiment of the present disclosure
  • Fig. 5 is a schematic diagram of calculating the time interval between any two consecutive actions of a certain user according to an optional embodiment of the present disclosure
  • FIG. 6 is a frame diagram of values of given feature values after calculating time intervals according to an alternative embodiment of the present disclosure
  • Fig. 7 is a schematic diagram (1) of calculation results corresponding to a certain user time action sequence that gives a value of a feature value after a time interval is calculated according to an optional embodiment of the present disclosure
  • Fig. 8 is a schematic diagram (2) of calculation results corresponding to a certain user time action sequence that gives a value of a feature value after calculating a time interval according to an optional embodiment of the present disclosure
  • Fig. 9 is a schematic diagram of a state corresponding to a certain user time action sequence according to an optional embodiment of the present disclosure.
  • Fig. 10 is a flow chart of performing data processing and determining an action sequence according to a data structure of an optional embodiment of the present disclosure
  • Fig. 11 is a structural block diagram of an apparatus for generating a behavior sequence according to an embodiment of the present disclosure.
  • FIG. 1 is a block diagram of the hardware structure of the cloud in a method for generating a behavior sequence according to an embodiment of the present disclosure.
  • the cloud may include one or more (only one is shown in Figure 1) processors 102 (processor 102 may include but not limited to processing devices such as microprocessor MCU or programmable logic device FPGA, etc.) and A memory 104 for storing data.
  • the cloud may further include a transmission device 106 and an input/output device 108 for communication functions.
  • FIG. 1 is a block diagram of the hardware structure of the cloud in a method for generating a behavior sequence according to an embodiment of the present disclosure.
  • the cloud may include one or more (only one is shown in Figure 1) processors 102 (processor 102 may include but not limited to processing devices such as microprocessor MCU or programmable logic device FPGA, etc.) and A memory 104 for storing data.
  • the cloud may further include a transmission device 106 and an input/output device 108 for communication functions.
  • the cloud may also include more or less components than those shown in FIG. 1 , or have a different configuration with functions equivalent to those shown in FIG. 1 or more functions than those shown in FIG. 1 .
  • the memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as computer programs corresponding to the method for generating behavior sequences in the embodiments of the present disclosure, and the processor 102 runs the computer programs stored in the memory 104, thereby Executing various functional applications and data processing is to realize the above-mentioned method.
  • the memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory.
  • the memory 104 may further include a memory that is remotely located relative to the processor 102, and these remote memories may be connected to the cloud through a network. Examples of the aforementioned networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • the transmission device 106 is used to receive or transmit data via a network.
  • the specific example of the above-mentioned network may include a wireless network provided by a communication provider in the cloud.
  • the transmission device 106 includes a network interface controller (NIC for short), which can be connected to other network devices through a base station so as to communicate with the Internet.
  • the transmission device 106 may be a radio frequency (Radio Frequency, RF for short) module, which is used to communicate with the Internet in a wireless manner.
  • RF Radio Frequency
  • FIG. 2 is a flow chart of a method for generating a behavior sequence according to an embodiment of the disclosure. The process includes the following steps:
  • Step S202 acquiring data records of the target object on different devices, wherein the data records include: operation events of the target object on different devices, and action execution time corresponding to the operation events;
  • the object identifiers in the original data can be used to distinguish the data record sets of different devices corresponding to different target objects.
  • Step S204 determining the action execution order of the plurality of operation events according to the sequence of action execution time of the plurality of operation events
  • the multiple operation events are sorted according to the action execution time corresponding to the operation events carried in the data records.
  • Each action event is executed by the target object in the action execution sequence.
  • Step S206 determine the time interval between every two adjacent operation events according to the action execution sequence, and determine the behavior sequence of the target object according to the time interval, wherein the behavior sequence is used to indicate the target object Multiple operational events performed consecutively within a preset period of time.
  • the data records of the target object on different devices are obtained, wherein the data records include: the operation events of the target object on different devices, and the execution time of actions corresponding to the operation events; the order of execution time of actions according to multiple operation events Determine the action execution sequence of multiple operation events; determine the time interval between every two adjacent operation events according to the action execution order, and determine the behavior sequence of the target object according to the time interval, wherein the behavior sequence is used to indicate that the target object is in the preset Multiple operation events performed continuously within a time period, that is, by extracting the behavior sequence corresponding to the data records of different devices by the target object, and then realizing the processing and mining of the original data without special data requirements, so , which can solve the problem that in the prior art, it is impossible to mine behavior sequences of any length in the original data to determine the operation behavior of the target object on different devices, and then make it possible to generate behaviors belonging to the target object according to the data records of the target object on different devices Sequence, based on the behavior sequence, the knowledge map algorithm can be
  • the above-mentioned processing process for data records includes the following steps: obtaining raw data records of different devices from the smart home system; event) and the action occurrence time of the operation command corresponding to the operation event issued by different devices to execute different objects; determine the action sequence between different actions according to the actual action and the action occurrence time, and then determine the time interval between adjacent actions to calculate Get the behavior sequence data corresponding to different target objects in the smart home system.
  • determining the behavior sequence of the target object according to the time interval includes: obtaining the time interval between every two adjacent operation events to obtain multiple time intervals; for each time interval in the multiple time intervals , determine the size relationship between each time interval and the preset interval threshold, and determine the first tag value of the first feature tag and the second tag value of the second feature tag as the operation event according to the size relationship; according to the first tag value and The second tag value determines the behavioral sequence of the target object.
  • the time interval between every two adjacent operation events so as to combine with the preset interval threshold to determine whether there is a continuous relationship between each two adjacent operation events.
  • the first tag value of the first feature tag and the second tag value of the second feature tag corresponding to the operation event are determined, and the first tag value and the second tag value are further The tag value is used as the attribute feature of the target object to determine the behavior sequence of the target object.
  • determining the first tag value as the feature tag of the operation event according to the size relationship includes: determining that in every two adjacent operation events, when each time interval is greater than a preset interval threshold, The first tag value of the feature tag of the operation event whose action execution time is later is an invalid value; when each time interval is less than or equal to the preset interval threshold, it is determined that the action execution time of each two adjacent operation events is within The first tag value of the feature tag of the subsequent operation event is a valid value.
  • the interval between two actions exceeds 5 minutes, it can be regarded as not a continuous action.
  • each time interval is less than or equal to 5 minutes, it means that the action corresponding to the operation event is in the middle of an action sequence and the feature label
  • the first label value of the feature label is recorded as a valid value (such as: 1). If it is greater than 5 minutes, it means that the two operation events do not exist consecutively, and the first label value of the feature label is recorded as an invalid value (such as: 0).
  • determining the second tag value as the second feature tag of the operation event according to the size relationship includes: determining that every two adjacent operation The second tag value of the feature tag of the operation event whose action execution time is earlier in the event is an invalid value; when each time interval is less than or equal to the preset interval threshold, it is determined that the action is executed in every two adjacent operation events The second tag value of the feature tag of the preceding operation event is a valid value.
  • the second label value is calculated based on the determination of the first label value, and calculates the characteristic label value corresponding to the operation event after the operation event and the operation event before the operation event.
  • determining the behavior sequence of the target object according to the first tag value and the second tag value includes: combining the first tag value and the second tag value corresponding to each operation event to obtain the operation event Data item; determine the execution order of each operation event in the behavior sequence according to the arrangement order of the first tag value and the second tag value in the data item, and identify each operation event; determine the behavior of the target object according to the identification result sequence.
  • the execution order of each operation event in the behavior sequence is determined according to the arrangement order of the first tag value and the second tag value in the data item, and each operation event is identified, including: When the data item is an array of invalid values and effective values, mark the start mark on the current operation event to determine that the current operation event is the start action behavior; Mark the current operation event as an ongoing action by marking it as an ongoing action; when the data item is an arrangement of valid and invalid values, mark the end of the current operation event to determine that the current operation event is an end action.
  • determining the behavior sequence of the target object according to the result of the identification includes: using the target field to record the identification result of each operation event; matching the identification result with the data records of different devices obtained by the target object; using The preset data structure extracts the identification result and the action execution time corresponding to the operation event, and obtains the behavior sequence corresponding to the sequence of operation events used to represent the execution of different devices by the target object.
  • the present disclosure mainly provides a method for calculating a behavior sequence of any length for a smart home user.
  • the complete action sequence of each user is mined from massive data, and then it can be processed into user habits by an algorithm. All users
  • the cold start recommendation of the user forms a complete habit of the user and provides a basis for other algorithms and applications.
  • the first thing to realize the recommendation algorithm is to find the user action sequence, and the smart home system is different from the ordinary shopping system, there is no session (session management or session control) concept.
  • Ordinary shopping systems generally use the concept of session (there are multiple language frameworks and methods for implementation), record all actions of the user in a session, and use this to identify related user behavior intentions.
  • the commonly used data structure (equivalent to the data records in the embodiment of the present disclosure) of the existing Internet of Things network device is shown in Table 1 below: the original data records of smart home users are recorded in the table, and different users are recorded at different times. The time of operating different devices and the corresponding actions and other attributes.
  • the header is user ID, device ID, action occurrence time, action ID, and the last few columns are other attributes.
  • the user ID is the unique number of all users, which can be numbered in a variety of ways, such as mobile phone numbers and other encrypted numbers generated by mobile phone numbers;
  • the device ID is the unique number of all devices, That is, each device has only one number, and there can be the same device but different numbers for different devices.
  • the action occurrence time is the time when the user uses a certain device and gives a certain command to a certain device. It should be noted here that this time is not the time when the command is recorded, but the time when the command is executed. If the command is issued but not executed, no record will be generated.
  • the actual action is the action actually performed when the user uses the device. This time, if multiple actions are generated at the same time, multiple records will be generated.
  • FIG. 3 is a sequence diagram of a data processing and determination behavior sequence performed by a data structure according to an optional embodiment of the present disclosure.
  • FIG. 4 is a schematic diagram of a time action sequence of a certain user according to an optional embodiment of the present disclosure
  • Table 1 is used to represent the action and time relationship diagram of a certain user (equivalent to the target object in the embodiment of the present disclosure)
  • FIG. In 4 draw four block diagrams of actions a, b, c, and d to represent a certain action that occurs at a certain moment, such as: action a.
  • action a There is a directional arrow in the figure pointing to the next action after an action occurs, for example: the arrow goes from action a -> action b. Indicates that action b occurs immediately after a certain user action a occurs.
  • t i-1 For any action i, and set the time of its occurrence as t i , use t i-1 to represent the moment of the previous action of a certain user’s action, and diff i represents the general formula for calculating the time interval of the i-th action for:
  • FIG. 6 is a frame diagram of the value of the feature value mid_beg after calculating the time interval diff according to an optional embodiment of the present disclosure
  • FIG. 7 is a feature according to an optional embodiment of the present disclosure after calculating the time interval diff
  • Mid is used to indicate that a specified number of characters are intercepted from a string, beg is relative to the beginning of the file, and returns an iterator pointing to the first element; end is relative to the end of the file, and an iterator to the element after the end.
  • the diff field is less than or equal to the threshold (for example, the value is 5 minutes), if it is less than or equal to the threshold, it means that the record is in the middle of an action sequence and the label mid_beg is recorded as 1, otherwise it is 0.
  • the threshold for example, the value is 5 minutes
  • FIG. 8 is a schematic diagram (2) of calculation results corresponding to a certain user time action sequence given the value of the feature value mid_beg after calculating the time interval diff according to an optional embodiment of the present disclosure; wherein, the calculation results in FIG. 8 Based on the calculation results in Figure 7, calculate the last value of the attribute of the mid_beg tag of each record, and name it begin_state. That is, start from the results in Figure 7 to calculate the value of mid_beg corresponding to the next action of a certain user, and name this attribute beg_state. When an action has no follow-up actions, the value of the attribute beg_state is null.
  • FIG. 9 is a schematic diagram of a corresponding state of a certain user time action sequence according to an optional embodiment of the present disclosure; the mid_beg and begin_tag in FIG. 8 are combined to determine the data item status, for example: 01 is marked as 'beg', that For the beginning, when the data item status is 11, mark it as 'mid', it is in progress, when the data item combination is 10, mark it as 'end', it is the end, and define a new field to record the result of the mark. Further, the data can be compared with the original data, extracted into required data, and a data structure such as user ID, sequence start time, and sequence data can be formed to obtain the sequence data shown in Table 2 (that is, the behavior in the embodiment of the present disclosure sequence).
  • Table 2 that is, the behavior in the embodiment of the present disclosure sequence.
  • FIG. 10 is a flow chart of performing data processing and determining a behavior sequence according to the data structure of an optional embodiment of the present disclosure; through the above-mentioned method, data results can be processed arbitrarily to generate a sequence. It can be used as the input of artificial intelligence algorithm and machine learning algorithm, or can be directly used for data mining, such as calculating the time of the user's longest action sequence, the number of actions, etc. This data structure can be used as the basis for all user behavior pattern recognition.
  • behavior sequences of arbitrary length can be generated.
  • the key point is the construction of the eigenvectors at the beginning and end of the user sequence, and the protection point is mainly the calculation method of the eigenvectors, because to calculate the generation of the user's complete action sequence algorithm, the complete action sequence is the basis of data mining, machine learning, and artificial intelligence algorithms data structure. Without this structure or a similar one, tasks such as usage data mining, intent recognition, etc. would be impossible. In this way, the behavior data corresponding to the original data can be connected to advanced knowledge map algorithms, etc. Without this data structure, it would be difficult to feed similar raw data into advanced artificial intelligence algorithms. It solves the first step from raw data to various machine learning algorithms and artificial intelligence algorithms, and provides data structure support for similar recommendation algorithms.
  • the method according to the above embodiments can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware, but in many cases the former is better implementation.
  • the technical solution of the present disclosure can be embodied in the form of a software product in essence or the part that contributes to the prior art, and the computer software product is stored in a storage medium (such as ROM/RAM, disk, CD) contains several instructions to enable a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the generation of the behavior sequence described in various embodiments of the present disclosure.
  • This embodiment also provides a device for generating a behavior sequence, which is used to implement the above embodiments and preferred implementation modes, and what has already been described will not be repeated.
  • the term "module” may be a combination of software and/or hardware that realizes a predetermined function.
  • the devices described in the following embodiments are preferably implemented in software, implementations in hardware, or a combination of software and hardware are also possible and contemplated.
  • Fig. 11 is a structural block diagram of an apparatus for generating a behavior sequence according to an embodiment of the present disclosure. As shown in Fig. 11, the apparatus includes:
  • the acquiring module 1102 is configured to acquire the data records of the target object on different devices, wherein the data records include: operation events of the target object on different devices, and action execution time corresponding to the operation events;
  • Sequence module 1104 configured to determine the action execution order of the plurality of operation events according to the sequence of action execution time of the plurality of operation events
  • Determining module 1106 configured to determine the time interval between every two adjacent operation events according to the action execution sequence, and determine the behavior sequence of the target object according to the time interval, wherein the behavior sequence uses Instructing the target object to perform multiple operation events continuously within a preset time period.
  • the data records of the target object on different devices are obtained, wherein the data records include: the operation events of the target object on different devices, and the execution time of actions corresponding to the operation events; the order of execution time of actions according to multiple operation events Determine the action execution sequence of multiple operation events; determine the time interval between every two adjacent operation events according to the action execution order, and determine the behavior sequence of the target object according to the time interval, wherein the behavior sequence is used to indicate that the target object is in the preset Multiple operation events performed continuously within a time period, that is, by extracting the behavior sequence corresponding to the data records of different devices by the target object, and then realizing the processing and mining of the original data without special data requirements, so , which can solve the problem that in the prior art, it is impossible to mine behavior sequences of any length in the original data to determine the operation behavior of the target object on different devices, and then make it possible to generate behaviors belonging to the target object according to the data records of the target object on different devices Sequence, based on the behavior sequence, the knowledge map algorithm can be
  • the above determination module is further configured to obtain the time interval between every two adjacent operation events to obtain multiple time intervals; for each time interval in the multiple time intervals, determine each time interval The size relationship between the interval and the preset interval threshold, and determined according to the size relationship as the first tag value of the first feature tag and the second tag value of the second feature tag of the operation event; determined according to the first tag value and the second tag value The sequence of behaviors of the target object.
  • the above determination module further includes: a first determination unit, configured to determine that the execution time of an action in each two adjacent operation events is later than The first tag value of the feature tag of the operation event is an invalid value; when each time interval is less than or equal to the preset interval threshold, determine the operation event whose action execution time is later in every two adjacent operation events The first label value of the feature label is a valid value.
  • the above-mentioned determination module further includes: a second determination unit, configured to determine that the execution time of the action is earlier in each two adjacent operation events when each time interval is greater than a preset interval threshold The second tag value of the feature tag of the operation event is an invalid value; when each time interval is less than or equal to the preset interval threshold, determine the operation event whose action execution time is earlier in every two adjacent operation events The second tag value of the feature tag is a valid value.
  • the above determination module further includes: an identification unit, configured to combine the first tag value and the second tag value corresponding to each operation event to obtain a data item of the operation event; The arrangement sequence of the first tag value and the second tag value determines the execution sequence of each operation event in the behavior sequence, and identifies each operation event; and determines the behavior sequence of the target object according to the identification result.
  • the above identification unit is also used to mark the current operation event as a start action when the data item is arranged with an invalid value and a valid value, and determine that the current operation event is a start action behavior; In the case of a valid value and an effective value arrangement, mark the current operation event to determine that the current operation event is an action in progress; in the case of a data item that is a valid value and an invalid value arrangement, mark the current operation event with End mark, to determine the current operation event as the end action behavior.
  • the above identification unit is further configured to use the target field to record the identification result of each operation event; match the identification result with the data records of different devices obtained by the target object; use the preset data structure to extract The identification result and the action execution time corresponding to the operation event are used to obtain the behavior sequence corresponding to the sequence of operation events used to represent the execution of different devices by the target object.
  • orientations or positional relationships indicated by the terms “center”, “upper”, “lower”, “front”, “rear”, “left”, “right” etc. are based on The orientations or positional relationships shown in the drawings are only for the convenience of describing the present disclosure and simplifying the description, and do not indicate or imply that the referred devices or components must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as Limitations on this Disclosure.
  • first and second are used for descriptive purposes only, and should not be understood as indicating or implying relative importance.
  • connection should be understood in a broad sense, for example, it can be a fixed connection or a detachable connection , or integrally connected; may be mechanically connected, may also be electrically connected; may be directly connected, may also be indirectly connected through an intermediary, and may be internal communication between two components.
  • an element is referred to as being “fixed on” or “disposed on” another element, it can be directly on the other element or intervening elements may also be present.
  • a component is said to be “connected” to another element, it may be directly connected to the other element or intervening elements may also be present.
  • the above-mentioned modules can be realized by software or hardware. For the latter, it can be realized by the following methods, but not limited to this: the above-mentioned modules are all located in the same processor; or, the above-mentioned modules can be combined in any combination The forms of are located in different processors.
  • Embodiments of the present disclosure also provide a storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps in any one of the above method embodiments when running.
  • the above-mentioned storage medium may be configured to store a computer program for performing the following steps:
  • the above-mentioned storage medium may include but not limited to: U disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as Various media that can store computer programs such as RAM), mobile hard disk, magnetic disk or optical disk.
  • Embodiments of the present disclosure also provide an electronic device, including a memory and a processor, where a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
  • the electronic device may further include a transmission device and an input and output device, wherein the transmission device is connected to the processor, and the input and output device is connected to the processor.
  • the above-mentioned processor may be configured to execute the following steps through a computer program:
  • each module or each step of the above-mentioned disclosure can be realized by a general-purpose computing device, and they can be concentrated on a single computing device, or distributed in a network composed of multiple computing devices above, in an exemplary embodiment, they may be implemented in program code executable by a computing device, thus, they may be stored in a storage device to be executed by a computing device, and in some cases, may be different from The steps shown or described here are performed sequentially, or they are fabricated into individual integrated circuit modules, or multiple modules or steps among them are fabricated into a single integrated circuit module. As such, the present disclosure is not limited to any specific combination of hardware and software.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Mathematical Physics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Software Systems (AREA)
  • Fuzzy Systems (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • General Business, Economics & Management (AREA)
  • Computing Systems (AREA)
  • Accounting & Taxation (AREA)
  • Business, Economics & Management (AREA)
  • Structural Engineering (AREA)
  • Civil Engineering (AREA)
  • Architecture (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Animal Behavior & Ethology (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本公开提供了一种行为序列的生成方法及装置、存储介质、电子装置,上述方法包括:获取目标对象对不同设备的数据记录,其中,数据记录包括:目标对象对不同设备的操作事件,以及操作事件对应的动作执行时间;根据多个操作事件的动作执行时间的先后顺序确定多个操作事件的动作执行顺序;根据动作执行顺序确定每两个相邻的操作事件的时间间隔,并根据时间间隔确定目标对象的行为序列,其中,行为序列用于指示目标对象在预设时间段内连续执行的多个操作事件。

Description

行为序列的生成方法及装置、存储介质、电子装置
本公开要求于2022年01月27日提交中国专利局、申请号为202210103398.6、发明名称“行为序列的生成方法及装置、存储介质、电子装置”的中国专利申请的优先权,其全部内容通过引用结合在本公开中。
技术领域
本公开涉及通信领域,具体而言,涉及一种行为序列的生成方法及装置、存储介质、电子装置。
背景技术
随着智能家居系统的应用,基于智能家居的推荐系统的应用越来越多。为了能够应用各种人工智能推荐算法及数据挖掘的需求,需要一个算法能够对原始的单个零散的用户行为数据进行处理,以便满足更复杂的算法及数据挖掘的需求。
针对相关技术中,无法在原始数据中进行任意长度行为序列挖掘,以确定目标对象对不同设备的操作行为等问题,尚未提出有效的技术方案。
发明内容
本公开实施例提供了一种行为序列的生成方法及装置、存储介质、电子装置,以至少解决相关技术中,无法在原始数据中进行任意长度行为序列挖掘,以确定目标对象对不同设备的操作行为等问题。
根据本公开的一个实施例,提供了一种行为序列的生成方法,包括:获取目标对象对不同设备的数据记录,其中,数据记录包括:目标对象对不同设备的操作事件,以及操作事件对应的动作执行时间;根据多个操作事件的动作执行时间的先后顺序确定多个操作事件的动作执行顺序;根据动作执行顺序确定每两个相邻的操作事件的时间间隔,并根据时间间隔确定目标对象的行为序列,其中,行为序列用于指示目标对象在预设时间段内连续执行的多个操作事件。
根据本公开的另一个实施例,提供了一种行为序列的生成装置,包括:获取模块,设置为获取目标对象对不同设备的数据记录,其中,所述数据记录包括:所述目标对象对不同设备的操作事件,以及所述操作事件对应的动作执行时间;顺序模块,设置为根据多个所述操作事件的动作执行时间的先后顺序确定多个所述操作事件的动作执行顺序;确定模块,设置为根据所述动作执行顺序确定每两个相邻的操作事件的时间间隔,并根据所述时间间隔确定所述目标对象的行为序列,其中,所述行为序列用于指示所述目标对象在预设时间段内连续执行的多个操作事件。
根据本公开的又一个实施例,还提供了一种存储介质,所述存储介质中存储有计算机程序,其中,所述计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。
根据本公开的又一个实施例,还提供了一种电子装置,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器被设置为运行所述计算机程序以执行上述任一项方法实施例中的步骤。
通过本公开,获取目标对象对不同设备的数据记录,其中,数据记录包括:目标对象对不同设备的操作事件,以及操作事件对应的动作执行时间;根据多个操作事件的动作执行时间的先后顺序确定多个操作事件的动作执行顺序;根据动作执行顺序确定每两个相邻的操作事件的时间间隔,并根据时间间隔确定目标对象的行为序列,其中,行为序列用于指示目标对象在预设时间段内连续执行的多个操作事件,也就是说,通过提取目标对象对不同设备的数据记录对应的行为序列,进而在不存在特殊数据要求的情况下,实现对原始数据的处理挖掘,因此,可以解决现有技术中无法在原始数据中进行任意长度行为序列挖掘,以确定目标对象对不同设备的操作行为等问题,进而使得可以根据目标对象对不同设备的数据记录生成属于目标对象的行为序列,基于行为序列利用知识图谱算法可以对目标对象的行为习惯进行更好的预测,从而可以提升目标对象的对于智能设备的操作体验,使得从原始数据到各种机器学习算法及人工智能算法的第一步变得更加便捷、高效、准确。
附图说明
此处所说明的附图用来提供对本公开的进一步理解,构成本公开的一部分,本公开的示意性实施例及其说明用于解释本公开,并不构成对本公开的不当限定。在附图中:
图1是本公开实施例的一种行为序列的生成方法的云端的硬件结构框图;
图2是根据本公开实施例的行为序列的生成方法的流程图;
图3是根据本公开可选实施例的数据结构进行数据处理确定行为序列的时序图;
图4是根据本公开可选实施例的某个用户时间动作序列示意图;
图5是根据本公开可选实施例的计算某一个用户任意两个连续动作之间的时间间隔的示意图;
图6是根据本公开可选实施例的计算时间间隔后给出特征值的值的框架图;
图7是根据本公开可选实施例的计算时间间隔后给出特征值的值的某一个用户时间动作序列对应计算结果示意图(一);
图8是根据本公开可选实施例的计算时间间隔后给出特征值的值的某一个用户时间动作序列对应计算结果示意图(二);
图9是根据本公开可选实施例的某一个用户时间动作序列对应状态的示意图;
图10是根据本公开可选实施例的数据结构进行数据处理确定行为序列的流程图;
图11是根据本公开实施例的行为序列的生成装置的结构框图。
具体实施方式
下文中将参考附图并结合实施例来详细说明本公开。需要说明的是, 在不冲突的情况下,本公开中的实施例及实施例中的特征可以相互组合。
需要说明的是,本公开的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。
本公开实施例所提供的方法实施例可以在计算机终端或者云端类似的运算装置中执行。以运行在云端上为例,图1是本公开实施例的一种行为序列的生成方法的云端的硬件结构框图。如图1所示,云端可以包括一个或多个(图1中仅示出一个)处理器102(处理器102可以包括但不限于微处理器MCU或可编程逻辑器件FPGA等的处理装置)和用于存储数据的存储器104,在一个示例性实施例中,上述云端还可以包括用于通信功能的传输设备106以及输入输出设备108。本领域普通技术人员可以理解,图1所示的结构仅为示意,其并不对上述云端的结构造成限定。例如,云端还可包括比图1中所示更多或者更少的组件,或者具有与图1所示等同功能或比图1所示功能更多的不同的配置。
存储器104可用于存储计算机程序,例如,应用软件的软件程序以及模块,如本公开实施例中的行为序列的生成方法对应的计算机程序,处理器102通过运行存储在存储器104内的计算机程序,从而执行各种功能应用以及数据处理,即实现上述的方法。存储器104可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器104可进一步包括相对于处理器102远程设置的存储器,这些远程存储器可以通过网络连接至云端。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
传输装置106用于经由一个网络接收或者发送数据。上述的网络具体实例可包括云端的通信供应商提供的无线网络。在一个实例中,传输装置106包括一个网络适配器(Network Interface Controller,简称为NIC),其可通过基站与其他网络设备相连从而可与互联网进行通讯。在一个实例中, 传输装置106可以为射频(Radio Frequency,简称为RF)模块,其用于通过无线方式与互联网进行通讯。
在本实施例中提供了一种行为序列的生成方法,图2是根据本公开实施例的行为序列的生成方法的流程图,该流程包括如下步骤:
步骤S202,获取目标对象对不同设备的数据记录,其中,所述数据记录包括:所述目标对象对不同设备的操作事件,以及所述操作事件对应的动作执行时间;
例如,不同的目标对象具有不同行为特征,在对数据记录处理之前,还可以通过原始数据中存在的对象标识来对区分出不同目标对象对应的不同设备的数据记录集合。
步骤S204,根据多个所述操作事件的动作执行时间的先后顺序确定多个所述操作事件的动作执行顺序;
也就是说,为了便于进行后续行为序列的处理,在得到任意一个目标对象对于不同设备的数据记录后,通过数据记录中携带的操作事件对应的动作执行时间对多个操作事件进行时间排序,确定每一个操作事件被目标对象执行的动作执行顺序。
步骤S206,根据所述动作执行顺序确定每两个相邻的操作事件的时间间隔,并根据所述时间间隔确定所述目标对象的行为序列,其中,所述行为序列用于指示所述目标对象在预设时间段内连续执行的多个操作事件。
通过上述步骤,获取目标对象对不同设备的数据记录,其中,数据记录包括:目标对象对不同设备的操作事件,以及操作事件对应的动作执行时间;根据多个操作事件的动作执行时间的先后顺序确定多个操作事件的动作执行顺序;根据动作执行顺序确定每两个相邻的操作事件的时间间隔,并根据时间间隔确定目标对象的行为序列,其中,行为序列用于指示目标对象在预设时间段内连续执行的多个操作事件,也就是说,通过提取目标对象对不同设备的数据记录对应的行为序列,进而在不存在特殊数据要求 的情况下,实现对原始数据的处理挖掘,因此,可以解决现有技术中无法在原始数据中进行任意长度行为序列挖掘,以确定目标对象对不同设备的操作行为等问题,进而使得可以根据目标对象对不同设备的数据记录生成属于目标对象的行为序列,基于行为序列利用知识图谱算法可以对目标对象的行为习惯进行更好的预测,从而可以提升目标对象的对于智能设备的操作体验,使得从原始数据到各种机器学习算法及人工智能算法的第一步变得更加便捷、高效、准确。
例如,上述对于数据记录的处理过程包括以下步骤:从智能家居系统中获取不同设备的原始数据记录;解析原始数据记录,提取原始数据记录中存在的不同对象使用不同设备的实际发生动作(即操作事件)以及不同设备执行不同对象发出的操作事件对应操作指令的动作发生时间;根据实际发生动作和动作发生时间确定不同动作之间的动作时序,进而确定相邻动作之间的时间间隔,以计算出智能家居系统中不同目标对象对应的行为序列数据。
在一个示例性实施例中,根据时间间隔确定目标对象的行为序列,包括:获取每两个相邻的操作事件的时间间隔,得到多个时间间隔;对于多个时间间隔中的每一时间间隔,确定每一时间间隔与预设间隔阈值的大小关系,并根据大小关系确定为操作事件的第一特征标签的第一标签值和第二特征标签的第二标签值;根据第一标签值和第二标签值确定目标对象的行为序列。
简单来说,为了确保不同操作事件之间的连续关系,因此,需要确定每两个相邻的操作事件的时间间隔,以结合预设间隔阈值,确定每两个相邻的操作事件是否存在连续性,并依据每一时间间隔与预设间隔阈值的大小关系确定出操作事件对应第一特征标签的第一标签值和第二特征标签的第二标签值,进一步将第一标签值和第二标签值作为目标对象的属性特征,确定出目标对象的行为序列。
在一个示例性实施例中,根据大小关系确定为操作事件的特征标签的 第一标签值,包括:在每一时间间隔大于预设间隔阈值的情况下,确定每两个相邻的操作事件中动作执行时间在后的操作事件的特征标签的第一标签值为无效值;在每一时间间隔小于或等于预设间隔阈值的情况下,确定每两个相邻的操作事件中动作执行时间在后的操作事件的特征标签的第一标签值为有效值。
例如,若某两个动作之间间隔超过5分钟,则可以看做不是连续动作,当每一时间间隔小于等于5分钟时,说明该操作事件对应的动作为一个动作序列的中间并将特征标签的第一标签值记为有效值(如:1),若大于5分钟时说明两个操作事件不存在连续,将特征标签的第一标签值记为无效值(如:0)。
在一个示例性实施例中,根据大小关系确定为操作事件的第二特征标签的第二标签值,包括:在每一时间间隔大于预设间隔阈值的情况下,确定每两个相邻的操作事件中动作执行时间在前的操作事件的特征标签的第二标签值为无效值;在每一时间间隔小于或等于预设间隔阈值的情况下,确定每两个相邻的操作事件中动作执行时间在前的操作事件的特征标签的第二标签值为有效值。
需要说明是,第二标值是在确定第一标签值的基础上,计算操作事件后一个操作事件与前一个操作事件对应的特征标签值。
在一个示例性实施例中,根据第一标签值和第二标签值确定目标对象的行为序列,包括:将每一操作事件对应的第一标签值和第二标签值进行组合,得到操作事件的数据项;根据数据项中的第一标签值和第二标签值的排列顺序确定每一操作事件在行为序列中的执行顺序,并对每一操作事件进行标识;根据标识结果确定目标对象的行为序列。
在一个示例性实施例中,根据数据项中的第一标签值和第二标签值的排列顺序确定每一操作事件在行为序列中的执行顺序,并对每一操作事件进行标识,包括:在数据项为无效值与有效值排列的情况下,对当前操作事件上打上开始标识,确定当前操作事件为开始动作行为;在数据项为有 效值与有效值排列的情况下,对当前操作事件上打上进行标识,确定当前操作事件为进行中动作行为;在数据项为有效值与无效值排列的情况下,对当前操作事件上打上结束标识,确定当前操作事件为结束动作行为。
在一个示例性实施例中,根据标识的结果确定目标对象的行为序列,包括:使用目标字段记录每一操作事件的标识结果;将标识结果与获取目标对象对不同设备的数据记录进行匹配;使用预设的数据结构抽取标识结果以及操作事件对应的动作执行时间,得到用于表征目标对象执行不同设备的操作事件顺序对应的行为序列。
为了更好的理解上述行为序列的生成方法的过程,以下结合两个可选实施例对上述行为序列的生成方法流程进行说明。
本公开可选实施例中,主要提供了一种计算智能家居用户任意长度行为序列的方法,将用户每次完整的动作序列从海量数据中挖掘出来,然后才能用算法加工成用户习惯,所有用户的冷启动推荐,形成用户完整的习惯,为其他算法及应用提供了一个基础。
作为一种可选的实施方式,在智能家居物联网推荐系统中,推荐算法的进行,首先要实现的就是发现用户动作序列,而智能家居系统与普通的购物系统不同,没有session(会话管理或者会话控制)这个概念。普通的购物系统一般会使用session这个概念(实现有多种语言框架及方式),记录用户在一个session中所有的动作,并以此进行相关的用户行为意图识别。
可选的,现有物联网网器的常用数据结构(相当本公开实施例中的数据记录),如下表1所示:表中为智能家居用户的原始数据记录,记录了不同用户在不同时间操作不同设备的时间及对用的动作和其他属性。表中,表头为用户ID、设备ID、动作发生时间、动作ID,最后若干列为其他属性。
表1
数据 用户ID 设备ID 动作发送时间 实际发送时间 其他属性
记录1 USER1 DEVICE1 TIME-STAMP1 ACTION1 OTHERS
记录2 USER2 DEVICE2 TIME-STAMP2 ACTION1 OTHERS
记录3 USER3 DEVICE2 TIME-STAMP3 ACTION1 OTHERS
需要说明的是,用户ID即为,所有用户中用户的唯一编号,可以采用多种方式编号,如手机号及手机号生成的其他加密编号;设备ID即为,所有的设备中唯一的编号,即每个设备只有一个的编号,可以有相同设备但不同设备的编号不同。动作发生时间即为,当用户使用了某个设备并给与某个设备某个指令时发生的时间,该处要注意此时间并非为指令被记录时间,而是指令被执行的时间。若是指令发出没有被执行,则不产生记录。实际发生动作即为,用户使用设备时,实际执行的动作。此次若一个时间同时产生多个动作,则产生多条记录。但由于计算机是用毫秒计算时间的,故此处基本上不太可能产生一个时间有多个动作的情况。其他属性可以记录多种属性,如用户年龄、性别、设备使用了多久等,以方便推荐算法及数据挖掘的工作。
可选的,图3是根据本公开可选实施例的数据结构进行数据处理确定行为序列的时序图。
可选的,图4是根据本公开可选实施例的某个用户时间动作序列示意图;使用表1表示某一个用户(相当于本公开实施例中的目标对象)的动作及时间关系图,图4中画出四个动作a、b、c、d方框图表示某个时刻发生的某一个动作如:动作a。图中有向箭头指向某个动作发生后的后一个动作,例如:箭头从动作a->动作b。表示某一个用户动作a发生后紧接着发生动作b。
可选的,图5是根据本公开可选实施例的计算某一个用户任意两个连续动作之间的时间间隔的示意图;图5中每个动作分别计算各自的时间间隔,以动作d为例,其计算公式为:diff d=d t-c t;其中,diff d表示动作 d的时间间隔,d t表示动作d发生的时间,c t表示动作d的前一个动作c发生的时间。若动作a之间没有动作(如用户是新用户)则用null t表示,其值可以设置为计算机系统初始时间或一个很早的时间如1700年。对于任意一个动作i,并且设其发生的时间为t i,用t i-1表示某一个用户的某个动作发生的前一个动作的时刻,diff i表示第i个动作计算时间间隔的通用公式为:
diff i=t i-t i-1
可选的,图6是根据本公开可选实施例的计算时间间隔diff后给出特征值mid_beg的值的框架图;图7是根据本公开可选实施例的计算时间间隔diff后给出特征值mid_beg的值的某一个用户时间动作序列对应计算结果示意图(一);例如,若某两个动作之间间隔超过5分钟,则可以看做不是连续动作。Mid用于指示从一个字符串中截取出指定数量的字符,beg相对于文件首,返回指向首元素的迭代器;end相对于文件尾,尾后元素的迭代器。如图5判断diff字段是否小于等于阈值(如按取值为5分钟),小于等于阈值,则说明该记录为一个动作序列的中间并将标签mid_beg记录为1,否则为0。
可选的,图8是根据本公开可选实施例的计算时间间隔diff后给出特征值mid_beg的值的某一个用户时间动作序列对应计算结果示意图(二);其中,图8中的计算结果是在图7计算结果的基础上计算每条记录mid_beg标签的属性的后一项值,并将其命名为begin_state。即从图7的结果出发计算某个用户某个动作对应的后一个动作对应的mid_beg的值,并将这个属性命名为beg_state。当某个动作没有后续动作时则beg_state这个属性的值为null。
可选的,图9是根据本公开可选实施例的某一个用户时间动作序列对应状态的示意图;对图8中的mid_beg、begin_tag进行组合确定数据项状态,例如:01标识为'beg'即为开始,当数据项状态为11时,标识为'mid'即为进行中,当数据项组合为10时,标识为'end'即为结束,并定义一个新的字段来记录标识的结果。进一步,可以将该数据与原始数据比较,抽 取成需要的数据,形成用户ID,序列开始时间,序列数据这样的数据结构,得到如表2所示的序列数据(即本公开实施例中的行为序列)。
表2
数据 用户ID 序列开始时间 序列值 其他属性
记录1 用户1 t1 a、b、c  
记录2 用户2 t2    
需要说明的是,图10是根据本公开可选实施例的数据结构进行数据处理确定行为序列的流程图;通过上述方式可以对数据结果进行任意处理,生成序列。能够作为人工智能算法及机器学习算法的输入,或者可以直接进行数据挖掘,如计算出用户持续最长动作序列的时间,动作数量等。该数据结构可以作为所有用户行为模式识别的基础。
综上,通过本公开可选实施例,能够对任意长度的行为序列进行生成。关键点是用户序列开始结束的特征向量构建,保护点是主要是特征向量的计算方法,因为若要计算用户完整动作序列算法的生成,完整动作序列为数据挖掘、机器学习、人工智能算法的基础数据结构。无该结构或类似的结构会无法进行使用数据挖掘、意图识别等任务。如此能够使得原始数据对应的行为数据可以对接高级的知识图谱算法等。没有这种数据结构,将很难将类似的原始数据导入到高级人工智能算法中去。解决了从原始数据到各种机器学习算法及人工智能算法的第一步,为进行类似的推荐算法提供数据结构的支撑。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本公开的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如 ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本公开各个实施例所述行为序列的生成。
在本实施例中还提供了一种行为序列的生成装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。
图11是根据本公开实施例的行为序列的生成装置的结构框图,如图11所示,该装置包括:
(1)获取模块1102,设置为获取目标对象对不同设备的数据记录,其中,所述数据记录包括:所述目标对象对不同设备的操作事件,以及所述操作事件对应的动作执行时间;
(2)顺序模块1104,设置为根据多个所述操作事件的动作执行时间的先后顺序确定多个所述操作事件的动作执行顺序;
(3)确定模块1106,设置为根据所述动作执行顺序确定每两个相邻的操作事件的时间间隔,并根据所述时间间隔确定所述目标对象的行为序列,其中,所述行为序列用于指示所述目标对象在预设时间段内连续执行的多个操作事件。
通过上述装置,获取目标对象对不同设备的数据记录,其中,数据记录包括:目标对象对不同设备的操作事件,以及操作事件对应的动作执行时间;根据多个操作事件的动作执行时间的先后顺序确定多个操作事件的动作执行顺序;根据动作执行顺序确定每两个相邻的操作事件的时间间隔,并根据时间间隔确定目标对象的行为序列,其中,行为序列用于指示目标对象在预设时间段内连续执行的多个操作事件,也就是说,通过提取目标对象对不同设备的数据记录对应的行为序列,进而在不存在特殊数据要求的情况下,实现对原始数据的处理挖掘,因此,可以解决现有技术中无法 在原始数据中进行任意长度行为序列挖掘,以确定目标对象对不同设备的操作行为等问题,进而使得可以根据目标对象对不同设备的数据记录生成属于目标对象的行为序列,基于行为序列利用知识图谱算法可以对目标对象的行为习惯进行更好的预测,从而可以提升目标对象的对于智能设备的操作体验,使得从原始数据到各种机器学习算法及人工智能算法的第一步变得更加便捷、高效、准确。
在一个示例性实施例中,上述确定模块,还用于获取每两个相邻的操作事件的时间间隔,得到多个时间间隔;对于多个时间间隔中的每一时间间隔,确定每一时间间隔与预设间隔阈值的大小关系,并根据大小关系确定为操作事件的第一特征标签的第一标签值和第二特征标签的第二标签值;根据第一标签值和第二标签值确定目标对象的行为序列。
在一个示例性实施例中,上述确定模块还包括:第一确定单元,用于在每一时间间隔大于预设间隔阈值的情况下,确定每两个相邻的操作事件中动作执行时间在后的操作事件的特征标签的第一标签值为无效值;在每一时间间隔小于或等于预设间隔阈值的情况下,确定每两个相邻的操作事件中动作执行时间在后的操作事件的特征标签的第一标签值为有效值。
在一个示例性实施例中,上述确定模块还包括:第二确定单元,用于在每一时间间隔大于预设间隔阈值的情况下,确定每两个相邻的操作事件中动作执行时间在前的操作事件的特征标签的第二标签值为无效值;在每一时间间隔小于或等于预设间隔阈值的情况下,确定每两个相邻的操作事件中动作执行时间在前的操作事件的特征标签的第二标签值为有效值。
在一个示例性实施例中,上述确定模块还包括:标识单元,用于将每一操作事件对应的第一标签值和第二标签值进行组合,得到操作事件的数据项;根据数据项中的第一标签值和第二标签值的排列顺序确定每一操作事件在行为序列中的执行顺序,并对每一操作事件进行标识;根据标识结果确定目标对象的行为序列。
在一个示例性实施例中,上述标识单元,还用于在数据项为无效值与 有效值排列的情况下,对当前操作事件上打上开始标识,确定当前操作事件为开始动作行为;在数据项为有效值与有效值排列的情况下,对当前操作事件上打上进行标识,确定当前操作事件为进行中动作行为;在数据项为有效值与无效值排列的情况下,对当前操作事件上打上结束标识,确定当前操作事件为结束动作行为。
在一个示例性实施例中,上述标识单元,还用于使用目标字段记录每一操作事件的标识结果;将标识结果与获取目标对象对不同设备的数据记录进行匹配;使用预设的数据结构抽取标识结果以及操作事件对应的动作执行时间,得到用于表征目标对象执行不同设备的操作事件顺序对应的行为序列。
在本公开的描述中,需要理解的是,术语中“中心”、“上”、“下”、“前”、“后”、“左”、“右”等指示的方位或位置关系为基于附图所示的方位或位置关系,仅是为了便于描述本公开和简化描述,而不是指示或暗示所指的装置或组件必须具有特定的方位、以特定的方位构造和操作,因此不能理解为对本公开的限制。此外,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性。
在本公开的描述中,需要说明的是,除非另有明确的规定和限定,术语“安装”、“连接”、“相连”应做广义理解,例如,可以是固定连接,也可以是拆卸连接,或一体地连接;可以是机械连接,也可以是电连接;可以是直接相连,也可以是通过中间媒介间接相连,可以是两个组件内部的连通。当组件被称为“固定于”或“设置于”另一个元件,它可以直接在另一个组件上或者也可以存在居中的组件。当一个组件被认为是“连接”另一个元件,它可以是直接连接到另一个元件或者可能同时存在居中元件。对于本领域的普通技术人员而言,可以具体情况理解上述术语在本公开的具体含义。
需要说明的是,上述各个模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器 中;或者,上述各个模块以任意组合的形式分别位于不同的处理器中。
本公开的实施例还提供了一种存储介质,该存储介质中存储有计算机程序,其中,该计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。
在一个示例性实施例中,在本实施例中,上述存储介质可以被设置为存储用于执行以下步骤的计算机程序:
S1,获取目标对象对不同设备的数据记录,其中,所述数据记录包括:所述目标对象对不同设备的操作事件,以及所述操作事件对应的动作执行时间;
S2,根据多个所述操作事件的动作执行时间的先后顺序确定多个所述操作事件的动作执行顺序;
S3,根据所述动作执行顺序确定每两个相邻的操作事件的时间间隔,并根据所述时间间隔确定所述目标对象的行为序列,其中,所述行为序列用于指示所述目标对象在预设时间段内连续执行的多个操作事件。
在一个示例性实施例中,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(Read-Only Memory,简称为ROM)、随机存取存储器(Random Access Memory,简称为RAM)、移动硬盘、磁碟或者光盘等各种可以存储计算机程序的介质。
本公开的实施例还提供了一种电子装置,包括存储器和处理器,该存储器中存储有计算机程序,该处理器被设置为运行计算机程序以执行上述任一项方法实施例中的步骤。
在一个示例性实施例中,上述电子装置还可以包括传输设备以及输入输出设备,其中,该传输设备和上述处理器连接,该输入输出设备和上述处理器连接。
在一个示例性实施例中,在本实施例中,上述处理器可以被设置为通过计算机程序执行以下步骤:
S1,获取目标对象对不同设备的数据记录,其中,所述数据记录包括:所述目标对象对不同设备的操作事件,以及所述操作事件对应的动作执行时间;
S2,根据多个所述操作事件的动作执行时间的先后顺序确定多个所述操作事件的动作执行顺序;
S3,根据所述动作执行顺序确定每两个相邻的操作事件的时间间隔,并根据所述时间间隔确定所述目标对象的行为序列,其中,所述行为序列用于指示所述目标对象在预设时间段内连续执行的多个操作事件。
在一个示例性实施例中,本实施例中的具体示例可以参考上述实施例及可选实施方式中所描述的示例,本实施例在此不再赘述。
显然,本领域的技术人员应该明白,上述的本公开的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,在一个示例性实施例中,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本公开不限制于任何特定的硬件和软件结合。
以上所述仅为本公开的优选实施例而已,并不用于限制本公开,对于本领域的技术人员来说,本公开可以有各种更改和变化。凡在本公开的原则之内,所作的任何修改、等同替换、改进等,均应包含在本公开的保护范围之内。

Claims (16)

  1. 一种行为序列的生成方法,包括:
    获取目标对象对不同设备的数据记录,其中,所述数据记录包括:所述目标对象对不同设备的操作事件,以及所述操作事件对应的动作执行时间;
    根据多个所述操作事件的动作执行时间的先后顺序确定多个所述操作事件的动作执行顺序;
    根据所述动作执行顺序确定每两个相邻的操作事件的时间间隔,并根据所述时间间隔确定所述目标对象的行为序列,其中,所述行为序列用于指示所述目标对象在预设时间段内连续执行的多个操作事件。
  2. 根据权利要求1所述行为序列的生成方法,其中,根据所述时间间隔确定所述目标对象的行为序列,包括:
    获取所述每两个相邻的操作事件的时间间隔,得到多个时间间隔;
    对于所述多个时间间隔中的每一时间间隔,确定所述每一时间间隔与预设间隔阈值的大小关系,并根据所述大小关系确定为所述操作事件的第一特征标签的第一标签值和第二特征标签的第二标签值;
    根据所述第一标签值和所述第二标签值确定所述目标对象的行为序列。
  3. 根据权利要求2所述行为序列的生成方法,其中,根据所述大小关系确定为所述操作事件的特征标签的第一标签值,包括:
    在所述每一时间间隔大于预设间隔阈值的情况下,确定所述每两个相邻的操作事件中动作执行时间在后的操作事件的特征标签的第一标签值为无效值;
    在所述每一时间间隔小于或等于预设间隔阈值的情况下,确定所述每两个相邻的操作事件中动作执行时间在后的操作事件的特征标签的第一标签值为有效值。
  4. 根据权利要求2所述行为序列的生成方法,其中,根据所述大小关系确定为所述操作事件的第二特征标签的第二标签值,包括:
    在所述每一时间间隔大于预设间隔阈值的情况下,确定所述每两个相邻的操作事件中动作执行时间在前的操作事件的特征标签的第二标签值为无效值;
    在所述每一时间间隔小于或等于预设间隔阈值的情况下,确定所述每两个相邻的操作事件中动作执行时间在前的操作事件的特征标签的第二标签值为有效值。
  5. 根据权利要求2所述行为序列的生成方法,其中,根据所述第一标签值和所述第二标签值确定所述目标对象的行为序列,包括:
    将每一操作事件对应的第一标签值和所述第二标签值进行组合,得到所述操作事件的数据项;
    根据所述数据项中的第一标签值和第二标签值的排列顺序确定所述每一操作事件在行为序列中的执行顺序,并对所述每一操作事件进行标识;
    根据标识结果确定所述目标对象的行为序列。
  6. 根据权利要求5所述行为序列的生成方法,其中,根据所述数据项中的第一标签值和第二标签值的排列顺序确定所述每一操作事件在行为序列中的执行顺序,并对所述每一操作事件进行标识,包括:
    在所述数据项为无效值与有效值排列的情况下,对当前操作事件上打上开始标识,确定当前操作事件为开始动作行为;
    在所述数据项为有效值与有效值排列的情况下,对当前操作事件上打上进行标识,确定当前操作事件为进行中动作行为;
    在所述数据项为有效值与无效值排列的情况下,对当前操作事件上打上结束标识,确定当前操作事件为结束动作行为。
  7. 根据权利要求5所述行为序列的生成方法,其中,根据标识的结果确定所述目标对象的行为序列,包括:
    使用目标字段记录每一操作事件的标识结果,其中,所述目标字段为;
    将所述标识结果与获取目标对象对不同设备的数据记录进行匹配;
    使用预设的数据结构抽取所述标识结果以及所述操作事件对应的动作执行时间,得到用于表征所述目标对象执行不同设备的操作事件顺序对应的行为序列。
  8. 一种行为序列的生成装置,包括:
    获取模块,设置为获取目标对象对不同设备的数据记录,其中,所述数据记录包括:所述目标对象对不同设备的操作事件,以及所述操作事件对应的动作执行时间;
    顺序模块,设置为根据多个所述操作事件的动作执行时间的先后顺序确定多个所述操作事件的动作执行顺序;
    确定模块,设置为根据所述动作执行顺序确定每两个相邻的操作事件的时间间隔,并根据所述时间间隔确定所述目标对象的行为序列,其中,所述行为序列用于指示所述目标对象在预设时间段内连续执行的多个操作事件。
  9. 根据权利要求8所述行为序列的生成装置,其中,所述确定模块,还用于获取每两个相邻的操作事件的时间间隔,得到多个时间间隔;对于多个时间间隔中的每一时间间隔,确定每一时间间隔与预设间隔阈值的大小关系,并根据大小关系确定为操作事件的第一特征标签的第一标签值和第二特征标签的第二标签值;根据第一标签值和第二标签值确定目标对象的行为序列。
  10. 根据权利要求8所述行为序列的生成装置,其中,所述确定模块还包 括:第一确定单元,用于在每一时间间隔大于预设间隔阈值的情况下,确定每两个相邻的操作事件中动作执行时间在后的操作事件的特征标签的第一标签值为无效值;在每一时间间隔小于或等于预设间隔阈值的情况下,确定每两个相邻的操作事件中动作执行时间在后的操作事件的特征标签的第一标签值为有效值。
  11. 根据权利要求8所述行为序列的生成装置,其中,所述确定模块还包括:第二确定单元,用于在每一时间间隔大于预设间隔阈值的情况下,确定每两个相邻的操作事件中动作执行时间在前的操作事件的特征标签的第二标签值为无效值;在每一时间间隔小于或等于预设间隔阈值的情况下,确定每两个相邻的操作事件中动作执行时间在前的操作事件的特征标签的第二标签值为有效值。
  12. 根据权利要求8所述行为序列的生成装置,其中,所述确定模块还包括:标识单元,用于将每一操作事件对应的第一标签值和第二标签值进行组合,得到操作事件的数据项;根据数据项中的第一标签值和第二标签值的排列顺序确定每一操作事件在行为序列中的执行顺序,并对每一操作事件进行标识;根据标识结果确定目标对象的行为序列。
  13. 根据权利要求12所述行为序列的生成装置,其中,所述标识单元,还用于在数据项为无效值与有效值排列的情况下,对当前操作事件上打上开始标识,确定当前操作事件为开始动作行为;在数据项为有效值与有效值排列的情况下,对当前操作事件上打上进行标识,确定当前操作事件为进行中动作行为;在数据项为有效值与无效值排列的情况下,对当前操作事件上打上结束标识,确定当前操作事件为结束动作行为。
  14. 根据权利要求12所述行为序列的生成装置,其中,所述标识单元,还用于使用目标字段记录每一操作事件的标识结果;将标识结果与获取目标对象对不同设备的数据记录进行匹配;使用预设的数据结构抽取标识结果以及操作事件对应的动作执行时间,得到用于表征目标对象执行不 同设备的操作事件顺序对应的行为序列。
  15. 一种计算机可读的存储介质,其中,所述存储介质中存储有计算机程序,其中,所述计算机程序被设置为运行时执行所述权利要求1至7任一项中所述行为序列的生成。
  16. 一种电子装置,包括存储器和处理器,其中,所述存储器中存储有计算机程序,所述处理器被设置为运行所述计算机程序以执行所述权利要求1至7任一项中所述行为序列的生成。
PCT/CN2022/100202 2022-01-27 2022-06-21 行为序列的生成方法及装置、存储介质、电子装置 WO2023142349A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210103398.6A CN114547140A (zh) 2022-01-27 2022-01-27 行为序列的生成方法及装置、存储介质、电子装置
CN202210103398.6 2022-01-27

Publications (1)

Publication Number Publication Date
WO2023142349A1 true WO2023142349A1 (zh) 2023-08-03

Family

ID=81673563

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/100202 WO2023142349A1 (zh) 2022-01-27 2022-06-21 行为序列的生成方法及装置、存储介质、电子装置

Country Status (2)

Country Link
CN (1) CN114547140A (zh)
WO (1) WO2023142349A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114547140A (zh) * 2022-01-27 2022-05-27 青岛海尔科技有限公司 行为序列的生成方法及装置、存储介质、电子装置

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180307544A1 (en) * 2017-04-21 2018-10-25 International Business Machines Corporation Event sequence management
CN109542944A (zh) * 2018-09-29 2019-03-29 广东工业大学 基于时序因果关系分析的智能家居用户操控行为推荐方法
US20190180166A1 (en) * 2017-12-08 2019-06-13 Fujitsu Limited Computer-readable recording medium, determination method, and determination apparatus
CN109933502A (zh) * 2019-01-23 2019-06-25 平安科技(深圳)有限公司 电子装置、用户操作记录的处理方法和存储介质
CN113505272A (zh) * 2021-07-05 2021-10-15 珠海格力电器股份有限公司 基于行为习惯的控制方法和装置、电子设备和存储介质
CN114547140A (zh) * 2022-01-27 2022-05-27 青岛海尔科技有限公司 行为序列的生成方法及装置、存储介质、电子装置

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180307544A1 (en) * 2017-04-21 2018-10-25 International Business Machines Corporation Event sequence management
US20190180166A1 (en) * 2017-12-08 2019-06-13 Fujitsu Limited Computer-readable recording medium, determination method, and determination apparatus
CN109542944A (zh) * 2018-09-29 2019-03-29 广东工业大学 基于时序因果关系分析的智能家居用户操控行为推荐方法
CN109933502A (zh) * 2019-01-23 2019-06-25 平安科技(深圳)有限公司 电子装置、用户操作记录的处理方法和存储介质
CN113505272A (zh) * 2021-07-05 2021-10-15 珠海格力电器股份有限公司 基于行为习惯的控制方法和装置、电子设备和存储介质
CN114547140A (zh) * 2022-01-27 2022-05-27 青岛海尔科技有限公司 行为序列的生成方法及装置、存储介质、电子装置

Also Published As

Publication number Publication date
CN114547140A (zh) 2022-05-27

Similar Documents

Publication Publication Date Title
US10102227B2 (en) Image-based faceted system and method
CN108280115B (zh) 识别用户关系的方法及装置
CN109657107B (zh) 一种基于第三方应用的终端匹配方法和装置
CN110941598A (zh) 一种数据去重方法、装置、终端及存储介质
CN108989397B (zh) 数据推荐方法、装置及存储介质
CN110413867B (zh) 用于内容推荐的方法及系统
CN108665007B (zh) 一种基于多分类器的推荐方法、装置及电子设备
US20210014124A1 (en) Feature-based network embedding
CN107832440B (zh) 一种数据挖掘方法、装置、服务器及计算机可读存储介质
CN110717647A (zh) 决策流构建方法、装置、计算机设备和存储介质
CN114925072B (zh) 数据管理方法、装置、系统、设备、介质
WO2023142349A1 (zh) 行为序列的生成方法及装置、存储介质、电子装置
WO2014110929A1 (en) Method, device, and system for uploading data
CN116032663A (zh) 基于边缘设备的隐私数据处理系统、方法、设备及介质
CN112801301A (zh) 异步计算方法、装置、设备、存储介质及程序产品
CN110019916A (zh) 基于用户画像的事件处理方法、装置、设备和存储介质
CN111859127A (zh) 消费数据的订阅方法、装置及存储介质
US20210035025A1 (en) Systems and methods for optimizing machine learning models by summarizing list characteristics based on multi-dimensional feature vectors
CN111309946A (zh) 一种已建立档案优化方法及装置
CN109218131B (zh) 网络监控方法、装置、计算机设备和存储介质
CN105849719B (zh) 增强现实
US8630963B2 (en) Automatic user identification from button presses recorded in a feature vector
CN116594834A (zh) 一种用于多协议服务器的运维数据处理方法及装置
CN106528795B (zh) 一种数据挖掘方法及装置
US9536199B1 (en) Recommendations based on device usage

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22923158

Country of ref document: EP

Kind code of ref document: A1