Method, device, equipment and storage medium for filling software interface table

By automatically calculating and filling in the signal start and end bit numbers, the problems of errors and inefficiency in filling in the software interface table are solved, and fast and accurate software integration is achieved.

CN115390800BActive Publication Date: 2025-11-11CHONGQING CHANGAN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210935719.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-04
Publication Date
2025-11-11
Estimated Expiration
2042-08-04

AI Technical Summary

Technical Problem

The accuracy and efficiency of filling in software interface tables in existing technologies are low, leading to difficulties in software integration.

Method used

By obtaining the signal length of the signal to be filled and the data of the previous signal, the system determines whether a new message area or identifier number is needed according to preset rules, calculates the signal start bit and end bit number, and automatically fills them into the software interface table.

Benefits of technology

It improved the speed and accuracy of filling in software interface table information, and enhanced the efficiency of software integration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115390800B_ABST
    Figure CN115390800B_ABST
Patent Text Reader

Abstract

This invention provides a method, apparatus, device, and storage medium for filling a software interface table. The method includes: obtaining the signal length of a signal to be filled; obtaining the data of the previous signal in the software interface table; determining, according to the data of the previous signal and the signal length of the signal to be filled, whether the signal to be filled needs a new message area number according to a preset rule; if the signal to be filled does not need a new message area number, calculating the signal start position of the signal to be filled based on the range of the signal length of the signal to be filled; calculating the end position number and start position number of the signal to be filled in the software interface table based on the signal start position of the signal to be filled; and writing the signal start position, start position number, and end position number of the signal to be filled into the software interface table. This greatly improves the speed and accuracy of filling information in the software interface table.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of software interface table technology, and specifically to a method, apparatus, device, and storage medium for filling a software interface table. Background Technology

[0002] Embedded controller software consists of various software components. After each component is developed, an integration engineer needs to integrate its code, compile it into a binary file, and download it to the embedded controller for execution. The main task of software integration is to connect the input / output interfaces of each software component, compile it successfully in the development environment, and generate the binary file. The software interface table serves as the primary document guiding software integration and must be filled out accurately and precisely. It also assists in generating the DBC file during software integration.

[0003] Existing methods mainly rely on manual input of software interface tables, which suffers from low accuracy and low efficiency. Therefore, there is a need to provide a method, apparatus, device, and storage medium for inputting software interface tables. Summary of the Invention

[0004] In view of the shortcomings of the prior art described above, the present invention provides a method, apparatus, device and storage medium for filling software interface tables to solve the above-mentioned technical problems.

[0005] The method for populating a software interface table provided by this invention includes:

[0006] Obtain the signal length of the signal to be filled;

[0007] Obtain the data of the previous signal in the software interface table, and determine whether the signal to be filled needs a new message area number according to the data of the previous signal and the signal length of the signal to be filled, based on a preset rule.

[0008] If the signal to be filled does not require a new message area number, calculate the signal start bit of the signal to be filled based on the range of the signal length of the signal to be filled;

[0009] Based on the start position of the signal to be filled, calculate the end position number and start position number of the signal to be filled in the software interface table, and write the start position, start position number and end position number of the signal to be filled into the software interface table.

[0010] In one embodiment of the present invention, after obtaining the data of the previous signal in the software interface table, the method further includes:

[0011] Based on the data of the previous signal and the signal length of the signal to be filled, determine whether the signal to be filled needs a new message identifier number in the software interface table. The data of the previous signal includes the signal length of the previous signal and the end bit number of the signal start bit in the software interface table.

[0012] If necessary, the message identifier number of the signal to be filled is calculated based on the signal length of the previous signal, the end bit number of the signal start bit in the software interface table, and the signal length of the signal to be filled, and written into the corresponding position in the software interface table.

[0013] If not, then based on the data of the previous signal and the signal length of the signal to be filled, determine whether the signal to be filled needs a new message area number according to a preset rule.

[0014] In one embodiment of the present invention, determining whether the signal to be filled needs a new message area number according to a preset rule based on the data of the previous signal and the signal length of the signal to be filled includes:

[0015] Based on the start bit number of the previous signal, determine whether the signal length of the previous signal and the signal length of the signal to be filled are less than a set threshold. The data of the previous signal also includes the start bit number of the previous signal's start bit in the software interface table.

[0016] If so, the signal to be filled in requires a new message area number;

[0017] If not, the signal to be filled does not require a new message area number.

[0018] In one embodiment of the present invention, calculating the signal start position of the signal to be filled based on the range of the signal length of the signal to be filled includes:

