[go: up one dir, main page]

CN117495469B - Block chain-based intelligent timing method and system for electric bicycle - Google Patents

Block chain-based intelligent timing method and system for electric bicycle Download PDF

Info

Publication number
CN117495469B
CN117495469B CN202410001364.5A CN202410001364A CN117495469B CN 117495469 B CN117495469 B CN 117495469B CN 202410001364 A CN202410001364 A CN 202410001364A CN 117495469 B CN117495469 B CN 117495469B
Authority
CN
China
Prior art keywords
character string
dictionary
initial
charging data
character
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202410001364.5A
Other languages
Chinese (zh)
Other versions
CN117495469A (en
Inventor
吴爱华
林志武
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fuzhirun Intelligent Technology Fujian Co ltd
Original Assignee
Fuzhirun Intelligent Technology Fujian 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 Fuzhirun Intelligent Technology Fujian Co ltd filed Critical Fuzhirun Intelligent Technology Fujian Co ltd
Priority to CN202410001364.5A priority Critical patent/CN117495469B/en
Publication of CN117495469A publication Critical patent/CN117495469A/en
Application granted granted Critical
Publication of CN117495469B publication Critical patent/CN117495469B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0283Price estimation or determination
    • G06Q30/0284Time or distance, e.g. usage of parking meters or taximeters
    • 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/0645Rental transactions; Leasing transactions
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M7/00Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
    • H03M7/30Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
    • H03M7/3084Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction using adaptive string matching, e.g. the Lempel-Ziv method
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Development Economics (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Game Theory and Decision Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The invention relates to the technical field of data processing for enterprise management, in particular to an intelligent timing method and system for an electric bicycle based on a block chain, comprising the following steps: collecting timing charging data of the electric bicycle and obtaining an initial dictionary; judging the number of the initial dictionaries to obtain a second initial dictionary and a first dictionary; acquiring a reference interval of a character string, and acquiring initial possibility and periodicity of the reference interval according to the reference interval of the character string; obtaining a reference interval difference according to the last reference interval and the reference interval of the character string; obtaining final rejection possibility; and eliminating according to the final eliminating possibility to obtain a second dictionary and performing LZW compression, and realizing intelligent management of enterprises on the electric bicycle by compressing and storing timing charging data of the electric bicycle into a block chain. According to the invention, by compressing the timing charging data, the intelligent management efficiency of related enterprises or platforms on the electric bicycle is improved.

Description

Block chain-based intelligent timing method and system for electric bicycle
Technical Field
The invention relates to the technical field of data processing for enterprise management, in particular to an intelligent timing method and system for an electric bicycle based on a block chain.
Background
With the acceleration of the urban process and the improvement of environmental protection consciousness, electric bicycles are becoming popular as a low-carbon and environment-friendly travel tool for more and more people. Under the support of the development of the Internet technology, the shared electric bicycle is rapidly developed in cities, and because the electric bicycle can generate timing charging data when in use and the area range for providing the shared electric bicycle is wider, a large amount of timing charging data can be generated, and related enterprises store the timing charging data through block chains, so that the management of the related data of the enterprises is realized; meanwhile, because the data volume of the timing charging data is large, compression and storage are needed, so that the enterprise management efficiency is improved.
In the process of storing the timing charging data to realize enterprise management, as the electric vehicle is mainly used for short-distance commuting, and because of the limitation of road section scenes and commuting time, people have peak periods and low peak periods on the service time of the electric bicycle, so that the correspondingly collected data are distributed unevenly on a time sequence, meanwhile, the corresponding data character combination is also unevenly distributed, the coding efficiency of the conventional LZW is further influenced, the compression effect of the data is poorer, the storage efficiency of the related enterprises on the data by using block chains is poorer, and the enterprise management efficiency is further influenced.
Disclosure of Invention
The invention provides an intelligent timing method and system for an electric bicycle based on a block chain, which are used for solving the existing problems.
The invention discloses an intelligent timing method and system for an electric bicycle based on a block chain, which adopts the following technical scheme:
The embodiment of the invention provides an intelligent timing method for an electric bicycle based on a blockchain, which comprises the following steps of:
Collecting a plurality of timing charging data sequences of the electric bicycle, wherein the timing charging data sequences comprise a plurality of timing charging data, and a plurality of format names in each timing charging data and a plurality of format name characters in the format names are obtained;
constructing each initial dictionary according to the timing charging data sequence; judging the number of format name characters of the initial dictionary to obtain a plurality of second initial dictionaries;
Obtaining each first dictionary according to the second initial dictionary; obtaining a plurality of quotation intervals of each character string according to each character string of the first dictionary; obtaining the initial possibility of each character string according to the last reference interval of each character string and the number of characters contained in each character string; according to a plurality of quotation intervals of each character string, the quotation interval periodicity of each character string is obtained; obtaining initial reference interval differences of each character string according to the last reference interval and a plurality of reference intervals of each character string; obtaining the reference interval difference of each character string according to the initial reference interval difference;
Obtaining the final rejection possibility of each character string according to the initial possibility, the periodicity of the reference interval and the difference of the reference interval of the character strings; performing rejection screening according to the final rejection possibility to obtain a plurality of second final dictionaries; and obtaining a second dictionary according to the second final dictionary and the timing charging data sequence, performing LZW compression, and storing the timing charging data of the electric bicycle into a blockchain by compressing, so as to realize intelligent management of enterprises on the electric bicycle.
Preferably, the method for judging the number of format name characters in the initial dictionary to obtain a plurality of second initial dictionaries includes the following specific steps:
For any format name character in an initial dictionary of any timing charging data sequence, in the timing charging data sequence, the number of characters of the format name character in the format name is recorded as the name number of the format name character; if the number of the format name characters in the timing charging data sequence is larger than the name number of the format name characters, reserving the format name characters in an initial dictionary; if the number of the format name characters in the timing charging data sequence is equal to the name number of the format name characters, eliminating the format name characters in the initial dictionary; traversing all format name characters in the initial dictionary to obtain a screened and rejected initial dictionary, and recording the screened and rejected initial dictionary as a second initial dictionary.
Preferably, the method for obtaining a plurality of reference intervals of each character string according to each character string of the first dictionary includes the following specific steps:
For any character string of any first dictionary, in the timing charging data sequence corresponding to the first dictionary, for any character string which appears twice adjacent to the character string, the character string which appears before is marked as a reference character string, and the character string which appears after is marked as a target character string; the number of the contained characters between the last character in the reference character string and the first character in the target character string is recorded as the reference interval of the target character string; a plurality of reference intervals of each character string in each first dictionary in a corresponding timing charging data sequence are acquired.
Preferably, the initial probability of each character string is obtained according to the last reference interval of each character string and the number of characters contained in each character string, which comprises the following specific methods:
For any one character string of any one first dictionary, wherein, Representing an initial likelihood of the character string; /(I)Representing the last reference interval of the character string in the timing charging data sequence corresponding to the first dictionary; /(I)Representing the number of characters contained in the character string.
Preferably, the method for obtaining the periodicity of the reference interval of each character string according to the plurality of reference intervals of each character string includes the following specific steps:
For any one character string of any one first dictionary, wherein, Representing the periodicity of the referencing interval of the character string; /(I)Representing variances of all reference intervals of the character strings in the timing charging data sequence corresponding to the first dictionary; /(I)Indicating that the hyper-parameters with denominator 0 are avoided.
Preferably, the obtaining the initial reference interval difference of each character string according to the last reference interval and the reference intervals of each character string includes the following specific steps:
For any one character string of any one first dictionary, wherein, Representing an initial reference interval difference of the character string; /(I)Representing the last reference interval of the character string in the timing charging data sequence corresponding to the first dictionary; /(I)Representing the average of all the reference intervals of the character string in the timing charging data sequence corresponding to the first dictionary.
Preferably, the obtaining the reference interval difference of each character string according to the initial reference interval difference includes the following specific steps:
And carrying out linear normalization on the initial quotation interval differences of all kinds of character strings in the same first dictionary, and recording each initial quotation interval difference after linear normalization as the quotation interval difference of each character string.
Preferably, the final rejection probability of each character string is obtained according to the initial probability, the periodicity of the reference interval and the difference of the reference interval of the character strings, which comprises the following specific methods:
For any one character string of any one first dictionary, wherein, Representing a rejection likelihood of the character string; Representing the periodicity of the referencing interval of the string; /(I) Representing a difference in reference interval of the character string; /(I)Representing an initial likelihood of the character string; obtaining rejection possibility of all kinds of character strings in the first dictionary, carrying out linear normalization on the rejection possibility of all kinds of character strings, and marking the rejection possibility after linear normalization as final rejection possibility of each character string;
and obtaining the final rejection possibility of each character string in each first dictionary.
Preferably, the removing and screening are performed according to the final removing possibility to obtain a plurality of second final dictionaries, including the following specific methods:
for any character string in the first dictionary of any timing charging data sequence, if the final rejection possibility of the character string is larger than the final rejection possibility threshold, rejecting the character string from the first dictionary; if the final rejection possibility of the character string is smaller than or equal to a final rejection possibility threshold, reserving the character string; traversing all kinds of character strings in the first dictionary to obtain a screened and removed first dictionary, and recording the screened and removed first dictionary as a second final dictionary.
The embodiment of the invention provides an electric bicycle intelligent timing system based on a blockchain, which comprises a timing charging data acquisition module, a second initial dictionary acquisition module, an initial possibility, a quotation interval periodicity, a quotation interval difference acquisition module and a compression management module, wherein the timing charging data acquisition module is used for acquiring the initial possibility, the quotation interval periodicity and the quotation interval difference of the electric bicycle intelligent timing system based on the blockchain, the second initial dictionary acquisition module is used for acquiring the initial possibility, the quotation interval periodicity and the quotation interval difference of the electric bicycle intelligent timing system based on the blockchain, and the compression management module is used for:
The timing charging data acquisition module acquires a plurality of timing charging data sequences of the electric bicycle, wherein the timing charging data sequences comprise a plurality of timing charging data, and a plurality of format names in each timing charging data and a plurality of format name characters in the format names are acquired;
the second initial dictionary acquisition module constructs each initial dictionary according to the timing charging data sequence; judging the number of format name characters of the initial dictionary to obtain a plurality of second initial dictionaries;
the initial possibility, the reference interval periodicity and the reference interval difference acquisition module acquire each first dictionary according to the second initial dictionary; obtaining a plurality of quotation intervals of each character string according to each character string of the first dictionary; obtaining the initial possibility of each character string according to the last reference interval of each character string and the number of characters contained in each character string; according to a plurality of quotation intervals of each character string, the quotation interval periodicity of each character string is obtained; obtaining initial reference interval differences of each character string according to the last reference interval and a plurality of reference intervals of each character string; obtaining the reference interval difference of each character string according to the initial reference interval difference;
The compression management module obtains the final rejection possibility of each character string according to the initial possibility, the periodicity of the reference interval and the difference of the reference interval of the character strings; performing rejection screening according to the final rejection possibility to obtain a plurality of second final dictionaries; and obtaining a second dictionary according to the second final dictionary and the timing charging data sequence, performing LZW compression, and storing the timing charging data of the electric bicycle into a blockchain by compressing, so as to realize intelligent management of enterprises on the electric bicycle.
The technical scheme of the invention has the beneficial effects that: in the process of eliminating dictionary character strings, the influence relationship of the character string reference interval and the character string length on unnecessary memory consumption is judged, so that effective character strings are avoided being eliminated, and the benefit of the character string elimination on the coding process is ensured; meanwhile, the quoted interval relation of character strings is utilized in the corresponding rejection possibility, so that the character strings corresponding to the interval characters with larger period are prevented from being rejected, unnecessary memory consumption is reduced, dictionary character string rejection effectiveness is improved, the compression effect of timing charging data of the electric bicycle is further improved, the block chain is combined for storage, and the intelligent management efficiency of enterprises on the electric bicycle is improved.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of steps of a blockchain-based intelligent timing method for an electric bicycle of the present invention;
fig. 2 is a block diagram of the block chain based intelligent timing system for electric bicycles.
Detailed Description
In order to further describe the technical means and effects adopted by the invention to achieve the preset aim, the following is a detailed description of specific implementation, structure, characteristics and effects of the block chain-based intelligent timing method and system for the electric bicycle according to the invention with reference to the accompanying drawings and the preferred embodiment. In the following description, different "one embodiment" or "another embodiment" means that the embodiments are not necessarily the same. Furthermore, the particular features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The invention provides an intelligent timing method and a system for an electric bicycle based on a blockchain, which are specifically described below with reference to the accompanying drawings.
Referring to fig. 1, a flowchart of steps of a blockchain-based intelligent timing method for an electric bicycle according to an embodiment of the present invention is shown, and the method includes the following steps:
step S001: and collecting timing charging data of the electric bicycle.
In the process of storing the timing charging data to realize enterprise management, as the electric vehicle is mainly used for short-distance commuting, and because of the limitation of road section scenes and commuting time, people have peak periods and low peak periods on the service time of the electric bicycle, so that the correspondingly collected data are unevenly distributed on the time sequence, and meanwhile, the corresponding data character combination distribution is also uneven, so that the coding efficiency of the conventional LZW is influenced, the compression effect of the data is poor, and the efficiency of the related enterprises for storing the data by using block chains is poor, so that the enterprise management efficiency is influenced; therefore, the embodiment provides an intelligent timing method for the electric bicycle based on the blockchain.
Specifically, in order to implement the electric bicycle intelligent timing method based on the blockchain provided in this embodiment, timing charging data needs to be collected first, and the specific process is as follows: according to the embodiment, the third-party intelligent electric bicycle platform is used for acquiring the timing and charging data of a plurality of electric bicycles in each week in the same area, the timing and charging data acquired by all electric bicycles in each week are compressed and stored, the timing and charging data of any week are described as an example, the timing and charging data in each week of each electric bicycle are ordered according to the acquisition time, and the ordered sequence is recorded as a timing and charging data sequence; the present embodiment refers to the user, the usage time, the recording time, and the charging amount in each time counting charging data collectively as format names, and characters constituting the format names are recorded as format name characters; each timing charging data comprises a user, a using time, a recording time and a charging amount, each format name corresponds to a character string, and each timing charging data sequence corresponds to a plurality of format names and format name characters.
So far, several timing charging data sequences are obtained by the above method.
Step S002: constructing an initial dictionary according to the timing charging data; and judging the number of format name characters of the initial dictionary to obtain a plurality of second initial dictionaries.
It should be noted that, the traditional LZW coding replaces character strings repeatedly appearing in the timing charging data sequence with a dictionary, that is, different character strings are sequentially put into the dictionary by constructing a dynamic dictionary, so as to realize the compression of the data sequence; when LZW codes code the timing charging data sequence, if the character combination relation existing in the sequence is more consistent, the fewer character strings exist in the dictionary, the lower the memory consumption is; if the character combination relations existing in the sequences are not consistent, the more character strings existing in the dictionary are explained, and the larger the memory consumption is; therefore, the dictionary is screened by utilizing the reference relation of the character strings in the dictionary, so that the memory consumption is reduced, and the efficient compression of the data is realized.
It should be further noted that, for any format name, if any format name character included in the format name exists only in the format name, then the format name character is described as only existing in the format name; if any format name character contained in the format name is not only in the format name, the format name character is described to exist in the corresponding timing charging data sequence in the form of characters or other forms of character strings besides the format name; since the record of the format name and the corresponding code exist in the updated dictionary, the characters of the format name can be removed from the initial dictionary, thereby reducing the waste of storage space.
Specifically, taking any timing charging data sequence as an example, an initial dictionary is obtained according to the timing charging data sequence, and the number of format name characters in the initial dictionary is judged: taking any format name character in the initial dictionary as an example, in the timing charging data sequence, the number of characters in the format name of the format name character is recorded as the name number of the format name character, namely, how many format name characters are in the format name of the format name character; if the number of the format name characters in the timing charging data sequence is larger than the name number of the format name characters, reserving the format name characters in the initial dictionary; if the number of the format name characters in the timing charging data sequence is equal to the number of the names of the format name characters, the format name characters are removed from the initial dictionary. And traversing all format name characters in the initial dictionary to obtain a screened and rejected initial dictionary, and recording the screened and rejected initial dictionary as a second initial dictionary. A second initial dictionary of all timing charging data sequences is obtained. The initial dictionary is obtained as a well-known content of the LZW compression algorithm, which is not described in this embodiment; the initial dictionary only contains all characters of the timing charging data sequence, and each character corresponds to one code and index; each initial dictionary contains several format name characters.
So far, all the second initial dictionaries are obtained through the method.
Step S003: obtaining a first dictionary according to the second initial dictionary; obtaining a reference interval of the character strings according to the character strings of the first dictionary; the initial likelihood of the character string, the periodicity of the reference interval and the difference of the reference interval are obtained according to the reference interval.
It should be noted that, for the time counting charging data, since the format name is fixed, the corresponding character combination form is also fixed; since the timing charging data is not uniformly distributed on the time sequence, the corresponding character combination forms are also not uniformly distributed on the time sequence, and meanwhile, the formed character strings have obvious aggregation due to the fact that the change of the character combination forms has certain regularity, so that partial character combinations with fixed character combination forms, such as character combinations formed by time-class data, are only meaningful in a specific period of time, and after the specific period of time, the character combinations are not cleared in a dictionary of the traditional LZW and are reserved, so that the redundancy of the partial character combinations is caused, and the storage space is influenced; therefore, in the actual coding process, character string screening is required to be carried out on the dictionary, and then rejection is carried out.
Specifically, taking a second initial dictionary of any one timing charging data sequence as an example, obtaining a dictionary of the timing charging data sequence according to the second initial dictionary, and recording the dictionary as a first dictionary of the timing charging data sequence; the dictionary is obtained as a well-known content of the LZW compression algorithm, which is not described in this embodiment; the first dictionary further comprises a plurality of non-duplicate character strings corresponding to the characters on the basis of containing all the contents of the corresponding second initial dictionary.
Further, taking any character string of the first dictionary as an example, the possibility that the character string is rejected is recorded as the initial possibility of the character string; taking the character string which appears any two times adjacent to the character string as an example in the timing charging data sequence, marking the character string which appears before as a reference character string and marking the character string which appears after as a target character string; the number of the contained characters between the last character in the reference character string and the first character in the target character string is recorded as the reference interval of the target character string; wherein there are several reference intervals for a sequence of timing charging data.
Further, obtaining an initial likelihood of the character string according to a last reference interval of the character string in the timing charging data sequence; the method for calculating the initial possibility of the character string comprises the following steps:
In the method, in the process of the invention, Representing an initial likelihood of such a string; /(I)Representing the last referencing interval of such character strings; /(I)Representing the number of characters contained in such a string. Acquiring initial possibilities of all character strings of the first dictionary; the initial likelihood of all character strings of all first dictionaries is obtained. It should be further noted that in an actual timing charging data sequence, there may be a case where characters exist at intervals within the timing charging data sequence, for example: for a large number of format name characters in the timing charging data, corresponding to the situation that the same format name characters have intervals in the timing charging data sequence, corresponding character string references in the corresponding first dictionary also have intervals, so that the possibility of erroneous judgment exists in the process of eliminating judgment by utilizing the character string reference intervals, and the reference interval relation of the character strings is particularly required to be combined.
Further, taking any one character string in a first dictionary of any one timing charging data sequence as an example, acquiring a plurality of reference intervals of the character string, and acquiring the periodicity of the reference intervals of the character string according to the plurality of reference intervals of the character string; the method for calculating the periodicity of the quotation intervals of the character strings comprises the following steps:
In the method, in the process of the invention, A periodicity of reference intervals representing such strings; /(I)Representing the variance of all reference intervals for such strings; /(I)To avoid superparameters with denominators of 0, this embodiment uses/>Description is made; the smaller the variance of the reference interval, the greater the periodicity; acquiring the periodicity of the quotation intervals of all kinds of character strings in the first dictionary; and acquiring the periodicity of the reference intervals of all kinds of character strings in each first dictionary.
Further, taking any one character string in a first dictionary of any one timing charging data sequence as an example, obtaining an initial reference interval difference of the character string according to a reference interval and a reference interval average value of the last time of the character string; the method for calculating the initial reference interval difference of the character string comprises the following steps:
In the method, in the process of the invention, Representing an initial reference interval difference for such character strings; /(I)Representing the last referencing interval of such character strings; /(I)Means representing all reference intervals of such strings; the greater the last referencing interval relative to the referencing interval, the less likely the string will be to be referenced next, the more periodic the last referencing of the referencing interval will affect the periodicity of the referencing interval. Acquiring initial reference interval differences of all kinds of character strings in the first dictionary, performing linear normalization processing on the initial reference interval differences of all kinds of character strings, and marking each initial reference interval difference after linear normalization processing as the reference interval difference of each character string; and acquiring the reference interval difference of each character string in each first dictionary.
Up to this point, the initial likelihood, the periodicity of the reference interval, and the difference of the reference interval for each character string are obtained by the above method.
Step S004: obtaining the final rejection possibility of the character string according to the initial possibility, the reference interval periodicity and the reference interval difference of the character string; performing rejection screening according to the final rejection possibility to obtain a second dictionary and performing LZW compression; the intelligent management of enterprises to the electric bicycles is realized by compressing and storing the timing charging data of the electric bicycles into the blockchain.
Specifically, taking any one character string in a first dictionary of any one timing charging data sequence as an example, obtaining the rejection possibility of the character string according to the initial possibility, the periodicity of the reference interval and the difference of the reference interval of the character string; the calculation method of the rejection possibility of the character strings comprises the following steps:
In the method, in the process of the invention, Representing the possibility of rejection of such character strings; /(I)A periodicity of reference intervals representing such strings; /(I)A reference interval difference representing such character strings; /(I)Representing an initial likelihood of such a string; the larger the periodicity of the reference interval is, the larger the difference of the reference interval is, the larger the possibility that the character string is not referenced any more, the larger the initial possibility is combined with the initial possibility, the more the character string needs to be rejected, and the larger the possibility that the character string is not referenced any more, the larger the final rejection possibility is. Obtaining rejection possibility of all kinds of character strings in the first dictionary, performing linear normalization processing on the rejection possibility of all kinds of character strings, and marking the rejection possibility after each linear normalization processing as final rejection possibility of each character string; obtaining the final rejection possibility of each character string in each first dictionary; the memory consumption of the dictionary is reduced through the elimination of the character strings, and meanwhile, the reference interval relation of the character strings is utilized in the acquisition of the elimination possibility, so that the character strings corresponding to the interval characters with larger period are prevented from being eliminated, and the effectiveness of character string elimination in the first dictionary is improved.
Further, taking any one character string in the first dictionary of any one timing charging data sequence as an example, a final rejection probability threshold T1 is preset, where the embodiment is described by taking t1=0.8 as an example, and the embodiment is not specifically limited, where T1 may be determined according to specific implementation conditions; and (3) carrying out rejection judgment on the character strings: if the final rejection possibility of the character string is larger than a final rejection possibility threshold T1, rejecting the character string from the first dictionary; if the final rejection possibility of the character string is smaller than or equal to a final rejection possibility threshold T1, the character string is reserved. And traversing all kinds of character strings in the first dictionary to obtain a screened and rejected first dictionary, and recording the screened and rejected first dictionary as a second final dictionary.
Further, a number of codes T2 is preset, where the present embodiment is described by taking t2=20 as an example, and the present embodiment is not specifically limited, where T2 may be determined according to specific implementation cases; in this embodiment, after encoding of the T2 pieces of time-based charging data per completed encoding number, a screening determination of the second final dictionary is performed once, and the second final dictionary determined each time is recorded as the second dictionary. Acquiring all second dictionaries, performing LZW compression coding on all timing charging data sequences according to the corresponding second dictionaries, and marking the obtained compression result as compressed timing charging data; storing the compressed timing charging data in a block corresponding to the block chain; then, when analysis is needed, decompressing the compressed timing charging data by using a second final dictionary; by storing the compressed timing charging data into the block chain, intelligent management of the timing charging data and sharing based on the block chain are realized, and the related enterprises or platforms of the electric bicycle realize intelligent management of the electric bicycle.
Through the steps, intelligent timing of the electric bicycle based on the blockchain is completed, and intelligent management of related enterprises or platforms of the electric bicycle on the electric bicycle is realized.
Referring to fig. 2, a block diagram of an intelligent timing system for an electric bicycle based on a blockchain according to an embodiment of the present invention is shown, where the system includes the following modules:
The timing charging data acquisition module acquires a plurality of timing charging data sequences of the electric bicycle, wherein the timing charging data sequences comprise a plurality of timing charging data, and a plurality of format names in each timing charging data and a plurality of format name characters in the format names are acquired;
the second initial dictionary acquisition module constructs each initial dictionary according to the timing charging data sequence; judging the number of format name characters of the initial dictionary to obtain a plurality of second initial dictionaries;
the initial possibility, the reference interval periodicity and the reference interval difference acquisition module acquire each first dictionary according to the second initial dictionary; obtaining a plurality of quotation intervals of each character string according to each character string of the first dictionary; obtaining the initial possibility of each character string according to the last reference interval of each character string and the number of characters contained in each character string; according to a plurality of quotation intervals of each character string, the quotation interval periodicity of each character string is obtained; obtaining initial reference interval differences of each character string according to the last reference interval and a plurality of reference intervals of each character string; obtaining the reference interval difference of each character string according to the initial reference interval difference;
The compression management module obtains the final rejection possibility of each character string according to the initial possibility, the periodicity of the reference interval and the difference of the reference interval of the character strings; performing rejection screening according to the final rejection possibility to obtain a plurality of second final dictionaries; and obtaining a second dictionary according to the second final dictionary and the timing charging data sequence, performing LZW compression, and storing the timing charging data of the electric bicycle into a blockchain by compressing, so as to realize intelligent management of enterprises on the electric bicycle.
In the process of eliminating dictionary character strings, the influence relationship of the character string reference interval and the character string length on unnecessary memory consumption is judged, so that effective character strings are avoided being eliminated, and the benefit of the character string elimination on the coding process is ensured; meanwhile, the quoted interval relation of character strings is utilized in the corresponding rejection possibility, so that the character strings corresponding to the interval characters with larger period are prevented from being rejected, unnecessary memory consumption is reduced, dictionary character string rejection effectiveness is improved, the compression effect of timing charging data of the electric bicycle is further improved, the block chain is combined for storage, and the intelligent management efficiency of enterprises on the electric bicycle is improved.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, alternatives, and improvements that fall within the spirit and scope of the invention.

Claims (8)

1. The intelligent timing method for the electric bicycle based on the block chain is characterized by comprising the following steps of:
Collecting a plurality of timing charging data sequences of the electric bicycle, wherein the timing charging data sequences comprise a plurality of timing charging data, and a plurality of format names in each timing charging data and a plurality of format name characters in the format names are obtained;
constructing each initial dictionary according to the timing charging data sequence; judging the number of format name characters of the initial dictionary to obtain a plurality of second initial dictionaries;
Obtaining each first dictionary according to the second initial dictionary; obtaining a plurality of quotation intervals of each character string according to each character string of the first dictionary; obtaining the initial possibility of each character string according to the last reference interval of each character string and the number of characters contained in each character string; according to a plurality of quotation intervals of each character string, the quotation interval periodicity of each character string is obtained; obtaining initial reference interval differences of each character string according to the last reference interval and a plurality of reference intervals of each character string; obtaining the reference interval difference of each character string according to the initial reference interval difference;
Obtaining the final rejection possibility of each character string according to the initial possibility, the periodicity of the reference interval and the difference of the reference interval of the character strings; performing rejection screening according to the final rejection possibility to obtain a plurality of second final dictionaries; obtaining a second dictionary according to the second final dictionary and the timing charging data sequence, performing LZW compression, and compressing and storing the timing charging data of the electric bicycle into a block chain to realize intelligent management of enterprises on the electric bicycle;
the method comprises the following steps of:
For any format name character in an initial dictionary of any timing charging data sequence, in the timing charging data sequence, the number of characters of the format name character in the format name is recorded as the name number of the format name character; if the number of the format name characters in the timing charging data sequence is larger than the name number of the format name characters, reserving the format name characters in an initial dictionary; if the number of the format name characters in the timing charging data sequence is equal to the name number of the format name characters, eliminating the format name characters in the initial dictionary; traversing all format name characters in the initial dictionary to obtain a screened and removed initial dictionary, and marking the screened and removed initial dictionary as a second initial dictionary;
the specific method for obtaining a plurality of quotation intervals of each character string according to each character string of the first dictionary comprises the following steps:
For any character string of any first dictionary, in the timing charging data sequence corresponding to the first dictionary, for any character string which appears twice adjacent to the character string, the character string which appears before is marked as a reference character string, and the character string which appears after is marked as a target character string; the number of the contained characters between the last character in the reference character string and the first character in the target character string is recorded as the reference interval of the target character string; a plurality of reference intervals of each character string in each first dictionary in a corresponding timing charging data sequence are acquired.
2. The intelligent timing method for the electric bicycle based on the blockchain according to claim 1, wherein the initial possibility of each character string is obtained according to the last reference interval of each character string and the number of characters contained in each character string, and the specific method comprises the following steps:
For any one character string of any one first dictionary, wherein, Representing an initial likelihood of the character string; /(I)Representing the last reference interval of the character string in the timing charging data sequence corresponding to the first dictionary; /(I)Representing the number of characters contained in the character string.
3. The intelligent timing method for the electric bicycle based on the blockchain according to claim 1, wherein the periodic reference intervals of each character string are obtained according to the reference intervals of the character strings, and the specific method comprises the following steps:
For any one character string of any one first dictionary, wherein, Representing the periodicity of the referencing interval of the character string; /(I)Representing variances of all reference intervals of the character strings in the timing charging data sequence corresponding to the first dictionary; /(I)Indicating that the hyper-parameters with denominator 0 are avoided.
4. The intelligent timing method for the electric bicycle based on the blockchain according to claim 1, wherein the initial reference interval difference of each character string is obtained according to the last reference interval and a plurality of reference intervals of each character string, and the specific method comprises the following steps:
For any one character string of any one first dictionary, wherein, Representing an initial reference interval difference of the character string; /(I)Representing the last reference interval of the character string in the timing charging data sequence corresponding to the first dictionary; /(I)Representing the average of all the reference intervals of the character string in the timing charging data sequence corresponding to the first dictionary.
5. The intelligent timing method for the electric bicycle based on the blockchain according to claim 1, wherein the obtaining the reference interval difference of each character string according to the initial reference interval difference comprises the following specific steps:
And carrying out linear normalization on the initial quotation interval differences of all kinds of character strings in the same first dictionary, and recording each initial quotation interval difference after linear normalization as the quotation interval difference of each character string.
6. The intelligent timing method for the electric bicycle based on the blockchain according to claim 1, wherein the final rejection possibility of each character string is obtained according to the initial possibility, the periodicity of the reference interval and the difference of the reference interval of the character strings, comprising the following specific steps:
For any one character string of any one first dictionary, wherein, Representing a rejection likelihood of the character string; /(I)Representing the periodicity of the referencing interval of the string; /(I)Representing a difference in reference interval of the character string; /(I)Representing an initial likelihood of the character string; obtaining rejection possibility of all kinds of character strings in the first dictionary, carrying out linear normalization on the rejection possibility of all kinds of character strings, and marking the rejection possibility after linear normalization as final rejection possibility of each character string;
and obtaining the final rejection possibility of each character string in each first dictionary.
7. The intelligent timing method for the electric bicycle based on the blockchain according to claim 1, wherein the removing and screening are performed according to the final removing possibility to obtain a plurality of second final dictionaries, and the specific method comprises the following steps:
for any character string in the first dictionary of any timing charging data sequence, if the final rejection possibility of the character string is larger than the final rejection possibility threshold, rejecting the character string from the first dictionary; if the final rejection possibility of the character string is smaller than or equal to a final rejection possibility threshold, reserving the character string; traversing all kinds of character strings in the first dictionary to obtain a screened and removed first dictionary, and recording the screened and removed first dictionary as a second final dictionary.
8. Electric bicycle intelligence timing system based on block chain, its characterized in that, this system includes following module:
The timing charging data acquisition module acquires a plurality of timing charging data sequences of the electric bicycle, wherein the timing charging data sequences comprise a plurality of timing charging data, and a plurality of format names in each timing charging data and a plurality of format name characters in the format names are acquired;
the second initial dictionary acquisition module constructs each initial dictionary according to the timing charging data sequence; judging the number of format name characters of the initial dictionary to obtain a plurality of second initial dictionaries;
the initial possibility, the reference interval periodicity and the reference interval difference acquisition module acquire each first dictionary according to the second initial dictionary; obtaining a plurality of quotation intervals of each character string according to each character string of the first dictionary; obtaining the initial possibility of each character string according to the last reference interval of each character string and the number of characters contained in each character string; according to a plurality of quotation intervals of each character string, the quotation interval periodicity of each character string is obtained; obtaining initial reference interval differences of each character string according to the last reference interval and a plurality of reference intervals of each character string; obtaining the reference interval difference of each character string according to the initial reference interval difference;
The compression management module obtains the final rejection possibility of each character string according to the initial possibility, the periodicity of the reference interval and the difference of the reference interval of the character strings; performing rejection screening according to the final rejection possibility to obtain a plurality of second final dictionaries; obtaining a second dictionary according to the second final dictionary and the timing charging data sequence, performing LZW compression, and compressing and storing the timing charging data of the electric bicycle into a block chain to realize intelligent management of enterprises on the electric bicycle;
the method comprises the following steps of:
For any format name character in an initial dictionary of any timing charging data sequence, in the timing charging data sequence, the number of characters of the format name character in the format name is recorded as the name number of the format name character; if the number of the format name characters in the timing charging data sequence is larger than the name number of the format name characters, reserving the format name characters in an initial dictionary; if the number of the format name characters in the timing charging data sequence is equal to the name number of the format name characters, eliminating the format name characters in the initial dictionary; traversing all format name characters in the initial dictionary to obtain a screened and removed initial dictionary, and marking the screened and removed initial dictionary as a second initial dictionary;
the specific method for obtaining a plurality of quotation intervals of each character string according to each character string of the first dictionary comprises the following steps:
For any character string of any first dictionary, in the timing charging data sequence corresponding to the first dictionary, for any character string which appears twice adjacent to the character string, the character string which appears before is marked as a reference character string, and the character string which appears after is marked as a target character string; the number of the contained characters between the last character in the reference character string and the first character in the target character string is recorded as the reference interval of the target character string; a plurality of reference intervals of each character string in each first dictionary in a corresponding timing charging data sequence are acquired.
CN202410001364.5A 2024-01-02 2024-01-02 Block chain-based intelligent timing method and system for electric bicycle Active CN117495469B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410001364.5A CN117495469B (en) 2024-01-02 2024-01-02 Block chain-based intelligent timing method and system for electric bicycle

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410001364.5A CN117495469B (en) 2024-01-02 2024-01-02 Block chain-based intelligent timing method and system for electric bicycle

Publications (2)

Publication Number Publication Date
CN117495469A CN117495469A (en) 2024-02-02
CN117495469B true CN117495469B (en) 2024-04-26

Family

ID=89674738

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410001364.5A Active CN117495469B (en) 2024-01-02 2024-01-02 Block chain-based intelligent timing method and system for electric bicycle

Country Status (1)

Country Link
CN (1) CN117495469B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117874049B (en) * 2024-03-08 2024-06-11 北京龙创悦动网络科技有限公司 Method and system for updating hand-tour data

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6154720A (en) * 1995-06-13 2000-11-28 Sharp Kabushiki Kaisha Conversational sentence translation apparatus allowing the user to freely input a sentence to be translated
US11120497B1 (en) * 2018-07-03 2021-09-14 State Farm Mutual Automobile Insurance Company Systems and methods for reserving a replacement rental vehicle
CN117081602A (en) * 2023-10-13 2023-11-17 青岛场外市场清算中心有限公司 Capital settlement data optimization processing method based on blockchain

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101119568A (en) * 2007-07-20 2008-02-06 南京联创科技股份有限公司 Interface configuration method and engine between charging account system modules

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6154720A (en) * 1995-06-13 2000-11-28 Sharp Kabushiki Kaisha Conversational sentence translation apparatus allowing the user to freely input a sentence to be translated
US11120497B1 (en) * 2018-07-03 2021-09-14 State Farm Mutual Automobile Insurance Company Systems and methods for reserving a replacement rental vehicle
CN117081602A (en) * 2023-10-13 2023-11-17 青岛场外市场清算中心有限公司 Capital settlement data optimization processing method based on blockchain

Also Published As

Publication number Publication date
CN117495469A (en) 2024-02-02

Similar Documents

Publication Publication Date Title
CN117495469B (en) Block chain-based intelligent timing method and system for electric bicycle
US20190074847A1 (en) Coding Method, Decoding Method, Coder, and Decoder
CN1183683C (en) Position adaptive coding method using prefix prediction
CN116681036B (en) Industrial data storage method based on digital twinning
CN101923569B (en) Storage method of structure type data of real-time database
CN113343640B (en) Method and device for classifying customs commodity HS codes
CN116702708B (en) Road pavement construction data management system
CN111861627B (en) A method, device, electronic device and storage medium for searching a shared vehicle
CN116910285B (en) Intelligent traffic data optimized storage method based on Internet of things
CN113706641B (en) A Hyperspectral Image Compression Method Based on the Importance of Spatial and Spectral Content
CN116610265B (en) Data storage method of business information consultation system
CN110008192A (en) A kind of data file compression method, apparatus, equipment and readable storage medium storing program for executing
CN106202213A (en) A kind of FPGA binary file compression, decompressing method and compression, decompression device
CN115543946A (en) Financial big data optimized storage method
CN117097441B (en) Carrier communication system transmission efficiency optimization method based on data analysis
CN117040542B (en) Intelligent comprehensive distribution box energy consumption data processing method
CN105631000A (en) Terminal-caching data compression method based on mobile terminal position characteristic information
CN105490683B (en) Save the method and device of normal form Huffman tree
CN117725373A (en) Agricultural machinery trajectory completion method, device and electronic equipment for sparse collection
CN110349635A (en) A kind of parallel compression method of gene sequencing quality of data score
CN115757307A (en) Data compression method and device, electronic equipment and storage medium
CN112540960A (en) Data storage management method and system
US12189601B2 (en) Data compression method, data decompression method, and electronic device
CN117880767B (en) Short message data transmission method with low delay
CN116383290B (en) Data generalization and analysis method

Legal Events

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