[0019] Calculate the remainder between the signal start bit of the previous signal and a preset threshold, and determine whether the remainder is a preset first threshold.

[0020] If so, then based on the different range intervals to which the signal length of the signal to be filled belongs, the signal start position of the signal to be filled is calculated according to a preset method using the previous signal end position number and the signal length of the signal to be filled;

[0021] If not, then based on the different ranges to which the signal length of the signal to be filled belongs, the signal start position of the signal to be filled is calculated according to a preset method using the previous signal end position number, start position number, signal start position, and the signal length of the signal to be filled.

[0022] In one embodiment of the present invention, the method for calculating the message identifier number of the signal to be filled is as follows:

[0023]

[0024] Where y is the signal start position of the signal to be filled, and L is the signal length of the signal to be filled.

[0025] In one embodiment of the present invention, when the remainder is a preset first threshold, the method for calculating the signal start position of the signal to be filled is as follows:

[0026]

[0027] Where y is the start bit of the signal to be filled, and L is the length of the signal to be filled. a The previous signal is numbered as an end bit.

[0028] In one embodiment of the present invention, when the remainder is not a preset first threshold, the method for calculating the signal start bit of the signal to be filled is as follows:

[0029]

[0030] Where y is the start bit of the signal to be filled, and L is the length of the signal to be filled. a L is the end bit number of the previous signal. b Let x be the start bit number of the previous signal, where x is the start bit of the previous signal.

[0031] In one embodiment of the present invention, an apparatus for filling a software interface table is also provided, the apparatus including a signal length acquisition module configured to acquire the signal length of the signal to be filled;

[0032] The message area number determination module is configured to obtain the data of the previous signal in the software interface table, and determine whether the signal to be filled needs a new message area number according to the data of the previous signal and the signal length of the signal to be filled, based on a preset rule.

[0033] The start bit calculation module is configured to calculate the signal start bit of the signal to be filled based on the range of the signal length of the signal to be filled if the signal to be filled does not require a new message area number.

[0034] The information entry module is configured to calculate the two end numbers of the signal to be filled in the software interface table based on the signal start position of the signal to be filled, and write the signal start position and two end numbers of the signal to be filled into the software interface table.

[0035] In one embodiment of the present invention, an electronic device is also provided, comprising:

[0036] One or more processors;

[0037] A storage device for storing one or more programs, which, when executed by one or more processors, cause the electronic device to implement the method of filling a software interface table as described above.

[0038] In one embodiment of the present invention, a computer-readable storage medium is also provided, on which computer-readable instructions are stored, which, when executed by a computer processor, cause the computer to perform the method of filling the software interface table as described in any of the preceding claims.

[0039] The beneficial effects of this invention are as follows: Based on the signal length, this invention retrieves relevant data for the previous signal from the software interface table. Then, based on the relevant data of the previous signal and the signal length of the signal to be filled, it determines whether a new message area is needed for the signal to be filled. If no new message area number is needed, the start bit and corresponding start and end bit numbers of the signal to be filled are calculated based on the signal length range. By filling this data into the software interface table, the data in the software interface table is automatically filled. This greatly improves the speed and accuracy of filling information in the software interface table.

[0040] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description

[0041] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings:

[0042] Figure 1 An exemplary embodiment of this application illustrates a schematic diagram of the location of signals within a byte segment;

[0043] Figure 2 An exemplary embodiment of this application illustrates a schematic diagram of the implementation environment of a method for populating a software interface table;

[0044] Figure 3 A flowchart illustrating a method for populating a software interface table is shown in an exemplary embodiment of this application;

[0045] Figure 4A flowchart illustrating a method for determining a message identifier number is shown in an exemplary embodiment of this application;

[0046] Figure 5 A flowchart illustrating a message identifier number determination method is shown in an exemplary embodiment of this application;

[0047] Figure 6 Figure 3 The flowchart of step S430 in an exemplary embodiment is shown below;

[0048] Figure 7 An exemplary embodiment of this application illustrates a flowchart of a start bit calculation method;

[0049] Figure 8 A block diagram illustrating an apparatus for filling a software interface table is shown in an exemplary embodiment of the application;

[0050] Figure 9 A schematic diagram of the structure of a computer system suitable for implementing the electronic device of the present application is shown. Detailed Implementation

[0051] The embodiments of the present invention will be described below with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for illustrating the present invention and not for limiting the scope of protection of the present invention.

[0052] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Therefore, the drawings only show the components related to the present invention and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.

[0053] In the following description, numerous details are explored to provide a more thorough explanation of embodiments of the invention. However, it will be apparent to those skilled in the art that embodiments of the invention may be practiced without these specific details. In other embodiments, well-known structures and devices are shown in block diagram form rather than in detail to avoid obscuring embodiments of the invention.

[0054] Figure 1An exemplary embodiment of this application illustrates the position of signals within a byte segment. First, it should be noted that the software interface table contains signal data used to connect various interfaces on the service side. When an interface needs to be called, the relevant signal information for that interface is retrieved from the software interface table, thereby achieving interconnection between the interfaces. As shown in Table 1, the software interface table includes the signal number (NO), the signal's English name (Signal Name), the signal's Chinese name (Name In Chinese), the CANFD message identifier number (ID) to which the signal belongs, the message area number (BytesSegment) to which the signal belongs, the signal's start bit number (i.e., the leftmost bit number of the byte containing the signal's start bit) a, the signal's end bit number (i.e., the rightmost bit number of the byte containing the signal's start bit) b, the signal start bit (bit), and the signal length (bits). The signal start bit indicates the starting bit number of the signal within the BytesSegment, and the signal length indicates the number of bits occupied by the signal.

[0055] Table 1

[0056]

[0057]

[0058] in, Figure 2 This is a schematic diagram illustrating the implementation environment of a method for filling in a software interface table, as shown in an exemplary embodiment of this application. Figure 2 The smart terminal 210 shown can be any terminal device that supports the installation and filling of software interface tables, such as a smartphone, in-vehicle computer, tablet computer, laptop computer, or wearable device, but is not limited to these. Figure 2 The filling server 220 shown is a navigation server, which can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. No restrictions are placed on this. The smart terminal 210 can communicate with the filling server 220 via wireless networks such as 3G (third-generation mobile information technology), 4G (fourth-generation mobile information technology), and 5G (fifth-generation mobile information technology). No restrictions are placed on this as well.

[0059] Please see Figure 3 , Figure 3This is a flowchart illustrating a method for populating a software interface table, as shown in an exemplary embodiment of this application. This method can be applied to... Figure 2 The implementation environment shown is specifically executed by the smart terminal 210 within that implementation environment. It should be understood that this method can also be applied to other exemplary implementation environments and executed by devices in other implementation environments; this embodiment does not limit the implementation environment to which the method is applicable.

[0060] like Figure 3 As shown, in an exemplary embodiment, the method for populating the software interface table includes at least steps S310 to S340, which are described in detail below:

[0061] Step S310: Obtain the signal length of the signal to be filled.

[0062] In this embodiment, the signal length of the signal to be filled is obtained in advance. Specifically, the number and length of the first signal in the software interface table need to be pre-filled. For other signals, the length and relevant information of the previous signal can be automatically obtained according to corresponding rules. By identifying the signal length of the interface, all signals are arranged closely according to the requirements of the CANFC communication DBC file, and ID, Bytes Segment, and signal start bit (bit) attributes are automatically generated, thereby greatly improving the speed and accuracy of filling information in the software interface table.

[0063] Step S320: Obtain the data of the previous signal in the software interface table, and determine whether the signal to be filled needs a new message area number according to the data of the previous signal and the signal length of the signal to be filled, based on a preset rule.

[0064] In this embodiment, since the signal to be filled is not the first signal in the software interface table, it is necessary to obtain the data of the previous signal in the software interface table to facilitate subsequent calculation of the relevant information of the signal to be filled. The previous signal refers to the last signal in the software interface table before the signal to be filled is written into it. Considering that each message in the software interface table consists of 8 Bytes Segments (0-7), and each Bytes Segment contains 64 bits (0-63), when a message area number is full, another message area number needs to be changed. Therefore, before writing the signal to be filled into the software interface table, it is necessary to determine whether the signal to be filled needs a new message area number based on the data of the previous signal and the signal length of the signal to be filled.

[0065] Step S330: If the signal to be filled does not require a new message area number, calculate the signal start position of the signal to be filled according to the range of the signal length of the signal to be filled.

[0066] In this embodiment, if the signal to be filled does not require a new message area number, it can be assumed that the signal to be filled can continue to be filled using the message area number of the previous signal. That is, the message area number of the signal to be filled is the same as that of the previous message. Since the length of the signals is different, the length they occupy in the message area number is different, and in some cases, they may even occupy multiple lines of message area numbers. In order to accurately calculate the start bit of the signal, that is, the bit number of the starting point of the signal in the message area number, it is necessary to set different length range intervals. According to the range interval to which the signal length of the signal to be filled belongs, the position of the start bit of the signal to be filled is calculated accordingly.

[0067] Step S340: Based on the signal start position of the signal to be filled, calculate the end position number and start position number of the signal to be filled in the software interface table, and write the signal start position, start position number and end position number of the signal to be filled into the software interface table.

[0068] In this embodiment, since the signal start bit carries information identifying signal characteristics, it is necessary to know the leftmost and rightmost positions of the signal start bit in the message area number. This allows for better location of the signal start bit and facilitates the reading of signal characteristics during subsequent interface calls. Similarly, since the length of the signal start bit varies, the area it occupies in the message also varies. Therefore, it is necessary to calculate the start bit number and end bit number of the signal start bit in the message according to the length range of the signal start bit, and write the signal start bit, start bit number, and end bit number of the signal to be filled into the corresponding positions in the software interface table to achieve the filling of the software interface table.

[0069] Figure 4 This is a flowchart illustrating a method for determining a message identifier number, as shown in an exemplary embodiment of this application. Figure 4 As shown, after obtaining the data of the previous signal in the software interface table, the method further includes determining the message identifier number, including steps S410 to S430, which are described in detail below:

[0070] Step S410: Based on the data of the previous signal and the signal length of the signal to be filled, determine whether the signal to be filled needs a new message identifier number in the software interface table. The data of the previous signal includes the signal length of the previous signal and the end bit number of the signal start bit in the software interface table.

[0071] In this embodiment, considering that when the signal is located in the 7th row of the message area number, such as Figure 1As shown, since a maximum of 64 bits can be filled, but the signal length and the filling area are different, there may be cases where a new message identifier number is needed. Therefore, it is necessary to determine whether a new message identifier number is required based on certain conditions.

[0072] Step S420: If necessary, calculate the message identifier number of the signal to be filled based on the signal length of the previous signal, the end bit number of the signal start bit in the software interface table, and the signal length of the signal to be filled, and write it into the corresponding position in the software interface table.

[0073] In this embodiment, if a new message identifier number is required, the message identifier number can be calculated based on the range of the signal length of the signal to be filled and the relevant information of the previous signal. Specifically, the calculation method for the message identifier number of the signal to be filled is shown in formula (1):

[0074]

[0075] Where K is the message identifier number of the signal to be filled, and L is the signal length of the signal to be filled. After calculating the message identifier number, the message identifier number is written into the corresponding position in the software interface table.

[0076] Step S430: If not required, then based on the data of the previous signal and the signal length of the signal to be filled, determine whether the signal to be filled needs a new message area number according to a preset rule.

[0077] In this embodiment, if a new message identifier number is not required, it is also necessary to determine whether the signal to be filled needs a new message area number. Specifically, based on the data of the previous signal in the software interface table and the signal length of the signal to be filled, it is determined whether the signal to be filled needs a new message area number.

[0078] Figure 5 This is a flowchart illustrating a message identifier number determination method according to an exemplary embodiment of this application. Figure 5 As shown, after obtaining the data of the previous signal in the software interface table, the method further includes determining the message identifier number, including steps S510 to S530, which are described in detail below:

[0079] Step S510: Based on the data of the previous signal and the signal length of the signal to be filled, determine whether the signal to be filled needs a new message identifier number in the software interface table. The data of the previous signal includes the signal length of the previous signal and the end bit number of the signal start bit in the software interface table.

[0080] In this embodiment, specifically, when the message area number is 7, a new message identifier number is required if any of the following conditions are met; otherwise, a new message identifier number is not required.

[0081] 1) La = 39, and xL < 8

[0082] 2) La = 47, and xL < 24

[0083] 3) La = 55, and xL < 40

[0084] 4) La = 63, and xL < 56

[0085] Among them, L a L is the signal end bit number of the previous signal in the software interface table, L is the signal length of the signal to be filled, and x is the signal start bit of the previous signal.

[0086] Step S520: If necessary, calculate the message identifier number of the signal to be filled based on the signal length of the previous signal, the end bit number of the signal start bit in the software interface table, and the signal length of the signal to be filled, and write it into the corresponding position in the software interface table.

[0087] In this embodiment, when a new message identifier number is required, the signal start bit of the signal to be filled can be calculated according to the range of the signal length of the signal to be filled, as shown in formula (2):

[0088]

[0089] Where y is the start position of the signal to be filled, and L is the length of the signal to be filled. It should be noted that when L is greater than or equal to 32, the calculation is exceeded, and the system will automatically report an error.

[0090] Step S530: If not required, then based on the data of the previous signal and the signal length of the signal to be filled, determine whether the signal to be filled needs a new message area number according to a preset rule.

[0091] Figure 6 yes Figure 3 The flowchart of step S330 in the illustrated embodiment is shown in an exemplary embodiment. (See attached flowchart.) Figure 6 As shown, the process of determining whether the signal to be filled needs a new message area number according to a preset rule based on the data of the previous signal and the signal length of the signal to be filled can include steps S610 to S630, which are described in detail below:

[0092] Step S610: Based on the start bit number of the previous signal, determine whether the signal length of the previous signal and the signal length of the signal to be filled are less than a set threshold. The data of the previous signal also includes the start bit number of the previous signal's start bit in the software interface table.

[0093] Step S620: If yes, then the signal to be filled requires a new message area number;

[0094] Step S630: If not, the signal to be filled does not require a new message area number.

[0095] In this embodiment, based on the value of the start bit number of the previous signal, it is determined whether the difference between the signal length of the previous signal and the signal length of the signal to be filled is less than a set threshold, thereby determining whether a new message area number is needed. Specifically, the threshold values ​​differ for different start bit numbers, as follows:

[0096] 1) La = 39, and xL <a1

[0097] 2) La = 47, and xL <a2

[0098] 3) La = 55, and xL <a2

[0099] 4) La = 63, and xL <a4

[0100] Where L is the signal length of the signal to be filled, L a The previous signal is assigned an end bit number, x is the start bit of the previous signal, and a1, a2, a3, and a4 are the corresponding thresholds. Preferably, a1 is 8, a2 is 24, a3 is 40, and a4 is 56. If any of the above four conditions are not met, the signal to be filled does not require a new message area number.

[0101] Figure 7 This is a flowchart illustrating a start bit calculation method, as shown in an exemplary embodiment of this application. Figure 7 As shown, the process of calculating the signal start position of the signal to be filled based on the range of the signal length of the signal to be filled may include steps S710 to S730, which are described in detail below:

[0102] Step S710: Calculate the remainder between the signal start bit of the previous signal and a preset threshold, and determine whether the remainder is a preset first threshold.

[0103] In this embodiment, the remainder of the signal start bit of the previous signal and 8 is calculated, and it is determined whether the remainder is zero.

[0104] Step S720: If yes, then based on the different range intervals to which the signal length of the signal to be filled belongs, the signal start position of the signal to be filled is calculated according to a preset method using the previous signal end position number and the signal length of the signal to be filled.

[0105] In this embodiment, if the remainder of the signal start bit of the previous signal and 8 is zero, then the signal start bit of the signal to be filled is calculated according to the following formula (3) based on the range of the signal length of the signal to be filled:

[0106]

[0107] Where y is the start bit of the signal to be filled, and L is the length of the signal to be filled. a This is used to assign an end-of-signal number to the previous signal. It should be noted that when L is greater than or equal to 32, the calculation range is exceeded, and the system will automatically report an error. Based on the range of the signal length of the signal to be filled, the start-of-signal position of the signal can be accurately calculated, thus revealing the specific location of the signal in the message, facilitating subsequent signal retrieval.

[0108] Step S730: If not, then based on the different range intervals to which the signal length of the signal to be filled belongs, use the previous signal end bit number, start bit number, signal start bit, and the signal length of the signal to be filled to calculate the signal start bit of the signal to be filled according to a preset method.

[0109] In this embodiment, if the remainder of the signal start bit of the previous signal and 8 is not zero, then the signal start bit of the signal to be filled is calculated according to the following formula (4) based on the range of the signal length of the signal to be filled:

[0110] Where y is the start bit of the signal to be filled, and L is the length of the signal to be filled. a L is the end bit number of the previous signal. b Let x be the start bit number of the previous signal. It should be noted that when L is greater than or equal to xL... b If the value is +32, it exceeds the calculation range, and the system will automatically report an error.

[0111] Furthermore, after the signal to be filled requires a new message area number, the method further includes: calculating the remainder between the signal start bit of the previous signal and 8; when the remainder is 0, calculating the signal start bit of the signal to be filled according to formula (5) based on the signal length of the signal to be filled.

[0112]

[0113] Where y is the start bit of the signal to be filled, and L is the length of the signal to be filled. a This is the end bit number of the previous signal. It should be noted that when L is greater than or equal to 32, it exceeds the calculation range, and the system will automatically report an error.

[0114] Furthermore, after calculating the remainder of the signal start bit of the previous signal divided by 8, the process also includes: when the remainder is not 0, calculating the signal start bit of the signal to be filled according to formula (6) based on the signal length of the signal to be filled.

[0115]

[0116] Where y is the start bit of the signal to be filled, and L is the length of the signal to be filled. a L is the end bit number of the previous signal. b Let x be the start bit number of the previous signal. It should be noted that when L is greater than or equal to xL... b If the value is +32, it exceeds the calculation range, and the system will automatically report an error.

[0117] Furthermore, the calculation of the start bit number and end bit number of the signal to be filled is shown in formula (7):

[0118]

[0119] Where y is the start bit of the signal to be filled, a is the end bit number of the signal to be filled, and b is the start bit number of the signal to be filled. It should be noted that when L is greater than 63, it exceeds the calculation range and the system will automatically report an error.

[0120] Furthermore, the method for calculating the message area number is as follows:

[0121] Determine whether the start bit number of the signal to be filled is greater than or equal to the start bit number of the previous signal;

[0122] If so, the message area number of the signal to be filled in is the same as the message area number of the previous signal;

[0123] If not, then determine whether the message area number of the previous signal is 7;

[0124] If so, the message area number for the signal to be filled in is 0;

[0125] If not, the message area number of the signal to be filled in is the message area number of the previous signal plus one.

[0126] Furthermore, the method for calculating the message identifier number is as follows:

[0127] Determine if the message area number of the previous signal is 7;

[0128] If so, then determine whether the message area of ​​the signal to be filled is zero;

[0129] If so, the message identifier number of the signal to be filled in is the message identifier number of the previous signal plus one;

[0130] If not, the message identifier number of the signal to be filled in is the same as the message identifier number of the previous signal;

[0131] If not, then the message identifier number of the signal to be filled in is the same as the message identifier number of the previous signal.

[0132] In this invention, based on the signal length, relevant data of the previous signal is retrieved from the software interface table. Then, based on the relevant data of the previous signal and the signal length of the signal to be filled, it is determined whether a new message area is needed for the signal to be filled. If no new message area number is needed, the start bit and corresponding start and end bit numbers of the signal to be filled are calculated based on the signal length range. By filling this data into the software interface table, the data in the software interface table is automatically filled. This greatly improves the speed and accuracy of filling information in the software interface table.

[0133] Figure 8 This is a block diagram illustrating an apparatus for filling a software interface table, as shown in an exemplary embodiment of this application. This apparatus can be applied to… Figure 2 The implementation environment shown is specifically configured in the smart terminal 210. This device can also be applied to other exemplary implementation environments and specifically configured in other devices. This embodiment does not limit the implementation environment to which the device is applicable.

[0134] like Figure 8 As shown, the exemplary device 8 for filling in a software interface table includes:

[0135] The software interface table filling module 801 is configured to acquire sample data; the message area number judgment module 802 is configured to acquire the data of the previous signal in the software interface table, and determine whether the signal to be filled needs a new message area number according to a preset rule based on the data of the previous signal and the signal length of the signal to be filled; the start position calculation module 803 is configured to calculate the signal start position of the signal to be filled based on the range of the signal length of the signal to be filled if the signal to be filled does not need a new message area number; and the information filling module 804 is configured to calculate the two end numbers of the signal to be filled in the software interface table based on the signal start position of the signal to be filled, and write the signal start position and two end numbers of the signal to be filled into the software interface table.

[0136] In another exemplary embodiment, the message area number determination module 802 includes:

[0137] The message identifier number determination unit is configured to determine, based on the data of the previous signal and the signal length of the signal to be filled, whether the signal to be filled needs a new message identifier number in the software interface table, wherein the data of the previous signal includes the signal length of the previous signal and the end bit number of the signal start bit in the software interface table.

[0138] The message identifier number calculation unit is configured to, if necessary, calculate the message identifier number of the signal to be filled based on the signal length of the previous signal and the end bit number of the signal start bit in the software interface table, as well as the signal length of the signal to be filled, and write it into the corresponding position in the software interface table.

[0139] The message area number determination unit is configured to determine whether a new message area number is needed for the signal to be filled, based on the data of the previous signal and the signal length of the signal to be filled, according to a preset rule if no new message area number is needed.

[0140] In another exemplary embodiment, the message area number determination unit includes:

[0141] The threshold judgment subunit is configured to determine whether the signal length of the previous signal and the signal length of the signal to be filled are less than a set threshold based on the start bit number of the previous signal. The data of the previous signal also includes the start bit number of the previous signal's start bit in the software interface table.

[0142] If the new message filling subunit is configured as such, then the signal to be filled requires a new message area number.

[0143] If the old message filling sub-unit is configured as follows (if not), then the signal to be filled does not require a new message area number.

[0144] In another exemplary embodiment, the start bit calculation module 803 includes:

[0145] The remainder determination unit is configured to calculate the remainder between the signal start position of the previous signal and a preset threshold, and determine whether the remainder is a preset first threshold.

[0146] If the remainder is zero, the start position calculation unit is configured such that, based on the different range intervals to which the signal length of the signal to be filled belongs, the signal start position of the signal to be filled is calculated in a preset manner using the previous signal end position number and the signal length of the signal to be filled.

[0147] If the remainder is not zero, the start position calculation unit is configured such that, if not, the signal start position of the signal to be filled is calculated according to a preset method based on the different range intervals to which the signal length of the signal to be filled belongs, using the previous signal end position number, start position number, signal start position, and the signal length of the signal to be filled.

[0148] It should be noted that the apparatus for filling the software interface table provided in the above embodiments and the method for filling the software interface table provided in the above embodiments belong to the same concept. The specific ways in which each module and unit performs operations have been described in detail in the method embodiments, and will not be repeated here. In practical applications, the traffic condition refresh device provided in the above embodiments can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. This is not a limitation here.

[0149] Embodiments of this application also provide an electronic device, including: one or more processors; and a storage device for storing one or more programs, which, when executed by the one or more processors, cause the electronic device to implement the method of filling a software interface table provided in the above embodiments.

[0150] Figure 9 A schematic diagram of a computer system suitable for implementing the embodiments of this application is shown. It should be noted that... Figure 9 The computer system 900 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0151] like Figure 9 As shown, the computer system 900 includes a Central Processing Unit (CPU) 901, which can perform various appropriate actions and processes based on programs stored in Read-Only Memory (ROM) 902 or loaded from storage portion 908 into Random Access Memory (RAM) 903, such as performing the methods described in the above embodiments. The RAM 903 also stores various programs and data required for system operation. The CPU 901, ROM 902, and RAM 903 are interconnected via a bus 904. An Input / Output (I / O) interface 905 is also connected to the bus 904.

[0152] The following components are connected to I / O interface 905: an input section 906 including a keyboard, mouse, etc.; an output section 907 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to I / O interface 905 as needed. Removable media 911, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 910 as needed so that computer programs read from them can be installed into storage section 908 as needed.

[0153] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program including a computer program for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 909, and / or installed from removable medium 911. When the computer program is executed by central processing unit (CPU) 901, it performs various functions defined in the system of this application.

[0154] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying a computer-readable computer program. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.

[0155] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0156] The units described in the embodiments of this application can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.

[0157] Another aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a computer's processor, causes the computer to perform the method of filling a software interface table as described above. This computer-readable storage medium may be included in the electronic device described in the above embodiments, or it may exist independently and not assembled into the electronic device.

[0158] Another aspect of this application provides a computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the method for filling a software interface table provided in the various embodiments described above.

[0159] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in the present invention should still be covered by the claims of the present invention.

Claims

1. A method for populating a software interface table, characterized in that, The method includes: Obtain the signal length of the signal to be filled; Obtain the data of the previous signal in the software interface table, and determine whether the signal to be filled needs a new message area number according to the data of the previous signal and the signal length of the signal to be filled, based on a preset rule. If the signal to be filled does not require a new message area number, calculate the signal start bit of the signal to be filled based on the range of the signal length of the signal to be filled; Based on the signal start position of the signal to be filled, calculate the end position number and start position number of the signal to be filled in the software interface table, and write the signal start position, start position number and end position number of the signal to be filled into the software interface table; After obtaining the data of the previous signal in the software interface table, the process further includes: Based on the data of the previous signal and the signal length of the signal to be filled, determine whether the signal to be filled needs a new message identifier number in the software interface table. The data of the previous signal includes the signal length of the previous signal and the end bit number of the signal start bit in the software interface table. If necessary, the message identifier number of the signal to be filled is calculated based on the signal length of the previous signal, the end bit number of the signal start bit in the software interface table, and the signal length of the signal to be filled, and written into the corresponding position in the software interface table. If not, then based on the data of the previous signal and the signal length of the signal to be filled, determine whether the signal to be filled needs a new message area number according to a preset rule; The step of calculating the signal start position of the signal to be filled based on the range of the signal length of the signal to be filled includes: Calculate the remainder between the signal start bit of the previous signal and a preset threshold, and determine whether the remainder is a preset first threshold; wherein, the data of the previous signal also includes the start bit number of the signal start bit of the previous signal in the software interface table; If so, then based on the different range intervals to which the signal length of the signal to be filled belongs, the start position of the signal to be filled is calculated using the end position number of the previous signal and the signal length of the signal to be filled in a preset manner; If not, then based on the different ranges to which the signal length of the signal to be filled belongs, the signal start position of the signal to be filled is calculated using the end bit number, start bit number, signal start bit of the previous signal, and the signal length of the signal to be filled, according to a preset method.

2. The method for filling in a software interface table according to claim 1, characterized in that, The step of determining whether the signal to be filled needs a new message area number based on the data of the previous signal and the signal length of the signal to be filled, according to a preset rule, includes: Based on the start bit number of the previous signal, determine whether the signal length of the previous signal and the signal length of the signal to be filled are less than a set threshold. If so, the signal to be filled in requires a new message area number; If not, the signal to be filled does not require a new message area number.

3. The method for filling the software interface table according to claim 1, characterized in that, The method for calculating the message identifier number of the signal to be filled is as follows: K= Where K is the message identifier number of the signal to be filled, and L is the signal length of the signal to be filled.

4. The method for filling the software interface table according to claim 1, characterized in that, When the remainder is a preset first threshold, the method for calculating the signal start bit of the signal to be filled is as follows: y= Where y is the start bit of the signal to be filled, and L is the length of the signal to be filled. This is the end bit number of the previous signal.

5. The method for filling in a software interface table according to claim 1, characterized in that, When the remainder is not a preset first threshold, the method for calculating the signal start bit of the signal to be filled is as follows: y= Where y is the start bit of the signal to be filled, and L is the length of the signal to be filled. This is the end bit number of the previous signal. Let x be the start bit number of the previous signal, where x is the signal start bit of the previous signal.

6. An apparatus for filling a software interface table, characterized in that, The device includes: The signal length acquisition module is configured to acquire the signal length of the signal to be filled in. The message area number determination module is configured to obtain the data of the previous signal in the software interface table, and determine whether the signal to be filled needs a new message area number according to the data of the previous signal and the signal length of the signal to be filled, based on a preset rule. The start bit calculation module is configured to calculate the signal start bit of the signal to be filled based on the range of the signal length of the signal to be filled if the signal to be filled does not require a new message area number. The information filling module is configured to calculate the end position number and start position number of the signal to be filled in the software interface table based on the signal start position of the signal to be filled, and write the signal start position, start position number and end position number of the signal to be filled into the software interface table. After obtaining the data of the previous signal in the software interface table, the process further includes: Based on the data of the previous signal and the signal length of the signal to be filled, determine whether the signal to be filled needs a new message identifier number in the software interface table. The data of the previous signal includes the signal length of the previous signal and the end bit number of the signal start bit in the software interface table. If necessary, the message identifier number of the signal to be filled is calculated based on the signal length of the previous signal, the end bit number of the signal start bit in the software interface table, and the signal length of the signal to be filled, and written into the corresponding position in the software interface table. If not, then based on the data of the previous signal and the signal length of the signal to be filled, determine whether the signal to be filled needs a new message area number according to a preset rule; The step of calculating the signal start position of the signal to be filled based on the range of the signal length of the signal to be filled includes: Calculate the remainder between the signal start bit of the previous signal and a preset threshold, and determine whether the remainder is a preset first threshold; wherein, the data of the previous signal also includes the start bit number of the signal start bit of the previous signal in the software interface table; If so, then based on the different range intervals to which the signal length of the signal to be filled belongs, the start position of the signal to be filled is calculated using the end position number of the previous signal and the signal length of the signal to be filled in a preset manner; If not, then based on the different ranges to which the signal length of the signal to be filled belongs, the signal start position of the signal to be filled is calculated using the end bit number, start bit number, signal start bit of the previous signal, and the signal length of the signal to be filled, according to a preset method.

7. An electronic device, characterized in that, The electronic device includes: One or more processors; A storage device for storing one or more programs, which, when executed by one or more processors, cause the electronic device to implement the method of filling a software interface table as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by the computer's processor, causes the computer to perform the method of filling the software interface table as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Interface parameter verification method and device, computer device and storage medium

    CN109766264A

  • Vehicle data file generation method and device

    CN112347047A